96 template <
typename Tin,
typename Tout>
104 Tout* mat = outputMat.
data();
105 for (
unsigned j = 0; j < 3; ++j) {
106 *mat++ =
static_cast<Tout
>(R.
m_values[0][j]);
107 *mat++ =
static_cast<Tout
>(R.
m_values[1][j]);
108 *mat++ =
static_cast<Tout
>(R.
m_values[2][j]);
114 static_cast<Tout
>(Tr.
y),
115 static_cast<Tout
>(Tr.
z)));
121 template <
typename Tin,
typename Tout>
130 Tout* mat = outputMat.
data();
131 for (
unsigned j = 0; j < 3; ++j) {
132 *mat++ =
static_cast<Tout
>(R.
m_values[0][j] * S);
133 *mat++ =
static_cast<Tout
>(R.
m_values[1][j] * S);
134 *mat++ =
static_cast<Tout
>(R.
m_values[2][j] * S);
140 static_cast<Tout
>(Tr.
y),
141 static_cast<Tout
>(Tr.
z)));
148 template <
typename Tin,
typename Tout>
A 4x4 'transformation' matrix (column major order)
T * data()
Returns a pointer to internal data.
void shiftRotationCenter(const Vector3Tpl< T > &vec)
Shifts rotation center.
void setTranslation(const Vector3Tpl< float > &Tr)
Sets translation (float version)
Float version of ccGLMatrixTpl.
ccGLMatrix(const Vector3Tpl< float > &X, const Vector3Tpl< float > &Y, const Vector3Tpl< float > &Z, const Vector3Tpl< float > &Tr)
Constructor from 4 columns (X,Y,Z,Tr)
ccGLMatrix(const double *mat16d)
Constructor from a double GL matrix array.
ccGLMatrix(const ccGLMatrixTpl< float > &mat)
Copy constructor from a ccGLMatrixTpl.
ccGLMatrix(const float *mat16f)
Constructor from a float GL matrix array.
ccGLMatrix()
Default constructor.
Double version of ccGLMatrixTpl.
ccGLMatrixd(const ccGLMatrixTpl< double > &mat)
Copy constructor from a ccGLMatrixTpl.
ccGLMatrixd(const double *mat16d)
Constructor from a double GL matrix array.
ccGLMatrixd(const Vector3Tpl< double > &X, const Vector3Tpl< double > &Y, const Vector3Tpl< double > &Z, const Vector3Tpl< double > &Tr)
Constructor from 4 columns (X,Y,Z,Tr)
ccGLMatrixd(const float *mat16f)
Constructor from a float GL matrix array.
ccGLMatrixd()
Default constructor.
Scalar ** m_values
The matrix rows.
bool isValid() const
Returns matrix validity.
unsigned size() const
Returns matrix size.
ccGLMatrixTpl< Tout > FromCCLibMatrix(const cloudViewer::SquareMatrixTpl< Tin > &R, const Vector3Tpl< Tin > &Tr)
Constructor from a 3x3 rotation matrix R and a vector Tr.