#include <vecmath.h>
Public Member Functions | |
CMatrix () | |
CMatrix (PRECISION a0, PRECISION a4, PRECISION a8, PRECISION a12, PRECISION a1, PRECISION a5, PRECISION a9, PRECISION a13, PRECISION a2, PRECISION a6, PRECISION a10, PRECISION a14, PRECISION a3=0.0f, PRECISION a7=0.0f, PRECISION a11=0.0f, PRECISION a15=1.0f) | |
void | set (PRECISION a0, PRECISION a4, PRECISION a8, PRECISION a12, PRECISION a1, PRECISION a5, PRECISION a9, PRECISION a13, PRECISION a2, PRECISION a6, PRECISION a10, PRECISION a14, PRECISION a3=0.0f, PRECISION a7=0.0f, PRECISION a11=0.0f, PRECISION a15=1.0f) |
PRECISION | trace () |
Trace - sum of diagonal elements - of matrix. | |
void | transpose () |
Transposes the matrix. | |
void | invert () |
Inverts the matrix (only for homogenous matrices). | |
void | mul (const CMatrix &first, const CMatrix &second) |
Assigns product of two matrices to matrix. | |
void | print (bool round=false) |
Prints matrix to console. | |
void | setDh (const CDh &dh) |
Creates Denavit Hartenberg matrix. | |
void | updateDh (const CDh &dh) |
Updates variable parts of the Denavit Hartenberg matrix. | |
CMatrix | operator * (PRECISION f) const |
Scalar multiplication. | |
CMatrix | operator+ (const CMatrix &b) const |
Matrix addition. | |
CMatrix | operator- (const CMatrix &b) const |
Matrix subtraction. | |
CMatrix | operator * (const CMatrix &m) const |
Matrix multiplication. | |
CMatrix & | operator+= (const CVec &v) |
Overwrites matrix with sum of matrix and vector. | |
CVec | operator * (const CVec &v) const |
Matrix vector product. | |
const CVec & | operator[] (int i) const |
Array access (read&write). | |
CMatrix & | operator= (const CMatrix &v) |
Assigns values of matrix v to matrix. | |
Public Attributes | |
PRECISION | a [16] |
CMatrix::CMatrix | ( | ) |
CMatrix::CMatrix | ( | PRECISION | a0, | |
PRECISION | a4, | |||
PRECISION | a8, | |||
PRECISION | a12, | |||
PRECISION | a1, | |||
PRECISION | a5, | |||
PRECISION | a9, | |||
PRECISION | a13, | |||
PRECISION | a2, | |||
PRECISION | a6, | |||
PRECISION | a10, | |||
PRECISION | a14, | |||
PRECISION | a3 = 0.0f , |
|||
PRECISION | a7 = 0.0f , |
|||
PRECISION | a11 = 0.0f , |
|||
PRECISION | a15 = 1.0f | |||
) |
void CMatrix::set | ( | PRECISION | a0, | |
PRECISION | a4, | |||
PRECISION | a8, | |||
PRECISION | a12, | |||
PRECISION | a1, | |||
PRECISION | a5, | |||
PRECISION | a9, | |||
PRECISION | a13, | |||
PRECISION | a2, | |||
PRECISION | a6, | |||
PRECISION | a10, | |||
PRECISION | a14, | |||
PRECISION | a3 = 0.0f , |
|||
PRECISION | a7 = 0.0f , |
|||
PRECISION | a11 = 0.0f , |
|||
PRECISION | a15 = 1.0f | |||
) |
PRECISION CMatrix::trace | ( | ) |
Trace - sum of diagonal elements - of matrix.
void CMatrix::transpose | ( | ) |
Transposes the matrix.
void CMatrix::invert | ( | ) |
Inverts the matrix (only for homogenous matrices).
Assigns product of two matrices to matrix.
void CMatrix::print | ( | bool | round = false |
) |
Prints matrix to console.
void CMatrix::setDh | ( | const CDh & | dh | ) |
Creates Denavit Hartenberg matrix.
void CMatrix::updateDh | ( | const CDh & | dh | ) |
Updates variable parts of the Denavit Hartenberg matrix.
CMatrix CMatrix::operator * | ( | PRECISION | f | ) | const |
Scalar multiplication.
const CVec & CMatrix::operator[] | ( | int | i | ) | const |
Array access (read&write).
PRECISION CMatrix::a[16] |