wMatrix class More...

List of all members.

Public Member Functions

 wMatrix ()
 Construct an unintialized matrix.
 wMatrix (const wVector &X, const wVector &Y, const wVector &Z, const wVector &P)
 Construct the matrix.
 wMatrix (const real *position, const real *rotation)
 Constructor.
 wMatrix (const wMatrix &other)
 Copy constructor.
 wMatrix (const wQuaternion &rotation, const wVector &position)
 Constructor.
wVector getEuleroAngles () const
 return the Eulero angle of rotation
wMatrix inverse () const
 calculate the inverse of transformation matrix
wMatrix operator* (const wMatrix &B) const
 matrix multiplication
wMatrixoperator= (const wMatrix &other)
 Copy operator.
const wVectorT< true > & operator[] (int i) const
 indexing operator (const version)
wVectorT< true > & operator[] (int i)
 indexing operator
wMatrix rotateAround (const wVector &axis, const wVector &centre, real angle) const
 Rotate this matrix around the axis, and position passed of radians specified.
wMatrix rotateMatrix (const wMatrix &tm) const
 rotate the matrix passed by rotation specified by this and return a copy
wVector rotateVector (const wVector &v) const
 rotate the vector v, it doesn't apply position transformation
void sanitifize ()
 change the matrix in order to get a valid one that represent the same rotation/translation
bool sanityCheck ()
 return true if the transformation matrix is valid
wVector transformPlane (const wVector &localPlane) const
 ...
void transformTriplex (real *dst, int dstStrideInBytes, real *src, int srcStrideInBytes, int count) const
 apply transformation to a chunck of vectors
wVector transformVector (const wVector &v) const
 apply both rotation and translation to the vector v
wMatrix transpose () const
 transpose the rotation sub-matrix
wMatrix transpose4X4 () const
 full transposition of the transformation matrix
wVector unrotateVector (const wVector &v) const
 inverte the rotation of this matrix on the vector v
wVector untransformPlane (const wVector &globalPlane) const
 ...
wVector untransformVector (const wVector &v) const
 invert the rotation and translation on the vector v

Static Public Member Functions

static wMatrix grammSchmidt (const wVector &dir)
 calculate an orthonormal matrix with the Z vector pointing on the dir direction, and the Y and Z are determined by using the Gramm-Schmidth procedure
static wMatrix identity ()
 create an identity matrix
static wMatrix pitch (real ang)
 create a rotation around X axis of ang radians
static wMatrix roll (real ang)
 create a rotation around Z axis of ang radians
static wMatrix yaw (real ang)
 create a rotation around Y axis of ang radians
static wMatrix zero ()
 create a zero matrix

Public Attributes

wVectorT< true > w_pos
wVectorT< true > x_ax
wVectorT< true > y_ax
wVectorT< true > z_ax

Detailed Description

wMatrix class

\

Motivation
4x4 Matrix of real numbers; useful for transformation matrix
Description
Description
Warnings

Definition at line 46 of file wmatrix.h.


Constructor & Destructor Documentation

wMatrix ( const wVector X,
const wVector Y,
const wVector Z,
const wVector P 
) [inline]

Construct the matrix.

Parameters:
Xx axis representation
Yy axis representation
Zz axis representation
Pworld position

Definition at line 161 of file wmatrix.h.

wMatrix ( const wQuaternion rotation,
const wVector position 
) [inline]

Constructor.

Parameters:
rotationquaternion representation of rotation part
positionworld position

Definition at line 172 of file wmatrix.h.

wMatrix ( const real *  position,
const real *  rotation 
) [inline]

Constructor.

Parameters:
positiona vector containg three position value
rotationa vector containing 12 values representing a 3x4 rotation matrix useful for converting data from ODE to wMatrix

Definition at line 211 of file wmatrix.h.

wMatrix ( const wMatrix other) [inline]

Copy constructor.

Definition at line 222 of file wmatrix.h.


Member Function Documentation

wVector getEuleroAngles ( ) const [inline]

return the Eulero angle of rotation

Definition at line 270 of file wmatrix.h.

References farsa::max(), farsa::min(), wMatrix::pitch(), wMatrix::roll(), and wMatrix::yaw().

wMatrix grammSchmidt ( const wVector dir) [inline, static]

calculate an orthonormal matrix with the Z vector pointing on the dir direction, and the Y and Z are determined by using the Gramm-Schmidth procedure

Definition at line 465 of file wmatrix.h.

References wVectorT< Shared >::normalize(), and wMatrix::wMatrix().

Referenced by RenderWorld::drawArrow(), RenderWObjectContainer::drawCylinder(), and RenderWObjectContainer::drawTorus().

wMatrix operator* ( const wMatrix B) const [inline]

matrix multiplication

Definition at line 383 of file wmatrix.h.

References wMatrix::wMatrix().

wMatrix & operator= ( const wMatrix other) [inline]

Copy operator.

Definition at line 230 of file wmatrix.h.

wVectorT< true > & operator[] ( int  i) [inline]

indexing operator

Definition at line 241 of file wmatrix.h.

const wVectorT< true > & operator[] ( int  i) const [inline]

indexing operator (const version)

Definition at line 245 of file wmatrix.h.

wMatrix pitch ( real  ang) [inline, static]

create a rotation around X axis of ang radians

Definition at line 485 of file wmatrix.h.

References wMatrix::wMatrix().

Referenced by wMatrix::getEuleroAngles(), PhyiCub::PhyiCub(), and PhyMarXbot::PhyMarXbot().

wMatrix roll ( real  ang) [inline, static]

create a rotation around Z axis of ang radians

Definition at line 503 of file wmatrix.h.

References wMatrix::wMatrix().

Referenced by wMatrix::getEuleroAngles(), PhyiCub::PhyiCub(), and PhyMarXbot::PhyMarXbot().

wMatrix rotateAround ( const wVector axis,
const wVector centre,
real  angle 
) const [inline]

Rotate this matrix around the axis, and position passed of radians specified.

Parameters:
axisof rotation in world coordinate
centreof rotation in world coordinate
angleof rotation in radians

Definition at line 292 of file wmatrix.h.

References wVectorT< Shared >::rotateAround().

Referenced by PhyiCub::PhyiCub(), and PhyObjectsGroup::setDOFPosition().

wMatrix rotateMatrix ( const wMatrix tm) const [inline]

rotate the matrix passed by rotation specified by this and return a copy

Definition at line 325 of file wmatrix.h.

References wMatrix::wMatrix().

wVector rotateVector ( const wVector v) const [inline]

rotate the vector v, it doesn't apply position transformation

Definition at line 345 of file wmatrix.h.

Referenced by PhyiCub::PhyiCub(), wMatrix::transformPlane(), and wMatrix::transformVector().

void sanitifize ( ) [inline]

change the matrix in order to get a valid one that represent the same rotation/translation

Definition at line 441 of file wmatrix.h.

Referenced by PhyBallAndSocket::PhyBallAndSocket(), PhyFixed::PhyFixed(), PhyHinge::PhyHinge(), PhySuspension::PhySuspension(), PhyUniversal::PhyUniversal(), and PhyUniversal::updateJointInfo().

wVector transformPlane ( const wVector localPlane) const [inline]

...

doc missing ...

Definition at line 410 of file wmatrix.h.

References wMatrix::rotateVector(), and wMatrix::unrotateVector().

void transformTriplex ( real *  dst,
int  dstStrideInBytes,
real *  src,
int  srcStrideInBytes,
int  count 
) const [inline]

apply transformation to a chunck of vectors

Parameters:
dstwhere to store transformed vectors
srcwhere to get vectors to transform
counthow many vector you want to transform

Definition at line 363 of file wmatrix.h.

wVector transformVector ( const wVector v) const [inline]

apply both rotation and translation to the vector v

Definition at line 355 of file wmatrix.h.

References wMatrix::rotateVector().

Referenced by World::collisionRayCast(), and SingleIR::update().

wMatrix transpose ( ) const [inline]

transpose the rotation sub-matrix

Definition at line 256 of file wmatrix.h.

References wMatrix::wMatrix().

wMatrix transpose4X4 ( ) const [inline]

full transposition of the transformation matrix

Definition at line 263 of file wmatrix.h.

References wMatrix::wMatrix().

wVector unrotateVector ( const wVector v) const [inline]

inverte the rotation of this matrix on the vector v

Definition at line 351 of file wmatrix.h.

Referenced by wMatrix::transformPlane(), wMatrix::untransformPlane(), and wMatrix::untransformVector().

wVector untransformPlane ( const wVector globalPlane) const [inline]

...

doc missing ...

Definition at line 416 of file wmatrix.h.

References wMatrix::unrotateVector().

wVector untransformVector ( const wVector v) const [inline]

invert the rotation and translation on the vector v

Definition at line 359 of file wmatrix.h.

References wMatrix::unrotateVector().

wMatrix yaw ( real  ang) [inline, static]

create a rotation around Y axis of ang radians

Definition at line 494 of file wmatrix.h.

References wMatrix::wMatrix().

Referenced by wMatrix::getEuleroAngles(), PhyiCub::PhyiCub(), and PhyMarXbot::PhyMarXbot().

wMatrix zero ( ) [inline, static]

create a zero matrix

Definition at line 458 of file wmatrix.h.

References wMatrix::wMatrix().


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