|
| SquareMatrixTpl () |
| Default constructor. More...
|
|
| SquareMatrixTpl (unsigned size) |
| Constructor with a given size. More...
|
|
| SquareMatrixTpl (const SquareMatrixTpl< double > &mat) |
| Constructor from another double matrix. More...
|
|
| SquareMatrixTpl (const SquareMatrixTpl< float > &mat) |
| Constructor from another float matrix. More...
|
|
| SquareMatrixTpl (const float M16f[], bool rotationOnly=false) |
| "From OpenGl" constructor (float version) More...
|
|
| SquareMatrixTpl (const double M16d[], bool rotationOnly=false) |
| "From OpenGl" constructor (double version) More...
|
|
virtual | ~SquareMatrixTpl () |
| Default destructor.
|
|
unsigned | size () const |
| Returns matrix size.
|
|
bool | isValid () const |
| Returns matrix validity. More...
|
|
void | invalidate () |
| Invalidates matrix. More...
|
|
Scalar * | row (unsigned index) |
| Returns pointer to matrix row.
|
|
void | setValue (unsigned row, unsigned column, Scalar value) |
| Sets a particular matrix value.
|
|
Scalar | getValue (unsigned row, unsigned column) const |
| Returns a particular matrix value.
|
|
SquareMatrixTpl & | operator= (const SquareMatrixTpl &B) |
| Matrix copy operator.
|
|
SquareMatrixTpl | operator+ (const SquareMatrixTpl &B) const |
| Addition.
|
|
const SquareMatrixTpl & | operator+= (const SquareMatrixTpl &B) |
| In-place addition.
|
|
SquareMatrixTpl | operator- (const SquareMatrixTpl &B) const |
| Subtraction.
|
|
const SquareMatrixTpl & | operator-= (const SquareMatrixTpl &B) |
| In-place subtraction.
|
|
SquareMatrixTpl | operator* (const SquareMatrixTpl &B) const |
| Multiplication (M = A*B)
|
|
Vector3Tpl< Scalar > | operator* (const CCVector3f &V) const |
| Multiplication by a vector.
|
|
CCVector3d | operator* (const CCVector3d &V) const |
| Multiplication by a vector.
|
|
const SquareMatrixTpl & | operator*= (const SquareMatrixTpl &B) |
| In-place multiplication.
|
|
void | apply (const float vec[], float result[]) const |
| Multiplication by a float vector, outputs a float vector. More...
|
|
void | apply (const float vec[], double result[]) const |
| Multiplication by a float vector, outputs a double vector. More...
|
|
void | apply (const double vec[], double result[]) const |
| Multiplication by a double vector. More...
|
|
void | transpose () |
| In-place transpose.
|
|
SquareMatrixTpl | transposed () const |
| Returns the transposed version of this matrix.
|
|
void | clear () |
| Sets all elements to 0.
|
|
SquareMatrixTpl | inv () const |
| Returns inverse (Gauss)
|
|
void | print (FILE *fp=nullptr) const |
| Prints out matrix to console or file. More...
|
|
void | toIdentity () |
| Sets matrix to identity.
|
|
void | scale (Scalar coef) |
| Scales matrix (all elements are multiplied by the same coef.)
|
|
Scalar | trace () const |
| Returns trace.
|
|
double | computeDet () const |
| Returns determinant.
|
|
void | initFromQuaternion (const float q[]) |
| Creates a rotation matrix from a quaternion (float version) More...
|
|
void | initFromQuaternion (const double q[]) |
| Creates a rotation matrix from a quaternion (double version) More...
|
|
bool | toQuaternion (double q[]) |
| Converts rotation matrix to quaternion. More...
|
|
Scalar | deltaDeterminant (unsigned column, Scalar *Vec) const |
| Returns Delta-determinant (see Kramer formula)
|
|
void | toGlMatrix (float M16f[]) const |
| Converts a 3*3 or 4*4 matrix to an OpenGL-style float matrix (float[16])
|
|
void | toGlMatrix (double M16d[]) const |
| Converts a 3*3 or 4*4 matrix to an OpenGL-style double matrix (double[16])
|
|
bool | svd (SquareMatrixTpl &S, SquareMatrixTpl &U, SquareMatrixTpl &V) const |
| SVD decomposition (inspired from https://github.com/dmalhotra/pvfmm/blob/develop/include/mat_utils.txx)
|
|
template<typename Scalar>
class CCCoreLib::SquareMatrixTpl< Scalar >
Square matrix.
Row-major ordered matrix (i.e. elements are accessed with 'values[row][column]')