Public Member Functions | Public Attributes | List of all members
robotLibPbD::CMatrix Class Reference

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...
 
CMatrixoperator+= (const CVec &v)
 Overwrites matrix with sum of matrix and vector. More...
 
CMatrix operator- (const CMatrix &b) const
 Matrix subtraction. More...
 
CMatrixoperator= (const CMatrix &v)
 Assigns values of matrix v to matrix. More...
 
const CVecoperator[] (int i) const
 Array access (read) More...
 
CVecoperator[] (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]
 

Detailed Description

Homogenous matrix.

Definition at line 187 of file vecmath.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

void robotLibPbD::CMatrix::arrayToMatrix ( std::vector< double > &  values)

Definition at line 332 of file vecmath.cpp.

void robotLibPbD::CMatrix::invert ( )
inline

Inverts the matrix (only for homogenous matrices)

Definition at line 461 of file vecmath.h.

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

Assigns product of two matrices to matrix.

Definition at line 380 of file vecmath.h.

void robotLibPbD::CMatrix::mulNoAlloc ( const CMatrix first,
const CMatrix second 
)
inline

Definition at line 405 of file vecmath.h.

CMatrix robotLibPbD::CMatrix::operator* ( PRECISION  f) const

Scalar multiplication.

Definition at line 235 of file vecmath.cpp.

CMatrix robotLibPbD::CMatrix::operator* ( const CMatrix m) const

Matrix multiplication.

Definition at line 262 of file vecmath.cpp.

CVec robotLibPbD::CMatrix::operator* ( const CVec v) const

Matrix vector product.

Definition at line 279 of file vecmath.cpp.

CMatrix robotLibPbD::CMatrix::operator+ ( const CMatrix b) const

Matrix addition.

Definition at line 244 of file vecmath.cpp.

CMatrix & robotLibPbD::CMatrix::operator+= ( const CVec v)

Overwrites matrix with sum of matrix and vector.

Definition at line 270 of file vecmath.cpp.

CMatrix robotLibPbD::CMatrix::operator- ( const CMatrix b) const

Matrix subtraction.

Definition at line 253 of file vecmath.cpp.

CMatrix & robotLibPbD::CMatrix::operator= ( const CMatrix v)

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.

Member Data Documentation

PRECISION robotLibPbD::CMatrix::a[16]

Definition at line 190 of file vecmath.h.


The documentation for this class was generated from the following files:


asr_kinematic_chain_optimizer
Author(s): Aumann Florian, Heller Florian, Jäkel Rainer, Wittenbeck Valerij
autogenerated on Mon Jun 10 2019 12:35:36