qCC_db version 2.13.alpha (Qt) - 31 May 2022
CloudCompare 3D entities
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ccGLMatrixTpl< T > Class Template Reference

A 4x4 'transformation' matrix (column major order) More...

#include <ccGLMatrixTpl.h>

Inheritance diagram for ccGLMatrixTpl< T >:
Inheritance graph
[legend]
Collaboration diagram for ccGLMatrixTpl< T >:
Collaboration graph
[legend]

Public Member Functions

 ccGLMatrixTpl ()
 Default constructor. More...
 
 ccGLMatrixTpl (const ccGLMatrixTpl< T > &mat)
 Copy constructor.
 
 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...
 
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.
 
ccGLMatrixTpl< T > yRotation () const
 Returns the rotation component around Y only.
 
ccGLMatrixTpl< T > zRotation () const
 Returns the rotation component around Z only.
 
virtual void toZero ()
 Clears matrix. More...
 
virtual void toIdentity ()
 Sets matrix to identity.
 
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
 Returns equivalent parameters: a rotation axis, an angle and a translation. More...
 
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.
 
const T * data () const
 Returns a const pointer to internal data.
 
T * getTranslation ()
 Returns a pointer to internal translation. More...
 
const T * getTranslation () const
 Returns 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...
 
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.
 
Vector3Tpl< float > operator* (const Vector3Tpl< float > &vec) const
 Multiplication by a vector operator (float version)
 
Vector3Tpl< double > operator* (const Vector3Tpl< double > &vec) const
 Multiplication by a vector operator (double version)
 
Tuple4Tpl< float > operator* (const Tuple4Tpl< float > &vec) const
 Multiplication by a 4D vector operator (float version)
 
Tuple4Tpl< double > operator* (const Tuple4Tpl< double > &vec) const
 Multiplication by a 4D vector operator (double version)
 
ccGLMatrixTpl< T > & operator+= (const ccGLMatrixTpl< T > &mat)
 (in place) Addition operator
 
ccGLMatrixTpl< T > & operator-= (const ccGLMatrixTpl< T > &mat)
 (in place) Difference operator
 
ccGLMatrixTpl< T > & operator*= (const ccGLMatrixTpl< T > &mat)
 (in place) Multiplication operator
 
ccGLMatrixTpl< T > & operator+= (const Vector3Tpl< float > &Tr)
 (in place) Forward translation operator (float version)
 
ccGLMatrixTpl< T > & operator+= (const Vector3Tpl< double > &Tr)
 (in place) Forward translation operator (double version)
 
ccGLMatrixTpl< T > & operator-= (const Vector3Tpl< float > &Tr)
 (in place) Backward translation operator (float version)
 
ccGLMatrixTpl< T > & operator-= (const Vector3Tpl< double > &Tr)
 (in place) Backward translation operator (double version)
 
operator() (unsigned row, unsigned col) const
 Returns the value at a given position.
 
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)
 
double applyX (const Vector3Tpl< double > &vec) const
 Get the resulting transformation along X dimension (double version)
 
float applyY (const Vector3Tpl< float > &vec) const
 Get the resulting transformation along Y dimension (float version)
 
double applyY (const Vector3Tpl< double > &vec) const
 Get the resulting transformation along Y dimension (double version)
 
float applyZ (const Vector3Tpl< float > &vec) const
 Get the resulting transformation along Z dimension (float version)
 
double applyZ (const Vector3Tpl< double > &vec) const
 Get the resulting transformation along Z dimension (double version)
 
float applyX (const Tuple4Tpl< float > &vec) const
 Get the resulting transformation along X dimension (float version)
 
double applyX (const Tuple4Tpl< double > &vec) const
 Get the resulting transformation along X dimension (double version)
 
float applyY (const Tuple4Tpl< float > &vec) const
 Get the resulting transformation along Y dimension (float version)
 
double applyY (const Tuple4Tpl< double > &vec) const
 Get the resulting transformation along Y dimension (double version)
 
float applyZ (const Tuple4Tpl< float > &vec) const
 Get the resulting transformation along Z dimension (float version)
 
double applyZ (const Tuple4Tpl< double > &vec) const
 Get the resulting transformation along Z dimension (double version)
 
float applyW (const Tuple4Tpl< float > &vec) const
 Get the resulting transformation along the 4th dimension (float version)
 
double applyW (const Tuple4Tpl< double > &vec) const
 Get the resulting transformation along the 4th dimension (double version)
 
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)
 
ccGLMatrixTpl< T > transposed () const
 Returns transposed matrix.
 
void invert ()
 Inverts transformation.
 
ccGLMatrixTpl< T > inverse () const
 Returns inverse transformation.
 
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) const override
 Saves data to binary stream. 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.
 
virtual bool isSerializable () const
 Returns whether object is serializable of not. More...
 
virtual bool toFile (QFile &out) const
 Saves data to binary stream. More...
 
virtual bool fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap)
 Loads data from binary stream. More...
 

Static Public Member Functions

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 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 Member Functions

void internalRescale ()
 Transfers the homogenous coordinate (scale) to the whole matrix.
 

Protected Attributes

m_mat [OPENGL_MATRIX_SIZE]
 Internal 4x4 GL-style matrix data.
 

Additional Inherited Members

- Public Types inherited from ccSerializableObject
enum  DeserializationFlags { DF_POINT_COORDS_64_BITS = 1 , 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)
 

Detailed Description

template<typename T>
class ccGLMatrixTpl< T >

A 4x4 'transformation' matrix (column major order)

Transformation (M) is composed by a rotation (R) and a translation (T): M*X = R*X + T

Constructor & Destructor Documentation

◆ ccGLMatrixTpl() [1/4]

template<typename T >
ccGLMatrixTpl< T >::ccGLMatrixTpl ( )
inline

Default constructor.

Matrix is set to identity (see toIdentity) by default.

◆ ccGLMatrixTpl() [2/4]

template<typename T >
ccGLMatrixTpl< T >::ccGLMatrixTpl ( const float *  mat16f)
inlineexplicit

Constructor from a float GL matrix array.

Parameters
mat16fa 16 elements array (column major order)

◆ ccGLMatrixTpl() [3/4]

template<typename T >
ccGLMatrixTpl< T >::ccGLMatrixTpl ( const double *  mat16d)
inlineexplicit

Constructor from a double GL matrix array.

Warning
Will implicitly cast the elements to float!
Parameters
mat16da 16 elements array (column major order)

◆ ccGLMatrixTpl() [4/4]

template<typename T >
ccGLMatrixTpl< T >::ccGLMatrixTpl ( const Vector3Tpl< T > &  X,
const Vector3Tpl< T > &  Y,
const Vector3Tpl< T > &  Z,
const Vector3Tpl< T > &  Tr 
)
inline

Constructor from 4 columns (X,Y,Z,T)

Parameters
X3 first elements of the 1st column (last one is 0)
Y3 first elements of the 2nd column (last one is 0)
Z3 first elements of the 3rd column (last one is 0)
Tr3 first elements of the last column (last one is 1)

Member Function Documentation

◆ apply() [1/4]

template<typename T >
void ccGLMatrixTpl< T >::apply ( Tuple4Tpl< double > &  vec) const
inline

Applies transformation to a 3D vector (in place) - double version.

Input vector is directly modified after calling this method

◆ apply() [2/4]

template<typename T >
void ccGLMatrixTpl< T >::apply ( Tuple4Tpl< float > &  vec) const
inline

Applies transformation to a 4D vector (in place) - float version.

Input vector is directly modified after calling this method

◆ apply() [3/4]

template<typename T >
void ccGLMatrixTpl< T >::apply ( Vector3Tpl< double > &  vec) const
inline

Applies transformation to a 3D vector (in place) - double version.

Input vector is directly modified after calling this method

◆ apply() [4/4]

template<typename T >
void ccGLMatrixTpl< T >::apply ( Vector3Tpl< float > &  vec) const
inline

Applies transformation to a 3D vector (in place) - float version.

Input vector is directly modified after calling this method

◆ applyRotation() [1/4]

template<typename T >
void ccGLMatrixTpl< T >::applyRotation ( double  vec[3]) const
inline

Applies rotation only to a 3D vector (in place) - float version.

Input array is directly modified after calling this method

◆ applyRotation() [2/4]

template<typename T >
void ccGLMatrixTpl< T >::applyRotation ( float  vec[3]) const
inline

Applies rotation only to a 3D vector (in place) - float version.

Input array is directly modified after calling this method

◆ applyRotation() [3/4]

template<typename T >
void ccGLMatrixTpl< T >::applyRotation ( Vector3Tpl< double > &  vec) const
inline

Applies rotation only to a 3D vector (in place) - double version.

Input vector is directly modified after calling this method

◆ applyRotation() [4/4]

template<typename T >
void ccGLMatrixTpl< T >::applyRotation ( Vector3Tpl< float > &  vec) const
inline

Applies rotation only to a 3D vector (in place) - float version.

Input vector is directly modified after calling this method

◆ clearTranslation()

template<typename T >
void ccGLMatrixTpl< T >::clearTranslation ( )
inline

Clears translation.

Translation is set to (0,0,0).

◆ fromAsciiFile()

template<typename T >
virtual bool ccGLMatrixTpl< T >::fromAsciiFile ( QString  filename)
inlinevirtual

Loads matrix from an ASCII file.

Parameters
filenameinput file name

Reimplemented in ccIndexedTransformation.

◆ fromFile()

template<typename T >
bool ccGLMatrixTpl< T >::fromFile ( QFile &  in,
short  dataVersion,
int  flags,
LoadedIDMap oldToNewIDMap 
)
inlineoverridevirtual

Loads data from binary stream.

Parameters
ininput file (already opened)
dataVersionfile version
flagsdeserialization flags (see ccSerializableObject::DeserializationFlags)
oldToNewIDMapmap to link old IDs with new IDs
Returns
success

Reimplemented from ccSerializableObject.

◆ FromQuaternion()

template<typename T >
template<class Tq >
static ccGLMatrixTpl< T > ccGLMatrixTpl< T >::FromQuaternion ( const Tq  q[])
inlinestatic

Converts a quaternion to a rotation matrix.

Parameters
qquaternion (4 values: w,x,y,z)
Returns
corresponding rotation matrix

◆ FromString()

template<typename T >
static ccGLMatrixTpl< T > ccGLMatrixTpl< T >::FromString ( const QString &  matText,
bool &  success 
)
inlinestatic

Converts a 'text' matrix to a ccGLMatrix.

Parameters
[in]matTextmatrix text
[out]successwhether input matrix text is valid or not

◆ FromToRotation()

template<typename T >
static ccGLMatrixTpl< T > ccGLMatrixTpl< T >::FromToRotation ( const Vector3Tpl< T > &  from,
const Vector3Tpl< T > &  to 
)
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

Parameters
fromnormalized non-zero source vector
tonormalized non-zero destination vector

◆ FromViewDirAndUpDir()

template<typename T >
static ccGLMatrixTpl< T > ccGLMatrixTpl< T >::FromViewDirAndUpDir ( const Vector3Tpl< T > &  forward,
const Vector3Tpl< T > &  up 
)
inlinestatic

Generates a 'viewing' matrix from a looking vector and a 'up' direction.

Warning
No translation is applied (pure rotation matrix)
Parameters
forwardforward 'view' vector
upup vector
Returns
corresponding rotation matrix

◆ getColumn() [1/2]

template<typename T >
T * ccGLMatrixTpl< T >::getColumn ( unsigned  index)
inline

Returns a pointer to a given column.

Parameters
indexcolumn index (between 0 and 3)
Returns
pointer to the first element of the corresponding column

◆ getColumn() [2/2]

template<typename T >
const T * ccGLMatrixTpl< T >::getColumn ( unsigned  index) const
inline

Returns a const pointer to a given column.

Parameters
indexcolumn index (between 0 and 3)
Returns
pointer to the first element of the corresponding column

◆ getColumnAsVec3D()

template<typename T >
Vector3Tpl< T > ccGLMatrixTpl< T >::getColumnAsVec3D ( unsigned  index) const
inline

Returns a copy of a given column as a CCVector3.

4th value is ignored.

Parameters
indexcolumn index (between 0 and 3)
Returns
copy of the three first elements of the corresponding column

◆ getParameters() [1/2]

template<typename T >
void ccGLMatrixTpl< T >::getParameters ( T &  alpha_rad,
Vector3Tpl< T > &  axis3D,
Vector3Tpl< T > &  t3D 
) const
inline

Returns equivalent parameters: a rotation axis, an angle and a translation.

Parameters
[out]alpha_radrotation angle in radians (in [0;pi])
[out]axis3Dunit rotation axis
[out]t3Dtranslation

◆ getParameters() [2/2]

template<typename T >
void ccGLMatrixTpl< T >::getParameters ( T &  phi_rad,
T &  theta_rad,
T &  psi_rad,
Vector3Tpl< T > &  t3D 
) const
inline

Returns equivalent parameters: 3 rotation angles and a translation.

See http://en.wikipedia.org/wiki/Euler_angles (Tait-Bryan Z1Y2X3)

Parameters
[out]phi_radPhi angle (in radians)
[out]theta_radTheta angle (in radians)
[out]psi_radPsi angle (in radians)
[out]t3Dtranslation

◆ getTranslation() [1/2]

template<typename T >
T * ccGLMatrixTpl< T >::getTranslation ( )
inline

Returns a pointer to internal translation.

Translation corresponds to the beginning of the third column of the matrix.

◆ getTranslation() [2/2]

template<typename T >
const T * ccGLMatrixTpl< T >::getTranslation ( ) const
inline

Returns a const pointer to internal translation.

Translation corresponds to the beginning of the third column of the matrix.

◆ getTranslationAsVec3D()

template<typename T >
Vector3Tpl< T > ccGLMatrixTpl< T >::getTranslationAsVec3D ( ) const
inline

Returns a copy of the translation as a CCVector3.

Returns
translation vector

◆ initFromParameters() [1/2]

template<typename T >
void ccGLMatrixTpl< T >::initFromParameters ( alpha_rad,
const Vector3Tpl< T > &  axis3D,
const Vector3Tpl< T > &  t3D 
)
inline

Inits transformation from a rotation axis, an angle and a translation.

Parameters
[in]alpha_radrotation angle (in radians)
[in]axis3Drotation axis
[in]t3Dtranslation

◆ initFromParameters() [2/2]

template<typename T >
void ccGLMatrixTpl< T >::initFromParameters ( phi_rad,
theta_rad,
psi_rad,
const Vector3Tpl< T > &  t3D 
)
inline

Inits transformation from 3 rotation angles and a translation.

See http://en.wikipedia.org/wiki/Euler_angles (Tait-Bryan Z1Y2X3)

Parameters
[in]phi_radPhi angle (in radians)
[in]theta_radTheta angle (in radians)
[in]psi_radPsi angle (in radians)
[in]t3Dtranslation

◆ Interpolate()

template<typename T >
static ccGLMatrixTpl ccGLMatrixTpl< T >::Interpolate ( coef,
const ccGLMatrixTpl< T > &  glMat1,
const ccGLMatrixTpl< T > &  glMat2 
)
inlinestatic

Interpolates two matrices at relative position 'coef'.

Parameters
coefinterpolation position (should be between 0 and 1).
glMat1'left' matrix
glMat2'right' matrix

◆ isSerializable()

template<typename T >
bool ccGLMatrixTpl< T >::isSerializable ( ) const
inlineoverridevirtual

Returns whether object is serializable of not.

Reimplemented from ccSerializableObject.

◆ scaleColumn()

template<typename T >
void ccGLMatrixTpl< T >::scaleColumn ( unsigned  colIndex,
coef 
)
inline

Scales one column of the matrix.

Warning
The last row is never scaled
Parameters
colIndexcolumn index (0-3)
coefscaling coef.

◆ scaleRotation()

template<typename T >
void ccGLMatrixTpl< T >::scaleRotation ( coef)
inline

Scales the rotation part of the matrix.

Parameters
coefscaling coef.

◆ scaleRow()

template<typename T >
void ccGLMatrixTpl< T >::scaleRow ( unsigned  rowIndex,
coef 
)
inline

Scales one row of the matrix.

Parameters
rowIndextow index (0-3)
coefscaling coef.

◆ setColumn() [1/2]

template<typename T >
void ccGLMatrixTpl< T >::setColumn ( unsigned  index,
const Tuple4Tpl< T > &  v 
)
inline

Sets the content of a given column.

Parameters
indexcolumn index (between 0 and 3)
vnew column values

◆ setColumn() [2/2]

template<typename T >
void ccGLMatrixTpl< T >::setColumn ( unsigned  index,
const Vector3Tpl< T > &  v 
)
inline

Sets the content of a given column.

Parameters
indexcolumn index (between 0 and 3)
vnew column values

◆ setTranslation() [1/4]

template<typename T >
void ccGLMatrixTpl< T >::setTranslation ( const double  Tr[3])
inline

Sets translation from a double array.

Parameters
Tr3D vector as a double array

◆ setTranslation() [2/4]

template<typename T >
void ccGLMatrixTpl< T >::setTranslation ( const float  Tr[3])
inline

Sets translation from a float array.

Parameters
Tr3D vector as a float array

◆ setTranslation() [3/4]

template<typename T >
void ccGLMatrixTpl< T >::setTranslation ( const Vector3Tpl< double > &  Tr)
inline

Sets translation (double version)

Parameters
Tr3D vector

◆ setTranslation() [4/4]

template<typename T >
void ccGLMatrixTpl< T >::setTranslation ( const Vector3Tpl< float > &  Tr)
inline

Sets translation (float version)

Parameters
Tr3D vector

◆ shiftRotationCenter()

template<typename T >
void ccGLMatrixTpl< T >::shiftRotationCenter ( const Vector3Tpl< T > &  vec)
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'.

◆ toAsciiFile()

template<typename T >
virtual bool ccGLMatrixTpl< T >::toAsciiFile ( QString  filename,
int  precision = 12 
) const
inlinevirtual

Saves matrix to an ASCII file.

Parameters
filenameoutput file name
precisionoutput digits precision

Reimplemented in ccIndexedTransformation.

◆ toFile()

template<typename T >
bool ccGLMatrixTpl< T >::toFile ( QFile &  out) const
inlineoverridevirtual

Saves data to binary stream.

Parameters
outoutput file (already opened)
Returns
success

Reimplemented from ccSerializableObject.

◆ toString()

template<typename T >
QString ccGLMatrixTpl< T >::toString ( int  precision = 12,
QChar  separator = ' ' 
) const
inline

Returns matrix as a string.

Parameters
precisionnumerical precision
separatorseparator
Returns
string

◆ toZero()

template<typename T >
virtual void ccGLMatrixTpl< T >::toZero ( )
inlinevirtual

Clears matrix.

Matrix is set to 0.


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