Main Page   Groups   Namespaces  

mini3d::matrix3d Class Reference
[Core]

matrix3d - A 3x3 double matrix class, derived from matrix<double, 3, 3> More...

Inheritance diagram for mini3d::matrix3d:

mini3d::matrix< double, 3, 3 > List of all members.

Public Member Functions

 matrix3d ()
 A default constructor.
 matrix3d (const matrix<double, 3, 3>& src)
 A copy constructor from base class.
 matrix3d (const matrix3d& src)
 A copy constructor.
 matrix3d (double m[9])
 A constructor.
 matrix3d (double m[3][3])
 A constructor.
 matrix3d (double m0, double m1, double m2, double m3, double m4, double m5, double m6, double m7, double m8)
 A constructor.
virtual ~matrix3d ()
 A destructor.
matrix3d operator* (const matrix3d& m) const
 Multiply the matrix with a matrix and return the new matrix.
vector3d operator* (const vector3d& v) const
 Multiply the matrix with a vector and return the new vector.
matrix3doperator= (const matrix<double, 3, 3>& src)
 Copy from the base class.
void makeRotate (quat4d q)
 Make a transformation for rotation.
void makeRotate (double rad, const vector3d& axis)
 Make a transformation for rotation.
void getRotate (quat4d& q) const
 Get the quaternion.
void getRotateYZX (vector3d& e) const
 Get the Euler angles in YZX order (body frame).
void getRotateXYZ (vector3d& e) const
 Get the Euler angles in XYZ order (body frame).
void getRotateXYZf (vector3d& e) const
 Get the Euler angles in XYZ order (fixed frame).
bool invert ()
 Invert itself.
bool inverse (matrix3d& inv) const
 Return the inverse of this matrix.
matrix3d transpose () const
 Get a transpose of this matrix.

Static Public Attributes

static const matrix3d _identity_matrix
static const matrix3d _zero_matrix

Detailed Description

matrix3d - A 3x3 double matrix class, derived from matrix<double, 3, 3>

The matrix is row major

[ m0, m1, m2 ]
[ m3, m4, m5 ]
[ m6, m7, m8 ]

{ m0, m1, m2, m3, m4 , m5, m6, m7, m8 }


Constructor & Destructor Documentation

mini3d::matrix3d::matrix3d (  ) 
 

A default constructor.

The matrix will set as a zero matrix.

mini3d::matrix3d::matrix3d ( const matrix<double, 3, 3>&  src  ) 
 

A copy constructor from base class.

Parameters:
src the source matrix to copy from.

mini3d::matrix3d::matrix3d ( const matrix3d src  ) 
 

A copy constructor.

Parameters:
src the source matrix to copy from.

mini3d::matrix3d::matrix3d ( double  m[9]  ) 
 

A constructor.

The matrix will set as
[m[0] m[1] m[2]
m[3] m[4] m[5]
m[6] m[7] m[8] ].

Parameters:
m a floating point array

mini3d::matrix3d::matrix3d ( double  m[3][3]  ) 
 

A constructor.

The matrix will set as
[m[0][0] m[0][1] m[0][2]
m[1][0] m[1][1] m[1][2]
m[2][0] m[2][1] m[2][2] ].

Parameters:
m a floating point array

mini3d::matrix3d::matrix3d ( double  m0,
double  m1,
double  m2,
double  m3,
double  m4,
double  m5,
double  m6,
double  m7,
double  m8
 

A constructor.

The matrix will set as
[m[0] m[1] m[2]
m[3] m[4] m[5]
m[6] m[7] m[8] ].

virtual mini3d::matrix3d::~matrix3d (  )  [virtual]
 

A destructor.


Member Function Documentation

void mini3d::matrix3d::getRotate ( quat4d q  )  const
 

Get the quaternion.

Parameters:
q the quaternion

void mini3d::matrix3d::getRotateXYZ ( vector3d e  )  const
 

Get the Euler angles in XYZ order (body frame).

Parameters:
e the Euler angles

void mini3d::matrix3d::getRotateXYZf ( vector3d e  )  const
 

Get the Euler angles in XYZ order (fixed frame).

Parameters:
e the Euler angles

void mini3d::matrix3d::getRotateYZX ( vector3d e  )  const
 

Get the Euler angles in YZX order (body frame).

Parameters:
e the Euler angles

bool mini3d::matrix3d::inverse ( matrix3d inv  )  const
 

Return the inverse of this matrix.

Parameters:
inv the inverse of this matrix.
Returns:
true if success, false otherwise

bool mini3d::matrix3d::invert (  ) 
 

Invert itself.

Returns:
true success, false if singular

void mini3d::matrix3d::makeRotate ( double  rad,
const vector3d axis
 

Make a transformation for rotation.

Parameters:
rad the opAngle of rotation
axis the axis of rotation

void mini3d::matrix3d::makeRotate ( quat4d  q  ) 
 

Make a transformation for rotation.

Parameters:
q the quaternion which represent a rotation

vector3d mini3d::matrix3d::operator* ( const vector3d v  )  const
 

Multiply the matrix with a vector and return the new vector.

result = (*this) * v;

Parameters:
v the vector to multiply with.
Returns:
a new vector.

matrix3d mini3d::matrix3d::operator* ( const matrix3d m  )  const
 

Multiply the matrix with a matrix and return the new matrix.

result = (*this) * m;

Parameters:
m the matrix to multiply with.
Returns:
a new matrix.

matrix3d& mini3d::matrix3d::operator= ( const matrix<double, 3, 3>&  src  ) 
 

Copy from the base class.

Parameters:
src the matrix to copy from
Returns:
itself

matrix3d mini3d::matrix3d::transpose (  )  const [inline]
 

Get a transpose of this matrix.

Returns:
transpose of this matrix

Reimplemented from mini3d::matrix<double, 3, 3>.


Member Data Documentation

const matrix3d mini3d::matrix3d::_identity_matrix [static]
 

const matrix3d mini3d::matrix3d::_zero_matrix [static]
 


The documentation for this class was generated from the following file:
Generated for libmini3d by Doxygen 1.4.4 © 1997-2001