#include <CMat4D.h>
Public Member Functions | |
CMat4D (void) | |
CMat4D (const CV4D &, const CV4D &, const CV4D &, const CV4D &) | |
CMat4D (const double *) | |
CMat4D (double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double) | |
CMat4D (const CMat4D &) | |
~CMat4D (void) | |
const CMat4D & | operator= (const CMat4D &) |
const CMat4D & | operator= (const double a) |
CMat4D & | operator+= (const CMat4D &m) |
CMat4D & | operator-= (const CMat4D &m) |
CMat4D & | operator *= (const CMat4D &) |
CMat4D | operator+ (const CMat4D &) const |
CMat4D | operator- (const CMat4D &) const |
CMat4D | operator * (const CMat4D &m) const |
CMat4D | operator * (double scalar) const |
bool | operator== (const CMat4D &m) const |
bool | operator!= (const CMat4D &m) const |
double | operator() (int i, int j) const |
CV4D | operator[] (int i) const |
CV4D | operator() (int j) const |
const double * | getArray () |
void | clear (void) |
void | setValues (double *field) |
double | getCoeff (int i, int j) const |
void | setCoeff (int i, int j, double value) |
CMat4D | getTransposed (void) const |
CMat4D | getInverted (void) const |
bool | invert (void) |
void | transpose (void) |
void | print (void) |
void | setIdentity (void) |
CV4D | getRow (int) |
CV4D | getCol (int) |
void | setRow (int nRow, const CV4D &) |
void | setCol (int nCol, const CV4D &) |
void | setRows (const CV4D &, const CV4D &, const CV4D &, const CV4D &) |
void | setCols (const CV4D &, const CV4D &, const CV4D &, const CV4D &) |
void | setScaling (const CV4D &) |
void | setScaling (const CV3D &) |
void | setScaling (double, double, double) |
void | setTranslation (const CV4D &) |
void | setTranslation (const CV3D &) |
void | setTranslation (double, double, double) |
void | setRotation (CV4D &, double) |
void | setRotation (CV3D &, double) |
void | setRotation (CQuat &) |
Static Public Member Functions | |
static CMat4D | PIdentity (void) |
static CMat4D | PTranslate (const CV4D &) |
static CMat4D | PTranslate (const CV3D &) |
static CMat4D | PTranslate (double, double, double) |
static CMat4D | PScale (const CV4D &) |
static CMat4D | PScale (const CV3D &) |
static CMat4D | PScale (double, double, double) |
static CMat4D | PRotate (const CV4D &, double) |
static CMat4D | PRotate (const CV3D &, double) |
static CMat4D | PRotate (CQuat &) |
Private Member Functions | |
double * | get1DField (void) |
double ** | get2DField (void) |
Private Attributes | |
double | m_ardValues [16] |
Friends | |
CV4D | operator * (const CMat4D &, const CV4D &) |
CP4D | operator * (const CMat4D &, const CP4D &) |
CMat4D | operator * (double, const CMat4D &) |
CMat4D | operator * (const CMat4D &M, double rdFactor) |
friend::ostream & | operator<< (::ostream &s, const CMat4D &m) |
Note: CMat4D objects are handled in classic mathematical manner, i.e. to "transform a vector" multiply it like Tv - i.e. we have column vectors multiplied from the right side. [richi]
CMat4D::CMat4D | ( | void | ) |
Default Constructor.
Construct new matrix with the values passed by the vectors. The values of 'col1' are put in the first column, the values of 'col2' are put to the second column and so on.
CMat4D::CMat4D | ( | const double * | ) |
Construct new matrix with the values passed in '*field'. The first four values of the array passed by 'field' are stored in the first column of the matrix and so on.
CMat4D::CMat4D | ( | double | , | |
double | , | |||
double | , | |||
double | , | |||
double | , | |||
double | , | |||
double | , | |||
double | , | |||
double | , | |||
double | , | |||
double | , | |||
double | , | |||
double | , | |||
double | , | |||
double | , | |||
double | ||||
) |
Construct new matrix with values passed in [] order.
CMat4D::CMat4D | ( | const CMat4D & | ) |
Copy constructor.
CMat4D::~CMat4D | ( | void | ) |
Default Destructor.
void CMat4D::clear | ( | void | ) |
Initialize the matrix with 0.
double * CMat4D::get1DField | ( | void | ) | [private] |
Returns a one dimensional array of the matrix elements.
double ** CMat4D::get2DField | ( | void | ) | [private] |
Returns a two dimensional array of the matrix elements.
const double* CMat4D::getArray | ( | ) | [inline] |
Returns the pointer to the array of the matrix.
double CMat4D::getCoeff | ( | int | i, | |
int | j | |||
) | const |
Returns the element in the i-th row and j-th coloumn.
CV4D CMat4D::getCol | ( | int | ) |
Returns the column of the matrix (0 through 3).
CMat4D CMat4D::getInverted | ( | void | ) | const |
CV4D CMat4D::getRow | ( | int | ) |
Returns the row of the matrix (0 through 3).
CMat4D CMat4D::getTransposed | ( | void | ) | const |
Tranpose the matrix.
bool CMat4D::invert | ( | void | ) |
invert this matrix
CMat4D CMat4D::operator * | ( | double | scalar | ) | const |
Multiplication of a matrix with a scalar.
Multiplication of a matrix (this) with another matrix.
bool CMat4D::operator!= | ( | const CMat4D & | m | ) | const |
boolean operator ( NOT EQUAL )
CV4D CMat4D::operator() | ( | int | j | ) | const |
Returns the j-th column of the matrix.
double CMat4D::operator() | ( | int | i, | |
int | j | |||
) | const |
Returns the element in the i-th row and j-th coloumn.
const CMat4D & CMat4D::operator= | ( | const double | a | ) |
Set the diagonal to the passed value.
bool CMat4D::operator== | ( | const CMat4D & | m | ) | const |
boolean operator ( EQUAL )
CV4D CMat4D::operator[] | ( | int | i | ) | const |
Returns the i-th row of the matrix.
CMat4D CMat4D::PIdentity | ( | void | ) | [static] |
Construtor for identity matrix.
void CMat4D::print | ( | void | ) |
Print the matrix to standard output.
Construtor generating identity matrix with rotation defined by the quaternion.
Construtor generating identity matrix with rotation around an axis by a certain angle in rad.
Construtor generating identity matrix with rotation around an axis by a certain angle in rad. Please note that only x, y, and z of the vector are used, w is omitted.
CMat4D CMat4D::PScale | ( | double | , | |
double | , | |||
double | ||||
) | [static] |
Construtor generating identity matrix with scaling by a vector.
Construtor generating identity matrix with scaling by a vector.
Construtor generating identity matrix with scaling by a vector. Please note, only x, y, and z of the vector are used. W is omitted.
CMat4D CMat4D::PTranslate | ( | double | , | |
double | , | |||
double | ||||
) | [static] |
Construtor generating identity matrix with a translatation by a vector.
Construtor generating identity matrix with a translatation by a vector.
Construtor generating identity matrix with a translatation by a vector. Please note, only x, y, and z of the vector are used. W is omitted.
void CMat4D::setCoeff | ( | int | i, | |
int | j, | |||
double | value | |||
) |
Sets the element in the i-th row and j-th coloumn.
void CMat4D::setCol | ( | int | nCol, | |
const CV4D & | ||||
) |
Sets the specified column of the matrix with the given vector.
Sets all four columns of the matrix with the given vectors.
void CMat4D::setIdentity | ( | void | ) |
Set matrix to identity.
void CMat4D::setRotation | ( | CQuat & | ) |
Rotates using the given quaternion.
void CMat4D::setRotation | ( | CV3D & | , | |
double | ||||
) |
Rotates around an axis by a certain angle.
void CMat4D::setRotation | ( | CV4D & | , | |
double | ||||
) |
Rotates around an axis by a certain angle.
void CMat4D::setRow | ( | int | nRow, | |
const CV4D & | ||||
) |
Sets the specified row of the matrix with the given vector.
Sets all four rows of the matrix with the given vectors.
void CMat4D::setScaling | ( | double | , | |
double | , | |||
double | ||||
) |
Sets the scaling of the matrix (diagonal elements). Note Before this, the matrix is cleard and afterwards, the fourth diagonal element is set to 1!!!
void CMat4D::setScaling | ( | const CV3D & | ) |
Sets the scaling of the matrix (diagonal elements). Note Before this, the matrix is cleard and afterwards, the fourth diagonal element is set to 1!!!
void CMat4D::setScaling | ( | const CV4D & | ) |
Sets the scaling of the matrix (diagonal elements). Note Before this, the matrix is cleard and afterwards, the fourth diagonal element is set to 1!!!
void CMat4D::setTranslation | ( | double | , | |
double | , | |||
double | ||||
) |
Sets the scaling of the matrix (diagonal elements). Note Before this, the matrix is cleard and afterwards, the fourth element in the last row is set to 1!!!
void CMat4D::setTranslation | ( | const CV3D & | ) |
Sets the scaling of the matrix (diagonal elements). Note Before this, the matrix is cleard and afterwards, the fourth element in the last row is set to 1!!!
void CMat4D::setTranslation | ( | const CV4D & | ) |
Sets the scaling of the matrix (diagonal elements). Note Before this, the matrix is cleard and afterwards, the fourth element in the last row is set to 1!!!
void CMat4D::setValues | ( | double * | field | ) |
Set the coefficient of the matrix to the values given in *field. The first four values of the array passed by 'field' are stored in the first column of the matrix and so on.
void CMat4D::transpose | ( | void | ) |
transpose this matrix
Multiplication of a scalar with a matrix.
Multiplication of a matrix with a scalar.
Multiplication of a matrix with a point.
Multiplication of a matrix with a vector.
::ostream& operator<< | ( | ::ostream & | s, | |
const CMat4D & | m | |||
) | [friend] |
Print the matrix to output stream.
double CMat4D::m_ardValues[16] [private] |