Public Member Functions
CMatrix3 Class Reference

Detailed Description

This class represents a double precision floating point 3 by 3 matrix.

Example:
        using namespace XSI::MATH;
        CMatrix3 mat3(1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0);
        mat3.TransposeInPlace();
        Application app;
        app.LogMessage(CString(L"The transposed matrix is ") +
                       CValue(mat3.GetValue(0,0)).GetAsText() + CString(L", ")+
                       CValue(mat3.GetValue(0,1)).GetAsText() + CString(L", ")+
                       CValue(mat3.GetValue(0,2)).GetAsText() + CString(L", ")+
                       CValue(mat3.GetValue(1,0)).GetAsText() + CString(L", ")+
                       CValue(mat3.GetValue(1,1)).GetAsText() + CString(L", ")+
                       CValue(mat3.GetValue(1,2)).GetAsText() + CString(L", ")+
                       CValue(mat3.GetValue(2,0)).GetAsText() + CString(L", ")+
                       CValue(mat3.GetValue(2,1)).GetAsText() + CString(L", ")+
                       CValue(mat3.GetValue(2,2)).GetAsText());

#include <xsi_matrix3.h>

List of all members.

Public Member Functions

SICPPSDK_INLINE CMatrix3 ()
SICPPSDK_INLINE CMatrix3 (double in_d00, double in_d01, double in_d02, double in_d10, double in_d11, double in_d12, double in_d20, double in_d21, double in_d22)
SICPPSDK_INLINE CMatrix3 (const CMatrix3 &in_matrix3)
SICPPSDK_INLINE ~CMatrix3 ()
SICPPSDK_INLINE CMatrix3operator= (const CMatrix3 &in_matrix3)
SICPPSDK_INLINE CMatrix3operator*= (const CMatrix3 &in_matrix3)
CVector3operator[] (const short &in_sIndex)
SICPPSDK_INLINE CMatrix3SetIdentity ()
bool InvertInPlace ()
bool Invert (const CMatrix3 &in_matrix3)
bool TransposeInverseInPlace ()
bool TransposeInverse (const CMatrix3 &in_matrix3)
SICPPSDK_INLINE void TransposeInPlace ()
SICPPSDK_INLINE void Transpose (const CMatrix3 &in_matrix3)
SICPPSDK_INLINE CMatrix3MulInPlace (const CMatrix3 &in_matrix3)
SICPPSDK_INLINE CMatrix3Mul (const CMatrix3 &in_matrix3A, const CMatrix3 &in_matrix3B)
SICPPSDK_INLINE void Get (double &io_d00, double &io_d01, double &io_d02, double &io_d10, double &io_d11, double &io_d12, double &io_d20, double &io_d21, double &io_d22) const
SICPPSDK_INLINE void Set (double in_d00, double in_d01, double in_d02, double in_d10, double in_d11, double in_d12, double in_d20, double in_d21, double in_d22)
SICPPSDK_INLINE void Set (const double in_dVal[3][3])
SICPPSDK_INLINE double GetValue (short in_sRow, short in_sCol) const
SICPPSDK_INLINE void SetValue (short in_sRow, short in_sCol, double in_dVal)
CMatrix3SetFromQuaternion (const CQuaternion &in_quaternion)
CQuaternion GetQuaternion (void) const
bool EpsilonEquals (const CMatrix3 &in_matrix3, double in_dEpsilon) const
SICPPSDK_INLINE bool Equals (const CMatrix3 &in_matrix3) const
SICPPSDK_INLINE bool operator== (const CMatrix3 &in_matrix3) const
SICPPSDK_INLINE bool operator!= (const CMatrix3 &in_matrix3) const

Constructor & Destructor Documentation

SICPPSDK_INLINE CMatrix3 ( )

Default constructor.

SICPPSDK_INLINE CMatrix3 ( double  in_d00,
double  in_d01,
double  in_d02,
double  in_d10,
double  in_d11,
double  in_d12,
double  in_d20,
double  in_d21,
double  in_d22 
)

Constructor.

Parameters:
in_d00Value to set in this matrix[0,0].
in_d01Value to set in this matrix[0,1].
in_d02Value to set in this matrix[0,2].
in_d10Value to set in this matrix[1,0].
in_d11Value to set in this matrix[1,1].
in_d12Value to set in this matrix[1,2].
in_d20Value to set in this matrix[2,0].
in_d21Value to set in this matrix[2,1].
in_d22Value to set in this matrix[2,2].
SICPPSDK_INLINE CMatrix3 ( const CMatrix3 in_matrix3)

Copy constructor.

Parameters:
in_matrix3constant class object.
SICPPSDK_INLINE ~CMatrix3 ( )

Default destructor.


Member Function Documentation

SICPPSDK_INLINE CMatrix3 & operator= ( const CMatrix3 in_matrix3)

Assignment operator.

Parameters:
in_matrix3&constant class object.
SICPPSDK_INLINE CMatrix3 & operator*= ( const CMatrix3 in_matrix3)

Right-multiplies this CMatrix3 object by the matrix m and stores the result in the same CMatrix3 object (this = this . in_matrix3)

Parameters:
in_matrix3matrix to be multiplied with.
Returns:
A reference to this CMatrix3 object.
See also:
CMatrix3::MulInPlace
CVector3& operator[] ( const short &  in_sIndex)

Accesses a row of this CMatrix3 object.

Parameters:
in_sIndex0,1,2 for the row of the matrix.
Returns:
A reference to this CVector3 object.
See also:
CVector3::operator[]
SICPPSDK_INLINE CMatrix3 & SetIdentity ( )

Sets this CMatrix3 object to the identity matrix (this = id).

Returns:
A reference to this CMatrix3 object.
bool InvertInPlace ( )

Inverts this CMatrix3 object (if not singular) (this = this^-1).

Returns:
true if this CMatrix3 object has been inverted (not singular), else false.
bool Invert ( const CMatrix3 in_matrix3)

Inverts this CMatrix3 object (if not singular) (this = this^-1).

Parameters:
in_matrix3matrix to be inverted.
Returns:
true if this CMatrix3 object has been inverted (not singular), else false.
bool TransposeInverseInPlace ( )

Sets this CMatrix3 object to the transpose of the inverse of itself (if not singular) (this = Transpose(this^-1)).

Returns:
true if this CMatrix3 object has been inverted (not singular), else false.
bool TransposeInverse ( const CMatrix3 in_matrix3)

Sets this CMatrix3 object to the transpose of the inverse of the input matrix (if not singular) (this = Transpose(in_matrix3^-1)).

Parameters:
in_matrix3CMatrix3 object to be inversed and transposed.
Returns:
true if this CMatrix3 object has been inverted (not singular), else false.
SICPPSDK_INLINE void TransposeInPlace ( )

Transposes this CMatrix3 object in place (this = Transpose(this)).

SICPPSDK_INLINE void Transpose ( const CMatrix3 in_matrix3)

Transposes the specified matrix and stores the result in this CMatrix3 object (this = Transpose(in_matrix3)).

Parameters:
in_matrix3matrix to be inversed and transposed.
SICPPSDK_INLINE CMatrix3 & MulInPlace ( const CMatrix3 in_matrix3)

Right-multiplies this CMatrix3 object by the matrix m and stores the result in this CMatrix3 object (this = this . in_matrix3).

Parameters:
in_matrix3matrix to be multiplied with.
Returns:
A reference to the CMatrix3 object.
SICPPSDK_INLINE CMatrix3 & Mul ( const CMatrix3 in_matrix3A,
const CMatrix3 in_matrix3B 
)

Right-multiplies the matrix A by the matrix B and stores the result in this CMatrix3 object (this = in_matrix3A . in_matrix3B).

Parameters:
in_matrix3Amatrix
in_matrix3Bmatrix
Returns:
CMatrix3& A reference to the CMatrix3 object which contains the result of the multiplication.
SICPPSDK_INLINE void Get ( double &  io_d00,
double &  io_d01,
double &  io_d02,
double &  io_d10,
double &  io_d11,
double &  io_d12,
double &  io_d20,
double &  io_d21,
double &  io_d22 
) const

Returns the 9 components of this CMatrix3 object.

Parameters:
io_d00Value of this matrix[0,0].
io_d01Value of this matrix[0,1].
io_d02Value of this matrix[0,2].
io_d10Value of this matrix[1,0].
io_d11Value of this matrix[1,1].
io_d12Value of this matrix[1,2].
io_d20Value of this matrix[2,0].
io_d21Value of this matrix[2,1].
io_d22Value of this matrix[2,2].
SICPPSDK_INLINE void Set ( double  in_d00,
double  in_d01,
double  in_d02,
double  in_d10,
double  in_d11,
double  in_d12,
double  in_d20,
double  in_d21,
double  in_d22 
)

Sets the 9 components of this CMatrix3 object.

Parameters:
in_d00Value to set to this matrix[0,0].
in_d01Value to set to this matrix[0,1].
in_d02Value to set to this matrix[0,2].
in_d10Value to set to this matrix[1,0].
in_d11Value to set to this matrix[1,1].
in_d12Value to set to this matrix[1,2].
in_d20Value to set to this matrix[2,0].
in_d21Value to set to this matrix[2,1].
in_d22Value to set to this matrix[2,2].
SICPPSDK_INLINE void Set ( const double  in_dVal[3][3])

Sets the 9 components of this CMatrix3 object.

Parameters:
in_dValA 3x3 array of double values.
SICPPSDK_INLINE double GetValue ( short  in_sRow,
short  in_sCol 
) const

Returns the (i,j)th value of this CMatrix3 object.

Parameters:
in_sRowaccess to the i th row
in_sColaccess to the j th column
Returns:
The (i,j)th value of this CMatrix3 object.
SICPPSDK_INLINE void SetValue ( short  in_sRow,
short  in_sCol,
double  in_dVal 
)

Sets the (i,j)th value of this CMatrix3 object.

Parameters:
in_sRowaccess to the i th row
in_sColaccess to the j th column
in_dValnew value
CMatrix3& SetFromQuaternion ( const CQuaternion in_quaternion)

Sets the CMatrix3 object using rotation CQuaternion.

Parameters:
in_quaternionThe CQuaternion containing the new matrix3 values
Returns:
The new CMatrix3 object.
CQuaternion GetQuaternion ( void  ) const

Gets the rotation CQuaternion representation of this matrix3.

Returns:
Rotation CQuaternion
bool EpsilonEquals ( const CMatrix3 in_matrix3,
double  in_dEpsilon 
) const

Tests the equality of this CMatrix3 object with the specified matrix, with a tolerance of Epsilon.

Parameters:
in_matrix3Operand matrix.
in_dEpsilonError margin Possible Values: [0, +INF[ should be a positive value
Returns:
true if equal else false.
SICPPSDK_INLINE bool Equals ( const CMatrix3 in_matrix3) const

Tests the strict equality of this CMatrix3 object with the specified matrix.

Parameters:
in_matrix3Operand matrix.
Returns:
true if equal else false.
SICPPSDK_INLINE bool operator== ( const CMatrix3 in_matrix3) const

Equality operator. Tests the strict equality of this CMatrix3 object with the specified matrix.

Parameters:
in_matrix3Operand matrix3.
Returns:
true if equal else false.
See also:
CMatrix3::Equals
SICPPSDK_INLINE bool operator!= ( const CMatrix3 in_matrix3) const

Inequality operator. Tests the strict inequality of this CMatrix3 object with the specified matrix.

Parameters:
in_matrix3Operand matrix.
Returns:
true if equal else false.
See also:
CMatrix3::Equals

The documentation for this class was generated from the following file: