Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

gmTNTconvert.cpp File Reference


Detailed Description

This file contains several global "convert" methods to easily convert gmVector3/4 <-> TNT::Vector and gmMatrix3/4 <-> TNT::Matrix.

Author:
Terry Fleury <tfleury@uiuc.edu>
Date:
October 28, 2001

Definition in file gmTNTconvert.cpp.

#include "gmTNTconvert.h"

Include dependency graph for gmTNTconvert.cpp:

Include dependency graph

Go to the source code of this file.

Functions

TNT::Vector< double > convert (gmVector3 v)
 Convert a gmVector3 to a TNT::Vector<double> of size 3.

TNT::Matrix< double > convert (gmMatrix3 m)
 Convert a gmMatrix3 to a TNT::Matrix<double> of size 3x3.

TNT::Vector< double > convert (gmVector4 v)
 Convert a gmVector4 to a TNT::Vector<double> of size 4.

TNT::Matrix< double > convert (gmMatrix4 m)
 Convert a gmMatrix4 to a TNT::Matrix<double> of size 4x4.

gmVector3 convert (TNT::Vector< double > v)
 Convert a TNT::Vector<double> of size 3 to a gmVector3.

gmMatrix3 convert (TNT::Matrix< double > m)
 Convert a TNT::Matrix<double> of size 3x3 to a gmMatrix3.

gmVector4 convert4 (TNT::Vector< double > v)
 Convert a TNT::Vector<double> of size 4 to a gmVector4.

gmMatrix4 convert4 (TNT::Matrix< double > m)
 Convert a TNT::Matrix<double> of size 4x4 to a gmMatrix4.


Function Documentation

gmMatrix3 convert TNT::Matrix< double >  m  ) 
 

Convert a TNT::Matrix<double> of size 3x3 to a gmMatrix3.

Parameters:
m The input TNT::Matrix to convert.
Returns:
The equivalen gmMatrix3.
Note:
If the TNT::Matrix is not of size 3x3, then only the available elements of the TNT::Matrix are copied, thus avoiding invalid array accesses.

Definition at line 89 of file gmTNTconvert.cpp.

Referenced by Plane::grad(), Segment::grad(), Sphere::grad(), NewtonCritical::NewtonEquation(), NewtonDegenerate::NewtonEquation(), ADF::proc(), Plane::proc(), Segment::proc(), and Sphere::proc().

gmVector3 convert TNT::Vector< double >  v  ) 
 

Convert a TNT::Vector<double> of size 3 to a gmVector3.

Parameters:
v The input TNT::Vector to convert.
Returns:
The equivalent gmVector3.
Note:
If the TNT::Vector is not of size 3, then only the available elements of the TNT::Vector are copied, thus avoiding invalid array accesses.

Definition at line 73 of file gmTNTconvert.cpp.

TNT::Matrix<double> convert gmMatrix4  m  ) 
 

Convert a gmMatrix4 to a TNT::Matrix<double> of size 4x4.

Parameters:
m The input gmMatrix3 to convert.
Returns:
The equivalent TNT::Matrix.

Definition at line 56 of file gmTNTconvert.cpp.

TNT::Vector<double> convert gmVector4  v  ) 
 

Convert a gmVector4 to a TNT::Vector<double> of size 4.

Parameters:
v The input gmVector4 to convert.
Returns:
The equivalent TNT::Vector.

Definition at line 43 of file gmTNTconvert.cpp.

TNT::Matrix<double> convert gmMatrix3  m  ) 
 

Convert a gmMatrix3 to a TNT::Matrix<double> of size 3x3.

Parameters:
m The input gmMatrix3 to convert.
Returns:
The equivalent TNT::Matrix.

Definition at line 29 of file gmTNTconvert.cpp.

TNT::Vector<double> convert gmVector3  v  ) 
 

Convert a gmVector3 to a TNT::Vector<double> of size 3.

Parameters:
v The input gmVector3 to convert.
Returns:
The equivalent TNT::Vector.

Definition at line 16 of file gmTNTconvert.cpp.

Referenced by NewtonDegenerate::NewtonEquation().

gmMatrix4 convert4 TNT::Matrix< double >  m  ) 
 

Convert a TNT::Matrix<double> of size 4x4 to a gmMatrix4.

Parameters:
m The input TNT::Matrix to convert.
Returns:
The equivalent gmMatrix4.
Note:
If the TNT::Matrix is not of size 4x4, then only the available elements of the TNT::Matrix are copied, thus avoiding invalid array accesses.

This method is named convert4 to disambiguate it from convert(TNT::Matrix<double> &m), which returns a gmMatrix3 instead of a gmMatrix4. Unfortunately, there's no way to name them both "convert" since they have the same arguments.

Definition at line 130 of file gmTNTconvert.cpp.

gmVector4 convert4 TNT::Vector< double >  v  ) 
 

Convert a TNT::Vector<double> of size 4 to a gmVector4.

Parameters:
v The input TNT::Vector to convert.
Returns:
The equivalent gmVector4.
Note:
If the TNT::Vector is not of size 4, then only the available elements of the TNT::Vector are copied, thus avoiding invalid array accesses.

This method is named convert4 to disambiguate it from convert(TNT::Vector<double> &v), which returns a gmVector3 instead of a gmVector4. Unfortunately, there's no way to name them both "convert" since they have the same arguments.

Definition at line 110 of file gmTNTconvert.cpp.


Generated on Mon Jun 28 14:59:03 2004 for Advanced Surface Library by doxygen 1.3.4