![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
A 4x4 'transformation' matrix (column major order) More...
#include <ecvGLMatrixTpl.h>


Public Member Functions | |
| ccGLMatrixTpl (const Eigen::Matrix< float, 4, 4 > &mat) | |
| Copy Function. More... | |
| ccGLMatrixTpl (const Eigen::Matrix< double, 4, 4 > &mat) | |
| ccGLMatrixTpl (const Eigen::Matrix< float, 3, 3 > &mat) | |
| ccGLMatrixTpl (const Eigen::Matrix< double, 3, 3 > &mat) | |
| ccGLMatrixTpl< T > & | operator= (const Eigen::Matrix< float, 4, 4 > &mat) |
| Assignment Function. More... | |
| ccGLMatrixTpl< T > & | operator= (const Eigen::Matrix< double, 4, 4 > &mat) |
| ccGLMatrixTpl< T > & | operator= (const Eigen::Matrix< float, 3, 3 > &mat) |
| ccGLMatrixTpl< T > & | operator= (const Eigen::Matrix< double, 3, 3 > &mat) |
| ccGLMatrixTpl () | |
| Default constructor. More... | |
| ccGLMatrixTpl (const ccGLMatrixTpl< T > &mat) | |
| Copy constructor. More... | |
| ccGLMatrixTpl< T > & | operator= (const ccGLMatrixTpl< T > &mat) |
| Copy assignment operator. More... | |
| ccGLMatrixTpl (const float *mat16f) | |
| Constructor from a float GL matrix array. More... | |
| ccGLMatrixTpl (const double *mat16d) | |
| Constructor from a double GL matrix array. More... | |
| ccGLMatrixTpl (const Vector3Tpl< T > &X, const Vector3Tpl< T > &Y, const Vector3Tpl< T > &Z, const Vector3Tpl< T > &Tr) | |
| Constructor from 4 columns (X,Y,Z,T) More... | |
| void | toQuaternion (T q[]) const |
| Converts to a quaternion from a rotation matrix. More... | |
| void | toAngleAxis (T &alpha_rad, Vector3Tpl< T > &axis3D) const |
| Returns equivalent parameters: a rotation axis and an angle. More... | |
| void | toEulerAngle (T &rz, T &ry, T &rx) const |
| Returns equivalent parameters: 3 rotation angles. More... | |
| QString | toString (int precision=12, QChar separator=' ') const |
| Returns matrix as a string. More... | |
| virtual bool | toAsciiFile (QString filename, int precision=12) const |
| Saves matrix to an ASCII file. More... | |
| virtual bool | fromAsciiFile (QString filename) |
| Loads matrix from an ASCII file. More... | |
| ccGLMatrixTpl< T > | xRotation () const |
| Returns the rotation component around X only. More... | |
| ccGLMatrixTpl< T > | yRotation () const |
| Returns the rotation component around Y only. More... | |
| ccGLMatrixTpl< T > | zRotation () const |
| Returns the rotation component around Z only. More... | |
| virtual void | toZero () |
| Clears matrix. More... | |
| virtual void | toIdentity () |
| Sets matrix to identity. More... | |
| virtual bool | isIdentity () const |
| Returns whether this matrix is equal to identity. More... | |
| void | clearTranslation () |
| Clears translation. More... | |
| void | initFromParameters (T alpha_rad, const Vector3Tpl< T > &axis3D, const Vector3Tpl< T > &t3D) |
| Inits transformation from a rotation axis, an angle and a translation. More... | |
| void | initFromParameters (T phi_rad, T theta_rad, T psi_rad, const Vector3Tpl< T > &t3D) |
| Inits transformation from 3 rotation angles and a translation. More... | |
| void | getParameters (T &alpha_rad, Vector3Tpl< T > &axis3D, Vector3Tpl< T > &t3D) const |
| void | getParameters (T &phi_rad, T &theta_rad, T &psi_rad, Vector3Tpl< T > &t3D) const |
| Returns equivalent parameters: 3 rotation angles and a translation. More... | |
| T * | data () |
| Returns a pointer to internal data. More... | |
| const T * | data () const |
| Returns a const pointer to internal data. More... | |
| T * | getTranslation () |
| Retruns a pointer to internal translation. More... | |
| const T * | getTranslation () const |
| Retruns a const pointer to internal translation. More... | |
| Vector3Tpl< T > | getTranslationAsVec3D () const |
| Returns a copy of the translation as a CCVector3. More... | |
| void | setTranslation (const Vector3Tpl< float > &Tr) |
| Sets translation (float version) More... | |
| void | setTranslation (const Vector3Tpl< double > &Tr) |
| Sets translation (double version) More... | |
| void | setTranslation (const float Tr[3]) |
| Sets translation from a float array. More... | |
| void | setTranslation (const double Tr[3]) |
| Sets translation from a double array. More... | |
| void | setRotation (const float Rt[9]) |
| Sets Rotation from a float array. More... | |
| void | setRotation (const double Rt[9]) |
| Sets Rotation from a double array. More... | |
| T * | getColumn (unsigned index) |
| Returns a pointer to a given column. More... | |
| const T * | getColumn (unsigned index) const |
| Returns a const pointer to a given column. More... | |
| Vector3Tpl< T > | getColumnAsVec3D (unsigned index) const |
| Returns a copy of a given column as a CCVector3. More... | |
| void | setColumn (unsigned index, const Vector3Tpl< T > &v) |
| Sets the content of a given column. More... | |
| void | setColumn (unsigned index, const Tuple4Tpl< T > &v) |
| Sets the content of a given column. More... | |
| ccGLMatrixTpl< T > | operator* (const ccGLMatrixTpl< T > &mat) const |
| Multiplication by a matrix operator. More... | |
| Vector3Tpl< float > | operator* (const Vector3Tpl< float > &vec) const |
| Multiplication by a vector operator (float version) More... | |
| Vector3Tpl< double > | operator* (const Vector3Tpl< double > &vec) const |
| Multiplication by a vector operator (double version) More... | |
| Tuple4Tpl< float > | operator* (const Tuple4Tpl< float > &vec) const |
| Multiplication by a 4D vector operator (float version) More... | |
| Tuple4Tpl< double > | operator* (const Tuple4Tpl< double > &vec) const |
| Multiplication by a 4D vector operator (double version) More... | |
| ccGLMatrixTpl< T > & | operator+= (const ccGLMatrixTpl< T > &mat) |
| (in place) Addition operator More... | |
| ccGLMatrixTpl< T > & | operator-= (const ccGLMatrixTpl< T > &mat) |
| (in place) Difference operator More... | |
| ccGLMatrixTpl< T > & | operator*= (const ccGLMatrixTpl< T > &mat) |
| (in place) Multiplication operator More... | |
| ccGLMatrixTpl< T > & | operator+= (const Vector3Tpl< float > &Tr) |
| (in place) Forward translation operator (float version) More... | |
| ccGLMatrixTpl< T > & | operator+= (const Vector3Tpl< double > &Tr) |
| (in place) Forward translation operator (double version) More... | |
| ccGLMatrixTpl< T > & | operator-= (const Vector3Tpl< float > &Tr) |
| (in place) Backward translation operator (float version) More... | |
| ccGLMatrixTpl< T > & | operator-= (const Vector3Tpl< double > &Tr) |
| (in place) Backward translation operator (double version) More... | |
| T | operator() (unsigned row, unsigned col) const |
| Returns the value at a given position. More... | |
| void | apply (float vec[3]) const |
| Applies transformation to a 3D vector (in place) - float version. More... | |
| void | apply (double vec[3]) const |
| Applies transformation to a 3D vector (in place) - double version. More... | |
| void | apply (Vector3Tpl< float > &vec) const |
| Applies transformation to a 3D vector (in place) - float version. More... | |
| void | apply (Vector3Tpl< double > &vec) const |
| Applies transformation to a 3D vector (in place) - double version. More... | |
| void | apply (Tuple4Tpl< float > &vec) const |
| Applies transformation to a 4D vector (in place) - float version. More... | |
| void | apply (Tuple4Tpl< double > &vec) const |
| Applies transformation to a 3D vector (in place) - double version. More... | |
| float | applyX (const Vector3Tpl< float > &vec) const |
| Get the resulting transformation along X dimension (float version) More... | |
| double | applyX (const Vector3Tpl< double > &vec) const |
| Get the resulting transformation along X dimension (double version) More... | |
| float | applyY (const Vector3Tpl< float > &vec) const |
| Get the resulting transformation along Y dimension (float version) More... | |
| double | applyY (const Vector3Tpl< double > &vec) const |
| Get the resulting transformation along Y dimension (double version) More... | |
| float | applyZ (const Vector3Tpl< float > &vec) const |
| Get the resulting transformation along Z dimension (float version) More... | |
| double | applyZ (const Vector3Tpl< double > &vec) const |
| Get the resulting transformation along Z dimension (double version) More... | |
| float | applyX (const Tuple4Tpl< float > &vec) const |
| Get the resulting transformation along X dimension (float version) More... | |
| double | applyX (const Tuple4Tpl< double > &vec) const |
| Get the resulting transformation along X dimension (double version) More... | |
| float | applyY (const Tuple4Tpl< float > &vec) const |
| Get the resulting transformation along Y dimension (float version) More... | |
| double | applyY (const Tuple4Tpl< double > &vec) const |
| Get the resulting transformation along Y dimension (double version) More... | |
| float | applyZ (const Tuple4Tpl< float > &vec) const |
| Get the resulting transformation along Z dimension (float version) More... | |
| double | applyZ (const Tuple4Tpl< double > &vec) const |
| Get the resulting transformation along Z dimension (double version) More... | |
| float | applyW (const Tuple4Tpl< float > &vec) const |
| Get the resulting transformation along the 4th dimension (float version) More... | |
| double | applyW (const Tuple4Tpl< double > &vec) const |
| void | applyRotation (Vector3Tpl< float > &vec) const |
| Applies rotation only to a 3D vector (in place) - float version. More... | |
| void | applyRotation (Vector3Tpl< double > &vec) const |
| Applies rotation only to a 3D vector (in place) - double version. More... | |
| void | applyRotation (float vec[3]) const |
| Applies rotation only to a 3D vector (in place) - float version. More... | |
| void | applyRotation (double vec[3]) const |
| Applies rotation only to a 3D vector (in place) - float version. More... | |
| void | shiftRotationCenter (const Vector3Tpl< T > &vec) |
| Shifts rotation center. More... | |
| void | transpose () |
| Transposes matrix (in place) More... | |
| ccGLMatrixTpl< T > | transposed () const |
| Returns transposed matrix. More... | |
| void | invert () |
| Inverts transformation. More... | |
| ccGLMatrixTpl< T > | inverse () const |
| Returns inverse transformation. More... | |
| void | scale (T coef) |
| Scales the whole matrix. More... | |
| void | scaleLine (unsigned lineIndex, T coef) |
| Scales one line of the matrix. More... | |
| void | scaleRotation (T coef) |
| Scales the rotation part of the matrix. More... | |
| void | scaleRow (unsigned rowIndex, T coef) |
| Scales one row of the matrix. More... | |
| void | scaleColumn (unsigned colIndex, T coef) |
| Scales one column of the matrix. More... | |
| bool | isSerializable () const override |
| Returns whether object is serializable of not. More... | |
| bool | toFile (QFile &out, short dataVersion) const override |
| Saves data to binary stream. More... | |
| short | minimumFileVersion () const override |
| Returns the minimum file version required to save this instance. More... | |
| bool | fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override |
| Loads data from binary stream. More... | |
Public Member Functions inherited from ccSerializableObject | |
| virtual | ~ccSerializableObject ()=default |
| Destructor. More... | |
Static Public Member Functions | |
| static ccGLMatrixTpl< T > | FromEigenMatrix (const Eigen::Matrix< double, 4, 4 > &mat) |
| static ccGLMatrixTpl< T > | FromEigenMatrix3 (const Eigen::Matrix< T, 3, 3 > &mat) |
| static Eigen::Matrix< T, 4, 4 > | ToEigenMatrix4 (const ccGLMatrixTpl< float > &mat) |
| static Eigen::Matrix< T, 4, 4 > | ToEigenMatrix4 (const ccGLMatrixTpl< double > &mat) |
| static Eigen::Matrix< T, 3, 3 > | ToEigenMatrix3 (const ccGLMatrixTpl< float > &mat) |
| static Eigen::Matrix< T, 3, 3 > | ToEigenMatrix3 (const ccGLMatrixTpl< double > &mat) |
| static ccGLMatrixTpl | Interpolate (T coef, const ccGLMatrixTpl< T > &glMat1, const ccGLMatrixTpl< T > &glMat2) |
| Interpolates two matrices at relative position 'coef'. More... | |
| static ccGLMatrixTpl< T > | FromToRotation (const Vector3Tpl< T > &from, const Vector3Tpl< T > &to) |
| Creates a transformation matrix that rotates a vector to another. More... | |
| template<class Tq > | |
| static ccGLMatrixTpl< T > | FromQuaternion (const Tq q[]) |
| Converts a quaternion to a rotation matrix. More... | |
| static Eigen::Matrix< T, 3, 3 > | QuaternionToRotationMatrix (const Eigen::Matrix< T, 4, 1 > &qvec) |
| Converts a quaternion to a rotation matrix. More... | |
| static ccGLMatrixTpl< T > | QuaternionToRotationMatrix (const Tuple4Tpl< T > &qvec) |
| Converts a quaternion to a rotation matrix. More... | |
| static Eigen::Matrix< T, 4, 1 > | NormalizeQuaternion (const Eigen::Matrix< T, 4, 1 > &qvec) |
| Converts a quaternion to a rotation matrix. More... | |
| static ccGLMatrixTpl< T > | FromViewDirAndUpDir (const Vector3Tpl< T > &forward, const Vector3Tpl< T > &up) |
| Generates a 'viewing' matrix from a looking vector and a 'up' direction. More... | |
| static ccGLMatrixTpl< T > | FromString (const QString &matText, bool &success) |
| Converts a 'text' matrix to a ccGLMatrix. More... | |
Static Public Member Functions inherited from ccSerializableObject | |
| static bool | WriteError () |
| Sends a custom error message (write error) and returns 'false'. More... | |
| static bool | ReadError () |
| Sends a custom error message (read error) and returns 'false'. More... | |
| static bool | MemoryError () |
| Sends a custom error message (not enough memory) and returns 'false'. More... | |
| static bool | CorruptError () |
| Sends a custom error message (corrupted file) and returns 'false'. More... | |
Protected Attributes | |
| T | m_mat [OPENGL_MATRIX_SIZE] |
| Internal 4x4 GL-style matrix data. More... | |
Additional Inherited Members | |
Public Types inherited from ccSerializableObject | |
| enum | DeserializationFlags { DF_POINT_COORDS_64_BITS , DF_SCALAR_VAL_32_BITS = 2 } |
| Deserialization flags (bit-field) More... | |
| typedef QMultiMap< unsigned, unsigned > | LoadedIDMap |
| Map of loaded unique IDs (old ID --> new ID) More... | |
A 4x4 'transformation' matrix (column major order)
Transformation (M) is composed by a rotation (R) and a translation (T): M*X = R*X + T
Definition at line 52 of file ecvGLMatrixTpl.h.
|
inline |
Copy Function.
Definition at line 98 of file ecvGLMatrixTpl.h.
|
inline |
Definition at line 99 of file ecvGLMatrixTpl.h.
|
inline |
Definition at line 103 of file ecvGLMatrixTpl.h.
|
inline |
Definition at line 104 of file ecvGLMatrixTpl.h.
|
inline |
Default constructor.
Matrix is set to identity (see toIdentity) by default.
Definition at line 134 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::toIdentity().
|
inline |
Copy constructor.
Definition at line 137 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat, and OPENGL_MATRIX_SIZE.
|
inlineexplicit |
Constructor from a float GL matrix array.
| mat16f | a 16 elements array (column major order) |
Definition at line 154 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat, and OPENGL_MATRIX_SIZE.
|
inlineexplicit |
Constructor from a double GL matrix array.
| mat16d | a 16 elements array (column major order) |
Definition at line 163 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat, and OPENGL_MATRIX_SIZE.
|
inline |
Constructor from 4 columns (X,Y,Z,T)
| X | 3 first elements of the 1st column (last one is 0) |
| Y | 3 first elements of the 2nd column (last one is 0) |
| Z | 3 first elements of the 3rd column (last one is 0) |
| Tr | 3 first elements of the last column (last one is 1) |
Definition at line 174 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R14, CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R24, CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, CC_MAT_R34, CC_MAT_R41, CC_MAT_R42, CC_MAT_R43, CC_MAT_R44, Tuple3Tpl< Type >::x, X, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inline |
Applies transformation to a 3D vector (in place) - double version.
Input array is directly modified after calling this method
Definition at line 1049 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::apply().
|
inline |
Applies transformation to a 3D vector (in place) - float version.
Input array is directly modified after calling this method
Definition at line 1039 of file ecvGLMatrixTpl.h.
Referenced by ccGLMatrixTpl< T >::apply(), DistanceMapGenerationTool::ConvertProfileToMesh(), and MainWindow::onItemPicked().
|
inline |
Applies transformation to a 3D vector (in place) - double version.
Input vector is directly modified after calling this method
Definition at line 1073 of file ecvGLMatrixTpl.h.
|
inline |
Applies transformation to a 4D vector (in place) - float version.
Input vector is directly modified after calling this method
Definition at line 1069 of file ecvGLMatrixTpl.h.
|
inline |
Applies transformation to a 3D vector (in place) - double version.
Input vector is directly modified after calling this method
Definition at line 1064 of file ecvGLMatrixTpl.h.
|
inline |
Applies transformation to a 3D vector (in place) - float version.
Input vector is directly modified after calling this method
Definition at line 1060 of file ecvGLMatrixTpl.h.
|
inline |
Applies rotation only to a 3D vector (in place) - float version.
Input array is directly modified after calling this method
Definition at line 1245 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R31, CC_MAT_R32, and CC_MAT_R33.
|
inline |
Applies rotation only to a 3D vector (in place) - float version.
Input array is directly modified after calling this method
Definition at line 1225 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R31, CC_MAT_R32, and CC_MAT_R33.
|
inline |
Applies rotation only to a 3D vector (in place) - double version.
Input vector is directly modified after calling this method
Definition at line 1204 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inline |
Applies rotation only to a 3D vector (in place) - float version.
Input vector is directly modified after calling this method
Definition at line 1184 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by ccGLMatrixTpl< T >::invert(), CommandMatchBestFitPlane::process(), and ccGLMatrixTpl< T >::shiftRotationCenter().
|
inline |
Get the resulting transformation along the 4th dimension (double version)
Definition at line 1174 of file ecvGLMatrixTpl.h.
References CC_MAT_R41, CC_MAT_R42, CC_MAT_R43, CC_MAT_R44, Tuple4Tpl< Type >::w, Tuple4Tpl< Type >::x, Tuple4Tpl< Type >::y, and Tuple4Tpl< Type >::z.
|
inline |
Get the resulting transformation along the 4th dimension (float version)
Definition at line 1166 of file ecvGLMatrixTpl.h.
References CC_MAT_R41, CC_MAT_R42, CC_MAT_R43, CC_MAT_R44, Tuple4Tpl< Type >::w, Tuple4Tpl< Type >::x, Tuple4Tpl< Type >::y, and Tuple4Tpl< Type >::z.
Referenced by ccGLMatrixTpl< T >::operator*().
|
inline |
Get the resulting transformation along X dimension (double version)
Definition at line 1128 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R14, Tuple4Tpl< Type >::w, Tuple4Tpl< Type >::x, Tuple4Tpl< Type >::y, and Tuple4Tpl< Type >::z.
|
inline |
Get the resulting transformation along X dimension (float version)
Definition at line 1121 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R14, Tuple4Tpl< Type >::w, Tuple4Tpl< Type >::x, Tuple4Tpl< Type >::y, and Tuple4Tpl< Type >::z.
|
inline |
Get the resulting transformation along X dimension (double version)
Definition at line 1083 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R14, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inline |
Get the resulting transformation along X dimension (float version)
Definition at line 1076 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R14, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by ccGLMatrixTpl< T >::operator*().
|
inline |
Get the resulting transformation along Y dimension (double version)
Definition at line 1143 of file ecvGLMatrixTpl.h.
References CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R24, Tuple4Tpl< Type >::w, Tuple4Tpl< Type >::x, Tuple4Tpl< Type >::y, and Tuple4Tpl< Type >::z.
|
inline |
Get the resulting transformation along Y dimension (float version)
Definition at line 1136 of file ecvGLMatrixTpl.h.
References CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R24, Tuple4Tpl< Type >::w, Tuple4Tpl< Type >::x, Tuple4Tpl< Type >::y, and Tuple4Tpl< Type >::z.
|
inline |
Get the resulting transformation along Y dimension (double version)
Definition at line 1098 of file ecvGLMatrixTpl.h.
References CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R24, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inline |
Get the resulting transformation along Y dimension (float version)
Definition at line 1091 of file ecvGLMatrixTpl.h.
References CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R24, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by ccGLMatrixTpl< T >::operator*().
|
inline |
Get the resulting transformation along Z dimension (double version)
Definition at line 1158 of file ecvGLMatrixTpl.h.
References CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, CC_MAT_R34, Tuple4Tpl< Type >::w, Tuple4Tpl< Type >::x, Tuple4Tpl< Type >::y, and Tuple4Tpl< Type >::z.
|
inline |
Get the resulting transformation along Z dimension (float version)
Definition at line 1151 of file ecvGLMatrixTpl.h.
References CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, CC_MAT_R34, Tuple4Tpl< Type >::w, Tuple4Tpl< Type >::x, Tuple4Tpl< Type >::y, and Tuple4Tpl< Type >::z.
|
inline |
Get the resulting transformation along Z dimension (double version)
Definition at line 1113 of file ecvGLMatrixTpl.h.
References CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, CC_MAT_R34, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inline |
Get the resulting transformation along Z dimension (float version)
Definition at line 1106 of file ecvGLMatrixTpl.h.
References CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, CC_MAT_R34, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by ccGLMatrixTpl< T >::operator*().
|
inline |
Clears translation.
Translation is set to (0,0,0).
Definition at line 642 of file ecvGLMatrixTpl.h.
References CC_MAT_R14, CC_MAT_R24, and CC_MAT_R34.
Referenced by ccGLMatrixTpl< T >::FromEigenMatrix3().
|
inline |
Returns a pointer to internal data.
Definition at line 810 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat.
Referenced by MainWindow::addToDB(), ccGraphicalTransformationTool::apply(), CorrespondenceMatching::applyTransformation(), TemplateAlignment::applyTransformation(), NurbsCurveFitting::compute(), FastGlobalRegistrationFilter::compute(), ccEntityAction::computeNormals(), DecodeRotation(), DecodeTransformation(), ccPointPair::drawMeOnly(), ccTrace::drawMeOnly(), MatrixDisplayDlg::fillDialogWith(), FromCCLibMatrix(), ccGLMatrixTpl< T >::FromQuaternion(), ccGLMatrixTpl< T >::FromString(), ccGLMatrixTpl< T >::FromViewDirAndUpDir(), ecvGenericDisplayTools::Frustum(), BundlerImportDlg::getOptionalTransfoMatrix(), GetPoseInformation(), Frustum::initfromMPMatrix(), ccCamSensorProjectionDlg::initWithCamSensor(), ccGBLSensorProjectionDlg::initWithGBLSensor(), PovFilter::loadFile(), FBXFilter::loadFile(), LoadImage(), qSRA::loadProfile(), LoadScan(), cloudViewer::ModelViewerWidget::ModelViewMatrix(), MainWindow::onItemPicked(), ccGLMatrixTpl< T >::operator=(), ecvGenericDisplayTools::Ortho(), ecvGenericDisplayTools::Perspective(), ccCloudLayersHelper::projectCloud(), SaveImage(), SavePoseInformation(), SaveScan(), PovFilter::saveToFile(), TransformInfo::setTransformation(), ccGLMatrixTpl< T >::ToEigenMatrix3(), ccGLMatrixTpl< T >::ToEigenMatrix4(), ecvGenericDisplayTools::Unproject(), ccCamSensorProjectionDlg::updateCamSensor(), and ccGBLSensorProjectionDlg::updateGBLSensor().
|
inline |
Returns a const pointer to internal data.
Definition at line 813 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat.
|
inlinevirtual |
Loads matrix from an ASCII file.
| filename | input file name |
Reimplemented in ccIndexedTransformation.
Definition at line 538 of file ecvGLMatrixTpl.h.
References filename, and ccGLMatrixTpl< T >::m_mat.
Referenced by ccApplyTransformationDlg::loadFromASCIIFile(), and CommandApplyTransformation::process().
|
inlinestatic |
Definition at line 54 of file ecvGLMatrixTpl.h.
|
inlinestatic |
Definition at line 59 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::clearTranslation(), and ccGLMatrixTpl< T >::setRotation().
Referenced by ccGLMatrixTpl< T >::QuaternionToRotationMatrix().
|
inlineoverridevirtual |
Loads data from binary stream.
| in | input file (already opened) |
| dataVersion | file version (for version-specific deserialization) |
| flags | deserialization flags (see ccSerializableObject::DeserializationFlags) |
| oldToNewIDMap | map to link old IDs with new IDs |
Note: When implementing, use dataVersion checks to handle differentversions:
Reimplemented from ccSerializableObject.
Definition at line 1427 of file ecvGLMatrixTpl.h.
|
inlinestatic |
Converts a quaternion to a rotation matrix.
| q | quaternion (4 values: w,x,y,z) |
Definition at line 303 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::data().
|
inlinestatic |
Converts a 'text' matrix to a ccGLMatrix.
| [in] | matText | matrix text |
| [out] | success | whether input matrix text is valid or not |
Definition at line 477 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::data(), OPENGL_MATRIX_SIZE, qtCompatSplitRegex(), and QtCompat::SkipEmptyParts.
|
inlinestatic |
Creates a transformation matrix that rotates a vector to another.
Adapted from "Efficiently Building a Matrix to Rotate One Vector to Another" By Tomas Möller, John Hughes, Journal of Graphics Tools, 4(4):1-4, 1999
| from | normalized non-zero source vector |
| to | normalized non-zero destination vector |
Definition at line 230 of file ecvGLMatrixTpl.h.
References Vector3Tpl< Type >::cross(), Vector3Tpl< Type >::dot(), fabs(), cloudViewer::LessThanEpsilon(), result, Tuple3Tpl< Type >::u, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inlinestatic |
Generates a 'viewing' matrix from a looking vector and a 'up' direction.
| forward | forward 'view' vector |
| up | up vector |
Definition at line 436 of file ecvGLMatrixTpl.h.
References Vector3Tpl< Type >::cross(), ccGLMatrixTpl< T >::data(), Vector3Tpl< Type >::normalize(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inline |
Returns a pointer to a given column.
| index | column index (between 0 and 3) |
Definition at line 904 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat.
Referenced by qFacets::exportFacets(), ccGLMatrixTpl< T >::getColumnAsVec3D(), PcdFilter::loadFile(), PDMSFilter::loadFile(), PcdFilter::saveToFile(), and ccGLMatrixTpl< T >::scaleColumn().
|
inline |
Returns a const pointer to a given column.
| index | column index (between 0 and 3) |
Definition at line 910 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat.
|
inline |
Returns a copy of a given column as a CCVector3.
4th value is ignored.
| index | column index (between 0 and 3) |
Definition at line 919 of file ecvGLMatrixTpl.h.
References Vector3Tpl< Type >::fromArray(), and ccGLMatrixTpl< T >::getColumn().
Referenced by ccDBRoot::alignCameraWithEntity(), ccBoundingBoxEditorDlg::fromClipboardClicked(), GetConeProfile(), ccGLMatrixTpl< T >::getTranslationAsVec3D(), and ccGLMatrixTpl< T >::invert().
|
inline |
Returns equivalent parameters: a rotation axis, an angle and a translation
| [out] | alpha_rad | rotation angle in radians (in [0;pi]) |
| [out] | axis3D | unit rotation axis |
| [out] | t3D | translation |
Definition at line 741 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R14, CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R24, CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, CC_MAT_R34, fabs(), cloudViewer::GreaterThanEpsilon(), Vector3Tpl< Type >::norm2(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by ccGraphicalTransformationTool::apply(), MatrixDisplayDlg::fillDialogWith(), ccGLMatrixTpl< T >::Interpolate(), TransformInfo::setTransformation(), ccApplyTransformationDlg::updateAll(), and ccGLMatrixTpl< T >::zRotation().
|
inline |
Returns equivalent parameters: 3 rotation angles and a translation.
See http://en.wikipedia.org/wiki/Euler_angles (Tait-Bryan Z1Y2X3)
| [out] | phi_rad | Phi angle (in radians) |
| [out] | theta_rad | Theta angle (in radians) |
| [out] | psi_rad | Psi angle (in radians) |
| [out] | t3D | translation |
Definition at line 777 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R14, CC_MAT_R21, CC_MAT_R24, CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, CC_MAT_R34, fabs(), M_PI_2, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inline |
Retruns a pointer to internal translation.
Translation corresponds to the beginning of the third column of the matrix.
Definition at line 819 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat.
Referenced by DistanceMapGenerationTool::ProfileMetaData::computeCloudToProfileOriginTrans(), GetPoseInformation(), ccCamSensorProjectionDlg::initWithCamSensor(), ccGBLSensorProjectionDlg::initWithGBLSensor(), SavePoseInformation(), PovFilter::saveToFile(), ccGLMatrixTpl< T >::xRotation(), and ccGLMatrixTpl< T >::yRotation().
|
inline |
Retruns a const pointer to internal translation.
Translation corresponds to the beginning of the third column of the matrix.
Definition at line 825 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat.
|
inline |
Returns a copy of the translation as a CCVector3.
Definition at line 830 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::getColumnAsVec3D().
Referenced by qFacets::exportFacets(), ccPropertiesTreeDelegate::fillWithHObject(), ccBoundingBoxEditorDlg::fromClipboardClicked(), GetConeProfile(), ccCompass::importFoliations(), ccCompassImport::importFoliations(), qAnimationDlg::init(), LoadScan(), SaveScan(), PcdFilter::saveToFile(), TransformInfo::setTransformation(), and ccPlaneEditDlg::updatePlane().
|
inline |
Inits transformation from a rotation axis, an angle and a translation.
| [in] | alpha_rad | rotation angle (in radians) |
| [in] | axis3D | rotation axis |
| [in] | t3D | translation |
Definition at line 648 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R14, CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R24, CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, CC_MAT_R34, CC_MAT_R41, CC_MAT_R42, CC_MAT_R43, CC_MAT_R44, Vector3Tpl< Type >::normalize(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by ccGraphicalTransformationTool::apply(), ccCompass::importFoliations(), ccCompassImport::importFoliations(), ccGLMatrixTpl< T >::Interpolate(), IcmFilter::LoadCalibratedImages(), ccApplyTransformationDlg::onEulerValueChanged(), ccApplyTransformationDlg::onRotAngleValueChanged(), ccPlaneEditDlg::updatePlane(), and ccGLMatrixTpl< T >::zRotation().
|
inline |
Inits transformation from 3 rotation angles and a translation.
See http://en.wikipedia.org/wiki/Euler_angles (Tait-Bryan Z1Y2X3)
| [in] | phi_rad | Phi angle (in radians) |
| [in] | theta_rad | Theta angle (in radians) |
| [in] | psi_rad | Psi angle (in radians) |
| [in] | t3D | translation |
Definition at line 698 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R14, CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R24, CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, CC_MAT_R34, CC_MAT_R41, CC_MAT_R42, CC_MAT_R43, CC_MAT_R44, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inlinestatic |
Interpolates two matrices at relative position 'coef'.
| coef | interpolation position (should be between 0 and 1). |
| glMat1 | 'left' matrix |
| glMat2 | 'right' matrix |
Definition at line 201 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::getParameters(), ccGLMatrixTpl< T >::initFromParameters(), and ccGLMatrixTpl< T >::inverse().
|
inline |
Returns inverse transformation.
Definition at line 1325 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::invert().
Referenced by ccPointPairRegistrationDlg::apply(), ccPointPairRegistrationDlg::cancel(), NurbsCurveFitting::compute(), ccEntityAction::computeNormals(), DistanceMapGenerationTool::ConvertProfileToMesh(), ccCropTool::Crop(), qAnimationDlg::init(), ccGLMatrixTpl< T >::Interpolate(), PovFilter::loadFile(), ccPointPairRegistrationDlg::reset(), and SaveScan().
|
inline |
Inverts transformation.
Definition at line 1294 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::applyRotation(), CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R14, CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R24, CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, CC_MAT_R34, ccGLMatrixTpl< T >::getColumnAsVec3D(), ccGLMatrixTpl< T >::m_mat, Vector3Tpl< Type >::norm2(), and std::swap().
Referenced by qFacets::exportFacets(), ccApplyTransformationDlg::getTransformation(), and ccGLMatrixTpl< T >::inverse().
|
inlinevirtual |
Returns whether this matrix is equal to identity.
Definition at line 628 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat.
|
inlineoverridevirtual |
Returns whether object is serializable of not.
Reimplemented from ccSerializableObject.
Definition at line 1403 of file ecvGLMatrixTpl.h.
|
inlineoverridevirtual |
Returns the minimum file version required to save this instance.
To be overridden by subclasses to indicate their minimum required version. This enables the system to determine:
Implements ccSerializableObject.
Definition at line 1422 of file ecvGLMatrixTpl.h.
|
inlinestatic |
Converts a quaternion to a rotation matrix.
| q | quaternion (4 values: w,x,y,z) |
Definition at line 377 of file ecvGLMatrixTpl.h.
Referenced by ccGLMatrixTpl< T >::QuaternionToRotationMatrix().
|
inline |
Returns the value at a given position.
Definition at line 1032 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat.
|
inline |
Multiplication by a matrix operator.
Definition at line 947 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat, and result.
|
inline |
Multiplication by a 4D vector operator (double version)
Definition at line 977 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::applyW(), ccGLMatrixTpl< T >::applyX(), ccGLMatrixTpl< T >::applyY(), and ccGLMatrixTpl< T >::applyZ().
|
inline |
Multiplication by a 4D vector operator (float version)
Definition at line 972 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::applyW(), ccGLMatrixTpl< T >::applyX(), ccGLMatrixTpl< T >::applyY(), and ccGLMatrixTpl< T >::applyZ().
|
inline |
Multiplication by a vector operator (double version)
Definition at line 967 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::applyX(), ccGLMatrixTpl< T >::applyY(), and ccGLMatrixTpl< T >::applyZ().
|
inline |
Multiplication by a vector operator (float version)
Definition at line 963 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::applyX(), ccGLMatrixTpl< T >::applyY(), and ccGLMatrixTpl< T >::applyZ().
|
inline |
(in place) Multiplication operator
Definition at line 997 of file ecvGLMatrixTpl.h.
|
inline |
(in place) Addition operator
Definition at line 983 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat, and OPENGL_MATRIX_SIZE.
|
inline |
(in place) Forward translation operator (double version)
Definition at line 1010 of file ecvGLMatrixTpl.h.
References CC_MAT_R14, CC_MAT_R24, CC_MAT_R34, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inline |
(in place) Forward translation operator (float version)
Definition at line 1003 of file ecvGLMatrixTpl.h.
References CC_MAT_R14, CC_MAT_R24, CC_MAT_R34, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inline |
(in place) Difference operator
Definition at line 990 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat, and OPENGL_MATRIX_SIZE.
|
inline |
(in place) Backward translation operator (double version)
Definition at line 1024 of file ecvGLMatrixTpl.h.
References CC_MAT_R14, CC_MAT_R24, CC_MAT_R34, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inline |
(in place) Backward translation operator (float version)
Definition at line 1017 of file ecvGLMatrixTpl.h.
References CC_MAT_R14, CC_MAT_R24, CC_MAT_R34, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inline |
Copy assignment operator.
Definition at line 143 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat, and OPENGL_MATRIX_SIZE.
|
inline |
Definition at line 126 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::setRotation().
|
inline |
Definition at line 115 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::data(), ccGLMatrixTpl< T >::m_mat, and OPENGL_MATRIX_SIZE.
|
inline |
Definition at line 122 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::setRotation().
|
inline |
Assignment Function.
Definition at line 109 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::data(), ccGLMatrixTpl< T >::m_mat, and OPENGL_MATRIX_SIZE.
|
inlinestatic |
Converts a quaternion to a rotation matrix.
| q | quaternion (4 values: w,x,y,z) |
Definition at line 346 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::NormalizeQuaternion().
|
inlinestatic |
Converts a quaternion to a rotation matrix.
| q | quaternion (4 values: w,x,y,z) |
Definition at line 359 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::FromEigenMatrix3(), ccGLMatrixTpl< T >::NormalizeQuaternion(), Tuple4Tpl< Type >::w, Tuple4Tpl< Type >::x, Tuple4Tpl< Type >::y, and Tuple4Tpl< Type >::z.
|
inline |
Scales the whole matrix.
| coef | scaling coef. |
Definition at line 1335 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R14, CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R24, CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, and CC_MAT_R34.
|
inline |
Scales one column of the matrix.
| colIndex | (0-3) |
| coef | scaling coef. |
Definition at line 1393 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::getColumn().
|
inline |
Scales one line of the matrix.
| lineIndex | (0-3) |
| coef | scaling coef. |
Definition at line 1354 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat.
|
inline |
Scales the rotation part of the matrix.
| coef | scaling coef. |
Definition at line 1365 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R31, CC_MAT_R32, and CC_MAT_R33.
|
inline |
Scales one row of the matrix.
| rowIndex | tow index (0-3) |
| coef | scaling coef. |
Definition at line 1381 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat.
|
inline |
Sets the content of a given column.
| index | column index (between 0 and 3) |
| v | new column values |
Definition at line 938 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat, Tuple4Tpl< Type >::w, Tuple4Tpl< Type >::x, Tuple4Tpl< Type >::y, and Tuple4Tpl< Type >::z.
|
inline |
Sets the content of a given column.
| index | column index (between 0 and 3) |
| v | new column values |
Definition at line 927 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by ccBoundingBoxEditorDlg::toClipboardClicked().
|
inline |
Sets Rotation from a double array.
| Rt | Rotation matrix as a double array |
Definition at line 886 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R31, CC_MAT_R32, and CC_MAT_R33.
|
inline |
Sets Rotation from a float array.
| Rt | Rotation matrix as a float array |
Definition at line 869 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R12, CC_MAT_R13, CC_MAT_R21, CC_MAT_R22, CC_MAT_R23, CC_MAT_R31, CC_MAT_R32, and CC_MAT_R33.
Referenced by ccGLMatrixTpl< T >::FromEigenMatrix3(), and ccGLMatrixTpl< T >::operator=().
|
inline |
Sets translation from a double array.
| Tr | 3D vector as a double array |
Definition at line 860 of file ecvGLMatrixTpl.h.
References CC_MAT_R14, CC_MAT_R24, and CC_MAT_R34.
|
inline |
Sets translation from a float array.
| Tr | 3D vector as a float array |
Definition at line 852 of file ecvGLMatrixTpl.h.
References CC_MAT_R14, CC_MAT_R24, and CC_MAT_R34.
|
inline |
Sets translation (double version)
| Tr | 3D vector |
Definition at line 843 of file ecvGLMatrixTpl.h.
References CC_MAT_R14, CC_MAT_R24, CC_MAT_R34, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inline |
Sets translation (float version)
| Tr | 3D vector |
Definition at line 836 of file ecvGLMatrixTpl.h.
References CC_MAT_R14, CC_MAT_R24, CC_MAT_R34, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by ccPointPairRegistrationDlg::addAlignedPoint(), ccPointPairRegistrationDlg::addReferencePoint(), MainWindow::addToDB(), ccDBRoot::alignCameraWithEntity(), ccGraphicalTransformationTool::apply(), DistanceMapGenerationTool::ProfileMetaData::computeCloudToSurfaceOriginTrans(), ecvPrimitiveFactoryDlg::createPrimitive(), ccCompass::estimateStrain(), qFacets::exportFacets(), FromCCLibMatrix(), ccCompass::importFoliations(), ccCompassImport::importFoliations(), ccApplyTransformationDlg::initFromDipAndDipDir(), CSVMatrixFilter::loadFile(), PcdFilter::loadFile(), PovFilter::loadFile(), PDMSFilter::loadFile(), qSRA::loadProfile(), LoadScan(), MainWindow::onItemPicked(), CommandMatchBestFitPlane::process(), ccInnerRect2DFinder::process(), SaveScan(), ccBoundingBoxEditorDlg::toClipboardClicked(), qCanupo2DViewDialog::trainClassifier(), DistanceMapGenerationDlg::update(), ccCamSensorProjectionDlg::updateCamSensor(), ccGBLSensorProjectionDlg::updateGBLSensor(), ccPlaneEditDlg::updatePlane(), ccGLMatrixTpl< T >::xRotation(), and ccGLMatrixTpl< T >::yRotation().
|
inline |
Shifts rotation center.
Warning, this method only applies a shift (i.e. relatively to the current rotation center). This is not a way to set an absolute rotation center 'directly'.
Definition at line 1268 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::applyRotation().
Referenced by FromCCLibMatrix().
|
inline |
Returns equivalent parameters: a rotation axis and an angle.
| [out] | alpha_rad | rotation angle in radians (in [0;pi]) |
| [out] | axis3D | unit rotation axis |
Definition at line 408 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::ToEigenMatrix3(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inlinevirtual |
Saves matrix to an ASCII file.
| filename | output file name |
| precision | output digits precision |
Reimplemented in ccIndexedTransformation.
Definition at line 520 of file ecvGLMatrixTpl.h.
References QtCompat::endl(), filename, and ccGLMatrixTpl< T >::m_mat.
Referenced by MatrixDisplayDlg::exportToASCII().
|
inlinestatic |
Definition at line 87 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::data().
|
inlinestatic |
Definition at line 78 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::data().
Referenced by ccGLMatrixTpl< T >::toAngleAxis(), ccGLMatrixTpl< T >::toEulerAngle(), and ccGLMatrixTpl< T >::toQuaternion().
|
inlinestatic |
Definition at line 72 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::data().
|
inlinestatic |
Definition at line 67 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::data().
|
inline |
Returns equivalent parameters: 3 rotation angles.
yaw(rz) pitch(ry) roll(rx)
| [out] | rz | angle (in radians) |
| [out] | ry | angle (in radians) |
| [out] | rx | angle (in radians) |
Definition at line 422 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::ToEigenMatrix3().
Referenced by TransformInfo::setTransformation().
|
inlineoverridevirtual |
Saves data to binary stream.
| out | output file (already opened) |
| dataVersion | target file version (for forward/backward compatibility) |
Reimplemented from ccSerializableObject.
Definition at line 1405 of file ecvGLMatrixTpl.h.
|
inlinevirtual |
Sets matrix to identity.
Definition at line 622 of file ecvGLMatrixTpl.h.
References CC_MAT_R11, CC_MAT_R22, CC_MAT_R33, CC_MAT_R44, and ccGLMatrixTpl< T >::toZero().
Referenced by MainWindow::addToDB(), ccGLMatrixTpl< T >::ccGLMatrixTpl(), ecvPrimitiveFactoryDlg::createPrimitive(), qFacets::exportFacets(), PovFilter::loadFile(), BundlerFilter::loadFileExtended(), ecvGenericDisplayTools::Ortho(), ccPointPairRegistrationDlg::reset(), ccGLMatrixTpl< T >::xRotation(), and ccGLMatrixTpl< T >::yRotation().
|
inline |
Converts to a quaternion from a rotation matrix.
| q | quaternion (4 values: w,x,y,z) |
Definition at line 395 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::ToEigenMatrix3().
|
inline |
Returns matrix as a string.
| precision | numerical precision |
| separator | separator |
Definition at line 502 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat.
Referenced by ccGraphicalTransformationTool::apply(), ccPointPairRegistrationDlg::apply(), TemplateAlignment::applyTransformation(), FastGlobalRegistrationFilter::compute(), JsonRPCPlugin::execute(), MatrixDisplayDlg::exportToClipboard(), MatrixDisplayDlg::fillDialogWith(), ccApplyTransformationDlg::loadFromASCIIFile(), LoadScan(), CommandApplyTransformation::process(), CommandMatchBestFitPlane::process(), CommandICP::process(), ccBoundingBoxEditorDlg::toClipboardClicked(), ccApplyTransformationDlg::updateAll(), and ccPlaneEditDlg::updatePlane().
|
inlinevirtual |
Clears matrix.
Matrix is set to 0.
Definition at line 617 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::m_mat, and OPENGL_MATRIX_SIZE.
Referenced by MatrixDisplayDlg::clear(), BundlerImportDlg::getOptionalTransfoMatrix(), and ccGLMatrixTpl< T >::toIdentity().
|
inline |
Transposes matrix (in place)
Definition at line 1276 of file ecvGLMatrixTpl.h.
References CC_MAT_R12, CC_MAT_R13, CC_MAT_R14, CC_MAT_R21, CC_MAT_R23, CC_MAT_R24, CC_MAT_R31, CC_MAT_R32, CC_MAT_R34, CC_MAT_R41, CC_MAT_R42, CC_MAT_R43, and std::swap().
Referenced by DecodeRotation(), DecodeTransformation(), and ccGLMatrixTpl< T >::transposed().
|
inline |
Returns transposed matrix.
Definition at line 1286 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::transpose().
Referenced by ccGraphicalTransformationTool::apply().
|
inline |
Returns the rotation component around X only.
Definition at line 555 of file ecvGLMatrixTpl.h.
References CC_MAT_R13, CC_MAT_R23, CC_MAT_R33, ccGLMatrixTpl< T >::getTranslation(), ccGLMatrixTpl< T >::setTranslation(), and ccGLMatrixTpl< T >::toIdentity().
|
inline |
Returns the rotation component around Y only.
Definition at line 578 of file ecvGLMatrixTpl.h.
References CC_MAT_R31, CC_MAT_R32, CC_MAT_R33, ccGLMatrixTpl< T >::getTranslation(), ccGLMatrixTpl< T >::setTranslation(), and ccGLMatrixTpl< T >::toIdentity().
|
inline |
Returns the rotation component around Z only.
Definition at line 601 of file ecvGLMatrixTpl.h.
References ccGLMatrixTpl< T >::getParameters(), ccGLMatrixTpl< T >::initFromParameters(), and Vector3Tpl< Type >::norm2().
|
protected |
Internal 4x4 GL-style matrix data.
Definition at line 1445 of file ecvGLMatrixTpl.h.
Referenced by ccGLMatrixTpl< T >::ccGLMatrixTpl(), ccGLMatrixTpl< T >::data(), ccGLMatrixTpl< T >::fromAsciiFile(), ccGLMatrixTpl< T >::getColumn(), ccGLMatrixTpl< T >::getTranslation(), ccGLMatrixTpl< T >::invert(), ccGLMatrixTpl< T >::isIdentity(), ccGLMatrixTpl< T >::operator()(), ccGLMatrixTpl< T >::operator*(), ccGLMatrixTpl< T >::operator+=(), ccGLMatrixTpl< T >::operator-=(), ccGLMatrixTpl< T >::operator=(), ccGLMatrixTpl< T >::scaleLine(), ccGLMatrixTpl< T >::scaleRow(), ccGLMatrixTpl< T >::setColumn(), ccGLMatrixTpl< T >::toAsciiFile(), ccGLMatrixTpl< T >::toString(), and ccGLMatrixTpl< T >::toZero().