GLC_Matrix4x4 is a 4 dimensions Matrix. More...
#include <glc_matrix4x4.h>
Public Member Functions | |
Constructor | |
| GLC_Matrix4x4 () | |
| Construct an identity matrix. | |
| GLC_Matrix4x4 (const GLC_Matrix4x4 &matrix) | |
| Construct a matrix from another matrix. | |
| GLC_Matrix4x4 (const double *pArray) | |
| Construct a matrix from an array of 16 double elements. | |
| GLC_Matrix4x4 (const float *) | |
| Construct a Matrix from an array of 16 float elements. | |
| GLC_Matrix4x4 (const GLC_Vector3d &Vect, const double &dAngleRad) | |
| Construct rotation matrix from a 3d vector and an angle in radians. | |
| GLC_Matrix4x4 (const GLC_Vector3d &Vect1, const GLC_Vector3d &Vect2) | |
| Construct rotation matrix from 2 3d vectors. | |
| GLC_Matrix4x4 (const GLC_Vector3d &Vect) | |
| Construct translation matrix from a 3d vector. | |
| GLC_Matrix4x4 (const double Tx, const double Ty, const double Tz) | |
| Construct translation matrix from coordinates in double. | |
Operator Overload | |
| GLC_Matrix4x4 | operator* (const GLC_Matrix4x4 &Mat) const |
| Return the product of this matrix to the given matrix. | |
| GLC_Vector3d | operator* (const GLC_Vector3d &Vect) const |
| Return the result of transforming the given vector by this matrix. | |
| bool | operator== (const GLC_Matrix4x4 &mat) const |
| Return true if this matrix is equal to the given matrix. | |
| bool | operator!= (const GLC_Matrix4x4 &mat) const |
| Return true if this matrix is not equal to the given matrix. | |
Get Function | |
| double | determinant (void) const |
| Return the determinant of this matrix. | |
| const double * | data (void) const |
| Return a const pointer to the row first array of 16 elements of this matrix. | |
| double * | data (void) |
| Return a pointer to the row first array of 16 elements of this matrix. | |
| QVector< double > | toEuler (void) const |
| Return a QVector<double> which contains radians Euler angle of this matrix. | |
| QString | toString () const |
| Return the string representation of this matrix. | |
| GLC_Matrix4x4 | rotationMatrix () const |
| Return the rotation matrix of this matrix. | |
| GLC_Matrix4x4 | isometricMatrix () const |
| Return the isometric matrix of this matrix. | |
| double | scalingX () const |
| Return the x Scaling of this matrix. | |
| double | scalingY () const |
| Return the y Scaling of this matrix. | |
| double | scalingZ () const |
| Return the z Scaling of this matrix. | |
| GLC_Matrix4x4 | inverted () const |
| Return the inverse of this matrix. | |
Set Function | |
| GLC_Matrix4x4 & | setMatRot (const GLC_Vector3d &, const double &) |
| Set this matrix to a rotation matrix given by a 3d vector and an angle in radian. | |
| GLC_Matrix4x4 & | setMatRot (const GLC_Vector3d &, const GLC_Vector3d &) |
| Set this matrix to a rotation matrix given by 2 3d vectors. | |
| GLC_Matrix4x4 & | setMatTranslate (const GLC_Vector3d &) |
| Set this matrix to a translation matrix given by a 3d vector. | |
| GLC_Matrix4x4 & | setMatTranslate (const double, const double, const double) |
| Set this matrix to a translation matrix given by 3 double coordinates. | |
| GLC_Matrix4x4 & | setMatScaling (const double, const double, const double) |
| Set this matrix to a scaling matrix define by 3 double. | |
| GLC_Matrix4x4 & | invert (void) |
| Inverse this Matrix and return a reference to this matrix. | |
| GLC_Matrix4x4 & | setToIdentity () |
| Set this matrix to the identify matrix and return a reference to this matrix. | |
| GLC_Matrix4x4 & | transpose (void) |
| Transpose this matrix and return a reference to this matrix. | |
| GLC_Matrix4x4 & | fromEuler (const double, const double, const double) |
| Set this matrix with Euler angle and return a reference to this matrix. | |
| GLC_Matrix4x4 & | setColumn (int index, const GLC_Vector3d &vector) |
| Set this matrix column from the given 3d vector. | |
Private Types | |
| enum | { TAILLEMAT4X4 = 16 } |
Number of elements in the matrix. More... | |
| enum | { DIMMAT4X4 = 4 } |
Matrix size. More... | |
Private Member Functions | |
| bool | isInDiagonal (const int index) const |
| Return true if the index (argument) is in the diagonal of this matrix. | |
| double | getDeterminantLC (const int, const int) const |
| Return the determinant of this matrix cell given from 2 int. | |
| void | getSubMat (const int, const int, double *) const |
| Compute Sub 3X3 matrix given by 2 int and set the given double pointeur. | |
| GLC_Matrix4x4 | getTranspose (void) const |
| Return the transpose matrix of this matrix. | |
| GLC_Matrix4x4 | getCoMat4x4 (void) const |
| Return the co-matrix of this matrix. | |
Private Attributes | |
| double | m_Matrix [TAILLEMAT4X4] |
| Matrix row first array. | |
Friends | |
| class | GLC_Vector3d |
GLC_Matrix4x4 is a 4 dimensions Matrix.
GLC_Matrix4x4 is used to represent 3d homogeneous transformation in 3d space
GLC_Matrix4x4 is a row first matrix compatible with OpenGL Matrix
Definition at line 43 of file glc_matrix4x4.h.
anonymous enum [private] |
Number of elements in the matrix.
Definition at line 219 of file glc_matrix4x4.h.
anonymous enum [private] |
| GLC_Matrix4x4::GLC_Matrix4x4 | ( | ) | [inline] |
Construct an identity matrix.
Definition at line 253 of file glc_matrix4x4.h.
References setToIdentity().
| GLC_Matrix4x4::GLC_Matrix4x4 | ( | const GLC_Matrix4x4 & | matrix | ) | [inline] |
Construct a matrix from another matrix.
Definition at line 57 of file glc_matrix4x4.h.
References m_Matrix.
| GLC_Matrix4x4::GLC_Matrix4x4 | ( | const double * | pArray | ) | [inline] |
Construct a matrix from an array of 16 double elements.
Definition at line 61 of file glc_matrix4x4.h.
| GLC_Matrix4x4::GLC_Matrix4x4 | ( | const float * | Tableau | ) | [inline] |
Construct a Matrix from an array of 16 float elements.
Definition at line 258 of file glc_matrix4x4.h.
References m_Matrix, and TAILLEMAT4X4.
| GLC_Matrix4x4::GLC_Matrix4x4 | ( | const GLC_Vector3d & | Vect, | |
| const double & | dAngleRad | |||
| ) | [inline] |
Construct rotation matrix from a 3d vector and an angle in radians.
Definition at line 266 of file glc_matrix4x4.h.
References setMatRot(), and setToIdentity().
| GLC_Matrix4x4::GLC_Matrix4x4 | ( | const GLC_Vector3d & | Vect1, | |
| const GLC_Vector3d & | Vect2 | |||
| ) | [inline] |
Construct rotation matrix from 2 3d vectors.
Definition at line 272 of file glc_matrix4x4.h.
References setMatRot(), and setToIdentity().
| GLC_Matrix4x4::GLC_Matrix4x4 | ( | const GLC_Vector3d & | Vect | ) | [inline] |
Construct translation matrix from a 3d vector.
Definition at line 74 of file glc_matrix4x4.h.
| GLC_Matrix4x4::GLC_Matrix4x4 | ( | const double | Tx, | |
| const double | Ty, | |||
| const double | Tz | |||
| ) | [inline] |
Construct translation matrix from coordinates in double.
Definition at line 78 of file glc_matrix4x4.h.
| double* GLC_Matrix4x4::data | ( | void | ) | [inline] |
Return a pointer to the row first array of 16 elements of this matrix.
Definition at line 115 of file glc_matrix4x4.h.
| const double* GLC_Matrix4x4::data | ( | void | ) | const [inline] |
Return a const pointer to the row first array of 16 elements of this matrix.
Definition at line 111 of file glc_matrix4x4.h.
Referenced by GLC_Camera::createMatComp(), GLC_3dsToWorld::createMeshes(), GLC_WorldTo3dxml::matrixString(), GLC_Viewport::unproject(), GLC_Viewport::unProject(), GLC_Frustum::update(), and GLC_Viewport::updateProjectionMat().
| double GLC_Matrix4x4::determinant | ( | void | ) | const [inline] |
Return the determinant of this matrix.
Definition at line 530 of file glc_matrix4x4.h.
References DIMMAT4X4, getDeterminant3x3(), getSubMat(), and m_Matrix.
Referenced by invert().
| GLC_Matrix4x4 & GLC_Matrix4x4::fromEuler | ( | const double | angle_x, | |
| const double | angle_y, | |||
| const double | angle_z | |||
| ) |
Set this matrix with Euler angle and return a reference to this matrix.
Definition at line 34 of file glc_matrix4x4.cpp.
References m_Matrix.
| GLC_Matrix4x4 GLC_Matrix4x4::getCoMat4x4 | ( | void | ) | const [inline, private] |
Return the co-matrix of this matrix.
Definition at line 615 of file glc_matrix4x4.h.
References DIMMAT4X4, getDeterminant3x3(), getSubMat(), and m_Matrix.
Referenced by invert().
| double GLC_Matrix4x4::getDeterminantLC | ( | const int | Ligne, | |
| const int | Colonne | |||
| ) | const [inline, private] |
Return the determinant of this matrix cell given from 2 int.
Definition at line 546 of file glc_matrix4x4.h.
References DIMMAT4X4, getDeterminant3x3(), getSubMat(), and m_Matrix.
| void GLC_Matrix4x4::getSubMat | ( | const int | Ligne, | |
| const int | Colonne, | |||
| double * | ResultMat | |||
| ) | const [inline, private] |
Compute Sub 3X3 matrix given by 2 int and set the given double pointeur.
Definition at line 561 of file glc_matrix4x4.h.
References DIMMAT4X4, and m_Matrix.
Referenced by determinant(), getCoMat4x4(), and getDeterminantLC().
| GLC_Matrix4x4 GLC_Matrix4x4::getTranspose | ( | void | ) | const [inline, private] |
Return the transpose matrix of this matrix.
Definition at line 596 of file glc_matrix4x4.h.
References DIMMAT4X4, and m_Matrix.
Referenced by invert().
| GLC_Matrix4x4 & GLC_Matrix4x4::invert | ( | void | ) | [inline] |
Inverse this Matrix and return a reference to this matrix.
Definition at line 480 of file glc_matrix4x4.h.
References determinant(), getCoMat4x4(), getTranspose(), m_Matrix, and TAILLEMAT4X4.
Referenced by GLC_3dsToWorld::createMeshes(), GLC_Camera::orbit(), and GLC_Camera::pan().
| GLC_Matrix4x4 GLC_Matrix4x4::inverted | ( | ) | const [inline] |
Return the inverse of this matrix.
Definition at line 143 of file glc_matrix4x4.h.
References GLC_Vector3d::GLC_Matrix4x4.
| bool GLC_Matrix4x4::isInDiagonal | ( | const int | index | ) | const [inline, private] |
Return true if the index (argument) is in the diagonal of this matrix.
Private services Functions
Definition at line 191 of file glc_matrix4x4.h.
| GLC_Matrix4x4 GLC_Matrix4x4::isometricMatrix | ( | ) | const [inline] |
Return the isometric matrix of this matrix.
Definition at line 372 of file glc_matrix4x4.h.
References m_Matrix, scalingX(), scalingY(), and scalingZ().
| bool GLC_Matrix4x4::operator!= | ( | const GLC_Matrix4x4 & | mat | ) | const [inline] |
Return true if this matrix is not equal to the given matrix.
Definition at line 97 of file glc_matrix4x4.h.
References operator==().
| GLC_Vector3d GLC_Matrix4x4::operator* | ( | const GLC_Vector3d & | Vect | ) | const [inline] |
Return the result of transforming the given vector by this matrix.
Definition at line 305 of file glc_matrix4x4.h.
References DIMMAT4X4, m_Matrix, and GLC_Vector3d::m_Vector.
| GLC_Matrix4x4 GLC_Matrix4x4::operator* | ( | const GLC_Matrix4x4 & | Mat | ) | const [inline] |
Return the product of this matrix to the given matrix.
Definition at line 278 of file glc_matrix4x4.h.
| bool GLC_Matrix4x4::operator== | ( | const GLC_Matrix4x4 & | mat | ) | const [inline] |
Return true if this matrix is equal to the given matrix.
Definition at line 336 of file glc_matrix4x4.h.
References m_Matrix, and TAILLEMAT4X4.
| GLC_Matrix4x4 GLC_Matrix4x4::rotationMatrix | ( | ) | const [inline] |
Return the rotation matrix of this matrix.
Definition at line 348 of file glc_matrix4x4.h.
References m_Matrix, scalingX(), scalingY(), and scalingZ().
Referenced by GLC_Camera::move(), GLC_CuttingPlane::moveManipulatorRep(), and GLC_CuttingPlane::rotationNavigator().
| double GLC_Matrix4x4::scalingX | ( | ) | const [inline] |
Return the x Scaling of this matrix.
Definition at line 131 of file glc_matrix4x4.h.
References GLC_Vector3d::GLC_Vector3d().
Referenced by GLC_3DViewInstance::choseLod(), isometricMatrix(), rotationMatrix(), and GLC_OctreeNode::updateViewableInstances().
| double GLC_Matrix4x4::scalingY | ( | ) | const [inline] |
Return the y Scaling of this matrix.
Definition at line 135 of file glc_matrix4x4.h.
References GLC_Vector3d::GLC_Vector3d().
Referenced by isometricMatrix(), and rotationMatrix().
| double GLC_Matrix4x4::scalingZ | ( | ) | const [inline] |
Return the z Scaling of this matrix.
Definition at line 139 of file glc_matrix4x4.h.
References GLC_Vector3d::GLC_Vector3d().
Referenced by isometricMatrix(), and rotationMatrix().
| GLC_Matrix4x4 & GLC_Matrix4x4::setColumn | ( | int | index, | |
| const GLC_Vector3d & | vector | |||
| ) |
Set this matrix column from the given 3d vector.
Definition at line 62 of file glc_matrix4x4.cpp.
References m_Matrix, GLC_Vector3d::x(), GLC_Vector3d::y(), and GLC_Vector3d::z().
Referenced by GLC_Arrow::createWire().
| GLC_Matrix4x4 & GLC_Matrix4x4::setMatRot | ( | const GLC_Vector3d & | Vect1, | |
| const GLC_Vector3d & | Vect2 | |||
| ) | [inline] |
Set this matrix to a rotation matrix given by 2 3d vectors.
Definition at line 434 of file glc_matrix4x4.h.
References GLC_Vector3d::isNull(), and setMatRot().
| GLC_Matrix4x4 & GLC_Matrix4x4::setMatRot | ( | const GLC_Vector3d & | Vect, | |
| const double & | dAngleRad | |||
| ) | [inline] |
Set this matrix to a rotation matrix given by a 3d vector and an angle in radian.
Definition at line 392 of file glc_matrix4x4.h.
References m_Matrix, GLC_Vector3d::m_Vector, and GLC_Vector3d::normalize().
Referenced by GLC_Interpolator::CalcInterpolAngulaireMat(), GLC_CuttingPlane::GLC_CuttingPlane(), GLC_Matrix4x4(), GLC_RepTrackBallMover::GLC_RepTrackBallMover(), GLC_RepTrackBallMover::init(), GLC_Axis::moveManipulatorRep(), setMatRot(), and glc::triangulatePolygon().
| GLC_Matrix4x4 & GLC_Matrix4x4::setMatScaling | ( | const double | sX, | |
| const double | sY, | |||
| const double | sZ | |||
| ) | [inline] |
Set this matrix to a scaling matrix define by 3 double.
Definition at line 469 of file glc_matrix4x4.h.
References m_Matrix.
Referenced by GLC_CuttingPlane::moveManipulatorRep(), GLC_Axis::moveManipulatorRep(), and GLC_ColladaToWorld::scaleNode().
| GLC_Matrix4x4 & GLC_Matrix4x4::setMatTranslate | ( | const double | Tx, | |
| const double | Ty, | |||
| const double | Tz | |||
| ) | [inline] |
Set this matrix to a translation matrix given by 3 double coordinates.
Definition at line 459 of file glc_matrix4x4.h.
References m_Matrix.
| GLC_Matrix4x4 & GLC_Matrix4x4::setMatTranslate | ( | const GLC_Vector3d & | Vect | ) | [inline] |
Set this matrix to a translation matrix given by a 3d vector.
Definition at line 449 of file glc_matrix4x4.h.
References m_Matrix, and GLC_Vector3d::m_Vector.
Referenced by GLC_Interpolator::CalcInterpolLineaireMat(), and GLC_Axis::moveManipulatorRep().
| GLC_Matrix4x4 & GLC_Matrix4x4::setToIdentity | ( | ) | [inline] |
Set this matrix to the identify matrix and return a reference to this matrix.
Definition at line 498 of file glc_matrix4x4.h.
References m_Matrix.
Referenced by GLC_Interpolator::CalcInterpolAngulaireMat(), GLC_Interpolator::CalcInterpolLineaireMat(), GLC_Matrix4x4(), and GLC_3DViewInstance::resetMatrix().
| QVector< double > GLC_Matrix4x4::toEuler | ( | void | ) | const |
Return a QVector<double> which contains radians Euler angle of this matrix.
Definition at line 76 of file glc_matrix4x4.cpp.
| QString GLC_Matrix4x4::toString | ( | ) | const |
Return the string representation of this matrix.
Definition at line 110 of file glc_matrix4x4.cpp.
| GLC_Matrix4x4 & GLC_Matrix4x4::transpose | ( | void | ) | [inline] |
Transpose this matrix and return a reference to this matrix.
Definition at line 508 of file glc_matrix4x4.h.
friend class GLC_Vector3d [friend] |
Definition at line 45 of file glc_matrix4x4.h.
Referenced by GLC_Vector3d::inverted(), GLC_Vector3d::operator*(), GLC_Vector3d::operator+(), GLC_Vector3d::operator-(), and GLC_Vector4d::toVector3d().
double GLC_Matrix4x4::m_Matrix[TAILLEMAT4X4] [private] |
Matrix row first array.
Definition at line 223 of file glc_matrix4x4.h.
Referenced by determinant(), fromEuler(), getCoMat4x4(), getDeterminantLC(), getSubMat(), getTranspose(), GLC_Matrix4x4(), invert(), isometricMatrix(), operator*(), operator==(), rotationMatrix(), setColumn(), setMatRot(), setMatScaling(), setMatTranslate(), setToIdentity(), toEuler(), toString(), and transpose().