Homogenous matrix. More...
#include <vecmath.h>
Public Member Functions | |
void | arrayToMatrix (std::vector< double > &values) |
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 | invert () |
Inverts the matrix (only for homogenous matrices) | |
PRECISION | length () const |
void | matrixToArray (std::vector< double > &values) |
void | mul (const CMatrix &first, const CMatrix &second) |
Assigns product of two matrices to matrix. | |
void | mulNoAlloc (const CMatrix &first, const CMatrix &second) |
CMatrix | operator* (PRECISION f) const |
Scalar multiplication. | |
CMatrix | operator* (const CMatrix &m) const |
Matrix multiplication. | |
CVec | operator* (const CVec &v) const |
Matrix vector product. | |
CMatrix | operator+ (const CMatrix &b) const |
Matrix addition. | |
CMatrix & | operator+= (const CVec &v) |
Overwrites matrix with sum of matrix and vector. | |
CMatrix | operator- (const CMatrix &b) const |
Matrix subtraction. | |
CMatrix & | operator= (const CMatrix &v) |
Assigns values of matrix v to matrix. | |
const CVec & | operator[] (int i) const |
Array access (read) | |
CVec & | operator[] (int i) |
Array access (read&write) | |
void | print (bool round=false) const |
Prints matrix to console. | |
void | printText () |
void | randomOrientation (double max=2.0 *M_PI) |
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) |
void | setDh (const robotLibPbD::CDh &dh) |
Creates Denavit Hartenberg matrix. | |
std::string | toString (bool round=false) |
PRECISION | trace () |
Trace - sum of diagonal elements - of matrix. | |
void | transpose () |
Transposes the matrix. | |
void | unity () |
Public Attributes | |
PRECISION | a [16] |
Definition at line 73 of file vecmath.cpp.
robotLibPbD::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 |
||
) |
Definition at line 132 of file vecmath.cpp.
void robotLibPbD::CMatrix::arrayToMatrix | ( | std::vector< double > & | values | ) |
Definition at line 332 of file vecmath.cpp.
void robotLibPbD::CMatrix::invert | ( | ) | [inline] |
PRECISION robotLibPbD::CMatrix::length | ( | ) | const |
Definition at line 355 of file vecmath.cpp.
void robotLibPbD::CMatrix::matrixToArray | ( | std::vector< double > & | values | ) |
Definition at line 313 of file vecmath.cpp.
void robotLibPbD::CMatrix::mul | ( | const CMatrix & | first, |
const CMatrix & | second | ||
) | [inline] |
void robotLibPbD::CMatrix::mulNoAlloc | ( | const CMatrix & | first, |
const CMatrix & | second | ||
) | [inline] |
Scalar multiplication.
Definition at line 235 of file vecmath.cpp.
Matrix multiplication.
Definition at line 262 of file vecmath.cpp.
Matrix vector product.
Definition at line 279 of file vecmath.cpp.
Matrix addition.
Definition at line 244 of file vecmath.cpp.
Overwrites matrix with sum of matrix and vector.
Definition at line 270 of file vecmath.cpp.
Matrix subtraction.
Definition at line 253 of file vecmath.cpp.
Assigns values of matrix v to matrix.
Definition at line 301 of file vecmath.cpp.
const CVec & robotLibPbD::CMatrix::operator[] | ( | int | i | ) | const |
Array access (read)
Definition at line 290 of file vecmath.cpp.
CVec & robotLibPbD::CMatrix::operator[] | ( | int | i | ) |
Array access (read&write)
Definition at line 295 of file vecmath.cpp.
void robotLibPbD::CMatrix::print | ( | bool | round = false | ) | const |
Prints matrix to console.
Definition at line 207 of file vecmath.cpp.
void robotLibPbD::CMatrix::printText | ( | ) |
Definition at line 100 of file vecmath.cpp.
void robotLibPbD::CMatrix::randomOrientation | ( | double | max = 2.0 * M_PI | ) |
Definition at line 81 of file vecmath.cpp.
void robotLibPbD::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 |
||
) |
Definition at line 144 of file vecmath.cpp.
void robotLibPbD::CMatrix::setDh | ( | const robotLibPbD::CDh & | dh | ) |
Creates Denavit Hartenberg matrix.
Definition at line 156 of file vecmath.cpp.
std::string robotLibPbD::CMatrix::toString | ( | bool | round = false | ) |
Definition at line 221 of file vecmath.cpp.
Trace - sum of diagonal elements - of matrix.
Definition at line 201 of file vecmath.cpp.
void robotLibPbD::CMatrix::transpose | ( | ) |
Transposes the matrix.
Definition at line 118 of file vecmath.cpp.
void robotLibPbD::CMatrix::unity | ( | ) |
Definition at line 92 of file vecmath.cpp.