This class represents a double precision floating point 4 by 4 matrix.
using namespace XSI::MATH; CMatrix4 mat4( 1.0,2.0,3.0,4.0, 5.0,6.0,7.0,8.0, 9.0,10.0,11.0,12.0, 13.0,14.0,15.0,16.0); mat4.TransposeInPlace(); Application app; app.LogMessage(CString(L"The transposed matrix is ") + CValue(mat4.GetValue(0,0)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(0,1)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(0,2)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(0,3)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(1,0)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(1,1)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(1,2)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(1,3)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(2,0)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(2,1)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(2,2)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(2,3)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(3,0)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(3,1)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(3,2)).GetAsText() + CString(L", ")+ CValue(mat4.GetValue(3,3)).GetAsText());
#include <xsi_matrix4.h>
Public Member Functions |
|
SICPPSDK_INLINE | CMatrix4 () |
SICPPSDK_INLINE | CMatrix4 (double in_d00, double in_d01, double in_d02, double in_d03, double in_d10, double in_d11, double in_d12, double in_d13, double in_d20, double in_d21, double in_d22, double in_d23, double in_d30, double in_d31, double in_d32, double in_d33) |
SICPPSDK_INLINE | CMatrix4 (const CMatrix4 &in_matrix4) |
SICPPSDK_INLINE | ~CMatrix4 () |
SICPPSDK_INLINE CMatrix4 & | operator= (const CMatrix4 &in_matrix4) |
SICPPSDK_INLINE CMatrix4 & | operator*= (const CMatrix4 &in_matrix4) |
SICPPSDK_INLINE CMatrix4 & | SetIdentity () |
bool | InvertInPlace () |
bool | Invert (const CMatrix4 &in_matrix4) |
bool | TransposeInverseInPlace () |
bool | TransposeInverse (const CMatrix4 &in_matrix4) |
void | TransposeInPlace () |
SICPPSDK_INLINE void | Transpose (const CMatrix4 &in_matrix4) |
SICPPSDK_INLINE CMatrix4 & | MulInPlace (const CMatrix4 &in_matrix4) |
SICPPSDK_INLINE CMatrix4 & | Mul (const CMatrix4 &in_matrix4A, const CMatrix4 &in_matrix4B) |
SICPPSDK_INLINE void | Get (double &io_d00, double &io_d01, double &io_d02, double &io_d03, double &io_d10, double &io_d11, double &io_d12, double &io_d13, double &io_d20, double &io_d21, double &io_d22, double &io_d23, double &io_d30, double &io_d31, double &io_d32, double &io_d33) const |
SICPPSDK_INLINE void | Set (double in_d00, double in_d01, double in_d02, double in_d03, double in_d10, double in_d11, double in_d12, double in_d13, double in_d20, double in_d21, double in_d22, double in_d23, double in_d30, double in_d31, double in_d32, double in_d33) |
SICPPSDK_INLINE void | Set (const double in_vals[4][4]) |
SICPPSDK_INLINE double | GetValue (short in_sRow, short in_sCol) const |
SICPPSDK_INLINE void | SetValue (short in_sRow, short in_sCol, double in_dVal) |
bool | EpsilonEquals (const CMatrix4 &in_matrix4, double in_dEpsilon) const |
SICPPSDK_INLINE bool | Equals (const CMatrix4 &in_matrix4) const |
SICPPSDK_INLINE bool | operator== (const CMatrix4 &in_matrix4) const |
SICPPSDK_INLINE bool | operator!= (const CMatrix4 &in_matrix4) const |
SICPPSDK_INLINE CMatrix4 | ( | ) |
Default constructor.
SICPPSDK_INLINE CMatrix4 | ( | double | in_d00, |
double | in_d01, | ||
double | in_d02, | ||
double | in_d03, | ||
double | in_d10, | ||
double | in_d11, | ||
double | in_d12, | ||
double | in_d13, | ||
double | in_d20, | ||
double | in_d21, | ||
double | in_d22, | ||
double | in_d23, | ||
double | in_d30, | ||
double | in_d31, | ||
double | in_d32, | ||
double | in_d33 | ||
) |
Constructor.
in_d00 | Value to set to this matrix[0,0]. |
in_d01 | Value to set to this matrix[0,1]. |
in_d02 | Value to set to this matrix[0,2]. |
in_d03 | Value to set to this matrix[0,3]. |
in_d10 | Value to set to this matrix[1,0]. |
in_d11 | Value to set to this matrix[1,1]. |
in_d12 | Value to set to this matrix[1,2]. |
in_d13 | Value to set to this matrix[1,3]. |
in_d20 | Value to set to this matrix[2,0]. |
in_d21 | Value to set to this matrix[2,1]. |
in_d22 | Value to set to this matrix[2,2]. |
in_d23 | Value to set to this matrix[2,3]. |
in_d30 | Value to set to this matrix[3,0]. |
in_d31 | Value to set to this matrix[3,1]. |
in_d32 | Value to set to this matrix[3,2]. |
in_d33 | Value to set to this matrix[3,3]. |
Copy constructor.
in_matrix4 | constant class object. |
SICPPSDK_INLINE ~CMatrix4 | ( | ) |
Default destructor.
Assignment operator.
in_matrix4 | constant class object. |
Right-multiplies this CMatrix4 object by the specified matrix and stores the result into this matrix (this = this . in_matrix4).
in_matrix4 | matrix to be multiplied with. |
SICPPSDK_INLINE CMatrix4 & SetIdentity | ( | ) |
Sets this CMatrix4 object to the identity matrix (this = id).
bool InvertInPlace | ( | ) |
Inverts this CMatrix4 object (if not singular) (this = this^-1).
bool Invert | ( | const CMatrix4 & | in_matrix4 | ) |
Inverts this CMatrix4 object (if not singular) (this = this^-1).
in_matrix4 | matrix to be inverted. |
bool TransposeInverseInPlace | ( | ) |
Sets this CMatrix4 object to the transpose of the inverse of itself (if not singular) (this = Transpose(this^-1)).
bool TransposeInverse | ( | const CMatrix4 & | in_matrix4 | ) |
Sets this CMatrix4 object to the transpose of the inverse of the input matrix (if not singular) (this = Transpose(in_matrix4^-1)).
in_matrix4 | matrix to be inversed and transposed. |
SICPPSDK_INLINE void TransposeInPlace | ( | ) |
Transposes this CMatrix4 object in place (this = Transpose(this)).
SICPPSDK_INLINE void Transpose | ( | const CMatrix4 & | in_matrix4 | ) |
Transposes in_matrix and stores the result in this CMatrix4 object (this = Transpose(in_matrix4)).
in_matrix4 | matrix to be inversed and transposed. |
Right-multiplies this matrix by the matrix m and stores the result in this CMatrix4 object (this = this . in_matrix4).
in_matrix4 | matrix to be multiplied with. |
Right-multiplies matrix A by matrix B and stores the result in this CMatrix4 object (this = in_matrix4A . in_matrix4B).
in_matrix4A | matrix |
in_matrix4B | matrix |
SICPPSDK_INLINE void Get | ( | double & | io_d00, |
double & | io_d01, | ||
double & | io_d02, | ||
double & | io_d03, | ||
double & | io_d10, | ||
double & | io_d11, | ||
double & | io_d12, | ||
double & | io_d13, | ||
double & | io_d20, | ||
double & | io_d21, | ||
double & | io_d22, | ||
double & | io_d23, | ||
double & | io_d30, | ||
double & | io_d31, | ||
double & | io_d32, | ||
double & | io_d33 | ||
) | const |
Gets the 16 components of this matrix.
io_d00 | Value of this matrix[0,0]. |
io_d01 | Value of this matrix[0,1]. |
io_d02 | Value of this matrix[0,2]. |
io_d03 | Value of this matrix[0,3]. |
io_d10 | Value of this matrix[1,0]. |
io_d11 | Value of this matrix[1,1]. |
io_d12 | Value of this matrix[1,2]. |
io_d13 | Value of this matrix[1,3]. |
io_d20 | Value of this matrix[2,0]. |
io_d21 | Value of this matrix[2,1]. |
io_d22 | Value of this matrix[2,2]. |
io_d23 | Value of this matrix[2,3]. |
io_d30 | Value of this matrix[3,0]. |
io_d31 | Value of this matrix[3,1]. |
io_d32 | Value of this matrix[3,2]. |
io_d33 | Value of this matrix[3,3]. |
SICPPSDK_INLINE void Set | ( | double | in_d00, |
double | in_d01, | ||
double | in_d02, | ||
double | in_d03, | ||
double | in_d10, | ||
double | in_d11, | ||
double | in_d12, | ||
double | in_d13, | ||
double | in_d20, | ||
double | in_d21, | ||
double | in_d22, | ||
double | in_d23, | ||
double | in_d30, | ||
double | in_d31, | ||
double | in_d32, | ||
double | in_d33 | ||
) |
Sets the 16 components of this matrix.
in_d00 | Value to set in this matrix[0,0]. |
in_d01 | Value to set in this matrix[0,1]. |
in_d02 | Value to set in this matrix[0,2]. |
in_d03 | Value to set in this matrix[0,3]. |
in_d10 | Value to set in this matrix[1,0]. |
in_d11 | Value to set in this matrix[1,1]. |
in_d12 | Value to set in this matrix[1,2]. |
in_d13 | Value to set in this matrix[1,3]. |
in_d20 | Value to set in this matrix[2,0]. |
in_d21 | Value to set in this matrix[2,1]. |
in_d22 | Value to set in this matrix[2,2]. |
in_d23 | Value to set in this matrix[2,3]. |
in_d30 | Value to set in this matrix[3,0]. |
in_d31 | Value to set in this matrix[3,1]. |
in_d32 | Value to set in this matrix[3,2]. |
in_d33 | Value to set in this matrix[3,3]. |
SICPPSDK_INLINE void Set | ( | const double | in_vals[4][4] | ) |
Sets the 16 components of this matrix.
in_vals | values for the matrix. |
SICPPSDK_INLINE double GetValue | ( | short | in_sRow, |
short | in_sCol | ||
) | const |
SICPPSDK_INLINE void SetValue | ( | short | in_sRow, |
short | in_sCol, | ||
double | in_dVal | ||
) |
Sets the (i,j)th value of this CMatrix4 object.
in_sRow | access to the i th row |
in_sCol | access to the j th column |
in_dVal | new value |
bool EpsilonEquals | ( | const CMatrix4 & | in_matrix4, |
double | in_dEpsilon | ||
) | const |
Tests the equality of this CMatrix4 object with the specified matrix, with a tolerance of Epsilon.
in_matrix4 | Operand matrix. |
in_dEpsilon | Error margin Possible Values: [0, +INF[ should be a positive value |
SICPPSDK_INLINE bool Equals | ( | const CMatrix4 & | in_matrix4 | ) | const |
Tests the strict equality of this CMatrix4 object with the specified matrix.
in_matrix4 | Operand matrix. |
SICPPSDK_INLINE bool operator== | ( | const CMatrix4 & | in_matrix4 | ) | const |
Equality operator. Tests the strict equality of this CMatrix4 object with the specified matrix.
in_matrix4 | Operand matrix4. |
SICPPSDK_INLINE bool operator!= | ( | const CMatrix4 & | in_matrix4 | ) | const |
Inequality operator. Tests the strict inequality of this CMatrix4 object with the specified matrix.
in_matrix4 | Operand matrix. |