#include <SIBCXfoMatd.h>
Inheritance diagram for CSIBCXfoMatd:

Public Member Functions |
|
| CSIBCXfoMatd (void) | |
| CSIBCXfoMatd (const CSIBCVector4Dd &in_vct0, const CSIBCVector4Dd &in_vct1, const CSIBCVector4Dd &in_vct2, const CSIBCVector4Dd &in_vct3, const bool in_bAreRows=true) | |
| CSIBCXfoMatd (const double in_dA00, const double in_dA01, const double in_dA02, const double in_dA03, const double in_dA10, const double in_dA11, const double in_dA12, const double in_dA13, const double in_dA20, const double in_dA21, const double in_dA22, const double in_dA23, const double in_dA30, const double in_dA31, const double in_dA32, const double in_dA33) | |
| double | Get (const int in_nRow, const int in_nCol) const |
| const double * | GetArray () const |
| CSIBCXfoMatd & | Set (int in_nRow, int in_nCol, const double in_dVal) |
| CSIBCXfoMatd & | Set (double in_dVal[4][4]) |
| CSIBCXfoMatd & | Set (double in_dVal[3][3]) |
| CSIBCXfoMatd & | Set (const CSIBCMatrix44d &in_mat) |
| CSIBCXfoMatd & | Set (const CSIBCMatrix33d &in_mat) |
| CSIBCXfoMatd & | Set (const CSIBCXfoMatd &in_mat) |
| CSIBCXfoMatd & | Set (const CSIBCRotMatd &in_mat) |
| CSIBCXfoMatd & | SetWithTranspose (const CSIBCRotMatd &in_mat) |
| CSIBCXfoMatd & | SetRow (const int in_nRow, const CSIBCVector4Dd &in_vct) |
| CSIBCXfoMatd & | SetRow (const int in_nRow, double in_dA0, double in_dA1, double in_dA2, double in_dA3) |
| CSIBCXfoMatd & | SetCol (const int in_nCol, const CSIBCVector4Dd &in_vct) |
| CSIBCXfoMatd & | SetCol (const int in_nCol, double in_dA0, double in_dA1, double in_dA2, double in_dA3) |
| CSIBCXfoMatd & | SetIdentity (void) |
| bool | operator== (const CSIBCMatrix44d &in_mat) const |
| bool | operator!= (const CSIBCMatrix44d &in_mat) const |
| CSIBCXfoMatd & | Mul (const CSIBCXfoMatd &in_mat1, const CSIBCXfoMatd &in_mat2) |
| CSIBCXfoMatd & | Mul (const CSIBCXfoMatd &in_mat) |
| CSIBCXfoMatd & | Mul (const CSIBCXfoMatd &in_xfomat, const CSIBCRotMatd &in_rotmat) |
| CSIBCXfoMatd & | Mul (const CSIBCRotMatd &in_rotmat, const CSIBCXfoMatd &in_xfomat) |
| CSIBCXfoMatd & | MulTransByReg (const CSIBCRotMatd &in_rotmat, const CSIBCXfoMatd &in_xfomat) |
| double | GetDet (void) const |
| double | GetDet33 (void) const |
| double | GetTrace (void) const |
| CSIBCXfoMatd & | Transpose (const CSIBCXfoMatd &in_mat) |
| CSIBCXfoMatd & | Transpose (void) |
| bool | Invert (const CSIBCXfoMatd &in_mat) |
| bool | Invert (void) |
| CSIBCVector3Dd & | GetTranslation (CSIBCVector3Dd &out_vctTrs) const |
| CSIBCXfoMatd & | SetTranslation (const CSIBCVector3Dd &in_vctTrs) |
| CSIBCXfoMatd & | AddTranslation (const CSIBCVector3Dd &in_vctTrs) |
| CSIBCRotMatd & | GetRotation (CSIBCRotMatd &out_matRot) const |
| CSIBCRotationd & | GetRotation (CSIBCRotationd &out_rot) const |
| CSIBCXfoMatd & | SetRotation (const CSIBCRotMatd &in_matRot) |
| CSIBCXfoMatd & | AddRotation (const CSIBCRotMatd &in_matRot) |
| CSIBCVector3Dd & | GetScaling (CSIBCVector3Dd &out_vctScl) const |
| CSIBCXfoMatd & | SetScaling (const CSIBCVector3Dd &in_vctScl) |
| CSIBCXfoMatd & | AddScaling (const CSIBCVector3Dd &in_vctScl, bool in_bPreScaling=true) |
| void | SetScalingAndRotation (const CSIBCVector3Dd &in_vctScl, CSIBCRotationd &in_rot) |
| void | GetScalingAndRotation (CSIBCVector3Dd &out_vctScl, CSIBCRotationd &out_rot) const |
| void | GetAffineDecomposition (CSIBCRotMatd &out_sclRot, CSIBCXfoMatd &out_matSRT) const |
Friends |
|
| bool | AreAlmostEqual (const CSIBCXfoMatd &in_mat1, const CSIBCXfoMatd &in_mat2, const double in_dEpsilon=HEXA_EPS) |
CSIBCXfoMatd is a specialized 4X4 matrix that represents transformations. It uses double precision floating-point numbers for its data, and operations (as it is derived from CSIBCMatrix44d).
Although transformations may be defined simply with any generic 4X4, this class provides extra methods to make specifying and working with transformation matricies easier. A class for general transformations, independent of matrix form is provided in CSIBCTranfod.
There are several other matrix classes aswell. Classes with specific applications, such as CSIBCRotMatd used for representing rotation matricies, Other matrix classes are not as specialized as CSIBCRotMatd or CSIBCXfoMatd, and are used to represent general matricies. These classes include CSIBCMatrix4x4, CSIBCMatrix44d and CSIBCMartrix33d.
| CSIBCXfoMatd | ( | void | ) |
Default constructor Sets the new matrix to be the identity matrix.
| CSIBCXfoMatd | ( | const CSIBCVector4Dd & | in_vct0, | |
| const CSIBCVector4Dd & | in_vct1, | |||
| const CSIBCVector4Dd & | in_vct2, | |||
| const CSIBCVector4Dd & | in_vct3, | |||
| const bool | in_bAreRows = true |
|||
| ) |
Constructor. Sets the rows of the new matrix to be in_vct0, in_vct1, in_vct2, and in_vct3. If in_bAreRows is false, then the input vectors are used as the columns of the new matrix.
| in_vct0 | The vector to use for the first row (or column) of the matrix. | |
| in_vct1 | The vector to use for the second row (or column) of the matrix. | |
| in_vct2 | The vector to use for the third row (or column) of the matrix. | |
| in_vct3 | The vector to use for the fourth row (or column) of the matrix. | |
| in_bAreRows | Whether the vectors given represent rows or columns of the matrix (true == Rows, false == Columns). Defaults to true (rows). |
| CSIBCXfoMatd | ( | const double | in_dA00, | |
| const double | in_dA01, | |||
| const double | in_dA02, | |||
| const double | in_dA03, | |||
| const double | in_dA10, | |||
| const double | in_dA11, | |||
| const double | in_dA12, | |||
| const double | in_dA13, | |||
| const double | in_dA20, | |||
| const double | in_dA21, | |||
| const double | in_dA22, | |||
| const double | in_dA23, | |||
| const double | in_dA30, | |||
| const double | in_dA31, | |||
| const double | in_dA32, | |||
| const double | in_dA33 | |||
| ) |
Constructor. Specifies the value of each element in the new matrix.
| in_dA00 | The value for the element in row 1, column 1. | |
| in_dA01 | The value for the element in row 1, column 2. | |
| in_dA02 | The value for the element in row 1, column 3. | |
| in_dA03 | The value for the element in row 1, column 4. | |
| in_dA10 | The value for the element in row 2, column 1. | |
| in_dA11 | The value for the element in row 2, column 2. | |
| in_dA12 | The value for the element in row 2, column 3. | |
| in_dA13 | The value for the element in row 2, column 4. | |
| in_dA20 | The value for the element in row 3, column 1. | |
| in_dA21 | The value for the element in row 3, column 2. | |
| in_dA22 | The value for the element in row 3, column 3. | |
| in_dA23 | The value for the element in row 3, column 4. | |
| in_dA30 | The value for the element in row 4, column 1. | |
| in_dA31 | The value for the element in row 4, column 2. | |
| in_dA32 | The value for the element in row 4, column 3. | |
| in_dA33 | The value for the element in row 4, column 4. |
| double Get | ( | const int | in_nRow, | |
| const int | in_nCol | |||
| ) | const |
Returns an element of the marix.
| in_nRow | Row index of the element to retrieve (zero indexed). | |
| in_nCol | Column index of the element to retrieve (zero indexed). |
Reimplemented from CSIBCMatrix44d.
Returns a pointer to the 4X4 array containing the data for this matrix. Note that the pointer returned from this function should not be freed. Any modification to the array results in modification of this object directly.
Sets an element of the matrix.
| in_nRow | Row index of the element to set (zero indexed). | |
| in_nCol | Column index of the element to set (zero indexed). | |
| in_dVal | Value for the element. |
Reimplemented from CSIBCMatrix44d.
| CSIBCXfoMatd& Set | ( | double | in_dVal[4][4] | ) |
Sets all elements of the matrix.
| in_dVal | 4x4 array of double values, containing the new values for all the matrix elements. |
Reimplemented from CSIBCMatrix44d.
| CSIBCXfoMatd& Set | ( | double | in_dVal[3][3] | ) |
Sets the top-left submatrix of this matrix.
| in_dVal | 3x3 array of double values, containing the new values for the elements of the top-left submatrix. |
| CSIBCXfoMatd& Set | ( | const CSIBCMatrix44d & | in_mat | ) |
Sets all elements of the matrix to those contained in in_mat.
| in_mat | Matrix to copy all element values from. |
Reimplemented from CSIBCMatrix44d.
| CSIBCXfoMatd& Set | ( | const CSIBCMatrix33d & | in_mat | ) |
Sets all elements of the top-left submatrix of this matrix to those contained in in_mat.
| in_mat | Matrix to copy top-left submatrix element value from. |
| CSIBCXfoMatd& Set | ( | const CSIBCXfoMatd & | in_mat | ) |
Sets all elements of the matrix to those contained in in_mat.
| in_mat | Matrix to copy all element values from. |
| CSIBCXfoMatd& Set | ( | const CSIBCRotMatd & | in_mat | ) |
Sets the transformation matrix to be a pure rotation, defined by in_mat.
| in_mat | Rotation to set this transformation matrix to. |
Sets the transformation matrix to be a pure rotation, defined by the transpose of in_mat.
| in_mat | Rotation transpose to set this transformation matrix to. |
Sets all elements in a row of the matrix.
| in_nRow | Row index of the row to set (zero indexed). | |
| in_vct | Vector containing the values to replace the specified row elements with. |
Reimplemented from CSIBCMatrix44d.
| CSIBCXfoMatd& SetRow | ( | const int | in_nRow, | |
| double | in_dA0, | |||
| double | in_dA1, | |||
| double | in_dA2, | |||
| double | in_dA3 | |||
| ) |
Sets all elements in a row of the matrix.
| in_nRow | Row index of the row to set (zero indexed). | |
| in_dA0 | Value for the element in the first column of the row. | |
| in_dA1 | Value for the element in the second column of the row. | |
| in_dA2 | Value for the element in the third column of the row. | |
| in_dA3 | Value for the element in the fourth column of the row. |
Reimplemented from CSIBCMatrix44d.
Sets all elements in a column of the matrix.
| in_nCol | Column index of the column to set (zero indexed). | |
| in_vct | Vector containing the values to replace the specified column elements with. |
Reimplemented from CSIBCMatrix44d.
| CSIBCXfoMatd& SetCol | ( | const int | in_nCol, | |
| double | in_dA0, | |||
| double | in_dA1, | |||
| double | in_dA2, | |||
| double | in_dA3 | |||
| ) |
Sets all elements in a column of the matrix.
| in_nCol | Column index of the column to set (zero indexed). | |
| in_dA0 | Value for the element in the first row of the column. | |
| in_dA1 | Value for the element in the second row of the column. | |
| in_dA2 | Value for the element in the third row of the column. | |
| in_dA3 | Value for the element in the fourth row of the column. |
Reimplemented from CSIBCMatrix44d.
Sets this matrix to be the identity matrix.
Reimplemented from CSIBCMatrix44d.
Determines whether all corresponding elements of this matrix and in_mat are exactly equal.
| in_mat | The matrix to compare equality with. |
Reimplemented from CSIBCMatrix44d.
Determines whether any corresponding elements of this matrix and in_mat are different.
| in_mat | The matrix to compare inequality with. |
Reimplemented from CSIBCMatrix44d.
Computes the matrix multiplication of two matricies (in_mat1 * in_mat2) and stores the result in this matrix.
| in_mat1 | The first matrix in the multiplication (on the left). | |
| in_mat2 | The second matrix in the multiplication (on the right). |
| CSIBCXfoMatd& Mul | ( | const CSIBCXfoMatd & | in_mat | ) |
Computes the matrix multiplication of this matrix and in_mat (this * in_mat) and stores the result in this matrix.
| in_mat | The matrix to right-multiply this matrix by. |
| CSIBCXfoMatd& Mul | ( | const CSIBCXfoMatd & | in_xfomat, | |
| const CSIBCRotMatd & | in_rotmat | |||
| ) |
Computes the matrix multiplication of two matricies (in_mat1 * in_mat2) and stores the result in this matrix.
| in_mat1 | The tranformation matrix in the multiplication (on the left). | |
| in_mat2 | The pure rotation matrix in the multiplication (on the right). |
| CSIBCXfoMatd& Mul | ( | const CSIBCRotMatd & | in_rotmat, | |
| const CSIBCXfoMatd & | in_xfomat | |||
| ) |
Computes the matrix multiplication of two matricies (in_mat1 * in_mat2) and stores the result in this matrix.
| in_mat1 | The pure rotation matrix in the multiplication (on the left). | |
| in_mat2 | The tranformation matrix in the multiplication (on the right). |
Computes the matrix multiplication of the transpose of in_mat1 and in_mat2 (in_mat1^T * in_mat2) and stores the result in this matrix.
| in_mat1 | The first matrix in the multiplication (on the left), to be transposed before multiplication. | |
| in_mat2 | The second matrix in the multiplication (on the right). |
Computes the determinant of this matrix.
Reimplemented from CSIBCMatrix44d.
Computes the determines of the top-left 3x3 submatrix of this matrix.
Computes the trace of this matrix. A trace is the sum of all the diagonal elements of a matrix.
Reimplemented from CSIBCMatrix44d.
Sets this matrix to be the transpose of in_mat.
| in_mat | Matrix containing the transpose of the desired matrix. |
| CSIBCXfoMatd& Transpose | ( | void | ) |
Sets this matrix to its transpose.
Reimplemented from CSIBCMatrix44d.
Sets this matrix to be the inverse of in_mat.
| in_mat | Matrix containing the inverse of the desired matrix. |
in_mat could be inverted and the assignment was successful, false otherwise. | bool Invert | ( | void | ) |
Sets this matrix to its inverse.
Reimplemented from CSIBCMatrix44d.
Gets the translation contained in this matrix.
| out_vctTrs | Receives the translation in the X, Y and Z directions. |
out_vctTrs. Sets the translation contained in this matrix.
| in_vctTrs | Vector containing the translations in the X, Y and Z directions. |
Adds a translation to the translation in this matrix.
| in_vctTrs | Vector containing the translations to add in the X, Y and Z directions. |
Gets the rotation matrix contained in this matrix as a rotation matrix.
| out_matRot | Receives the rotation matrix. |
out_matRot. | CSIBCRotationd& GetRotation | ( | CSIBCRotationd & | out_rot | ) | const |
Gets the rotation matrix contained in this matrix as a rotation object.
| out_rot | Receives the rotation object. |
out_rot. Sets the rotation contained in this matrix.
| in_matRot | Rotation matrix containing the rotation to set for this matrix. |
Adds a rotation to the rotation in this matrix.
| in_matRot | Rotation matrix containing the rotation to add. |
Gets the scaling of this matrix.
| out_vctScl | Receives the scaling components in the X, Y and Z directions. |
out_vctScl. Sets the scaling of this matrix.
| in_vctScl | Vector containing the scaling in the X, Y and Z directions. |
Adds scaling to this matrix.
| in_vctScl | Vector containing the scaling to add in the X, Y and Z directions. | |
| in_bPreScaling | Whether the scaling operations should be applied before or after the translation in this matrix. if true scaling operations are applied before, false if scaling operations are to be applied after. |
Sets the scaling and rotation for this transformation matrix. Note that it is faster to use this method, than a combination of CSIBCXfoMatd::SetScaling, and CSIBCXfoMatd::SetRotation.
| in_vctScl | Vector containing the scaling in the X, Y and Z directions. | |
| in_rot | Rotation object containing the rotation for this matrix. |
Gets the scaling and rotation for this transformation matrix. Note that it is faster to use this method, than a combination of CSIBCXfoMatd::GetScaling, and CSIBCXfoMatd::GetRotation.
| out_vct | Receives the scaling components in the X, Y and Z directions. | |
| out_rot | Receives the rotation object for this matrix. |
Gets the affine tranformation represented by this transformation matrix.
| out_sclRot | Receives the affine scaling/rotation matrix associated with this transformation matrix. | |
| out_matSRT | Receives the affine transformation matrix associated with this transformation matrix. |
| bool AreAlmostEqual | ( | const CSIBCXfoMatd & | in_mat1, | |
| const CSIBCXfoMatd & | in_mat2, | |||
| const double | in_dEpsilon = HEXA_EPS |
|||
| ) | [friend] |
Determines whether all corresponding elements of the matricies in_mat1 and in_mat2 are equal. Since this method uses floating-point comparison, a threshhold value of in_dEpsilon is used for equality comparison.
| in_mat1 | First matrix for equality comparison. | |
| in_mat2 | Second matrix for equality comparison. | |
| in_dEpsilon | Floating-point comparison error range. Defaults to HEXA_EPS. |