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) More... | |
PRECISION | length () const |
void | matrixToArray (std::vector< double > &values) |
void | mul (const CMatrix &first, const CMatrix &second) |
Assigns product of two matrices to matrix. More... | |
void | mulNoAlloc (const CMatrix &first, const CMatrix &second) |
CMatrix | operator* (PRECISION f) const |
Scalar multiplication. More... | |
CMatrix | operator* (const CMatrix &m) const |
Matrix multiplication. More... | |
CVec | operator* (const CVec &v) const |
Matrix vector product. More... | |
CMatrix | operator+ (const CMatrix &b) const |
Matrix addition. More... | |
CMatrix & | operator+= (const CVec &v) |
Overwrites matrix with sum of matrix and vector. More... | |
CMatrix | operator- (const CMatrix &b) const |
Matrix subtraction. More... | |
CMatrix & | operator= (const CMatrix &v) |
Assigns values of matrix v to matrix. More... | |
const CVec & | operator[] (int i) const |
Array access (read) More... | |
CVec & | operator[] (int i) |
Array access (read&write) More... | |
void | print (bool round=false) const |
Prints matrix to console. More... | |
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. More... | |
std::string | toString (bool round=false) |
PRECISION | trace () |
Trace - sum of diagonal elements - of matrix. More... | |
void | transpose () |
Transposes the matrix. More... | |
void | unity () |
Public Attributes | |
PRECISION | a [16] |
robotLibPbD::CMatrix::CMatrix | ( | ) |
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.
|
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.
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.
PRECISION robotLibPbD::CMatrix::trace | ( | ) |
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.