Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

Matrix Class Reference

Matrix specification. More...

List of all members.

Public Member Functions

 Matrix ()
 Default constructor.
 Matrix (const Matrix &mat)
 Copy constructor.
const float * getValue () const
 Get a pointer to the matrix values.
bool getValue (Fusion::Vec3f &translation, Fusion::Rotation &rotation, Fusion::Vec3f &scale, Fusion::Vec3f &shear)
 decompose the matrix into the passed values, return false if singular
void setValue (const Matrix &mat)
 Set value from another Matrix.
void setValue (const float *mat)
 Set value from an array of floats.
void setValue (const Fusion::Vec3f &translation, const Fusion::Rotation &rotation, const Fusion::Vec3f &scale, const Fusion::Rotation &scaleOrientation, const Fusion::Vec3f &center)
 Set value from translation, rotation, scale, scaleOrientation, center.
void setValue (const Fusion::Vec3f &eye, const Fusion::Vec3f &center, const Fusion::Vec3f &up)
 Set value from eye point, center, up (lookAt).
void makeIdentity ()
 Make the matrix be the identity matrix.
void setRotate (const Fusion::Rotation &rot)
 set matrix to be a rotation matrix
void setTranslate (const Fusion::Vec3f &trans)
 set matrix to be a translation matrix
void setScale (const Fusion::Vec3f &scale)
 set matrix to be a scale matrix
void setTexRotate (float angle)
 set matrix to be a texture rotation matrix
void setTexTranslate (const Fusion::Vec2f &trans)
 set matrix to be a texture translation matrix
void setTexScale (const Fusion::Vec2f &scale)
 set matrix to be a texture scale matrix
float * operator[] (int i)
 [] operator to make it look like a normal matrix
MatrixmultRight (const Matrix &mat)
 multiplies matrix by given matrix on the right
MatrixmultLeft (const Matrix &mat)
 multiplies matrix by given matrix on the left
void multVecMatrix (const Fusion::Vec3f &src, Fusion::Vec3f &dst) const
 Multiplies given row vector by matrix, giving vector result.
void multMatrixVec (const Fusion::Vec3f &src, Fusion::Vec3f &dst) const
 Multiplies given column vector by matrix, giving vector result.
void multDirMatrix (const Fusion::Vec3f &src, Fusion::Vec3f &dst) const
 Multiplies given row vector by matrix, giving vector result src is assumed to be a direction vector, so translation part of matrix is ignored.
void multLineMatrix (const Line &src, Line &dst) const
 Multiplies the given line by the matrix resulting in a new line.
Matrixoperator= (const Matrix &mat)
 assignment operators
Matrix inverse () const
 returns inverse of matrix
Matrix transpose () const
 returns the transpose of the matrix

Friends

FUSION_EXPORT friend Matrix operator * (const Matrix &mat1, const Matrix &mat2)
 multiplies two matrices
FUSION_EXPORT friend int operator== (const Matrix &m1, const Matrix &m2)
 Equality comparison operator.


Detailed Description

Matrix specification.

It is stored internally as a 4x4 array of floats


Member Function Documentation

void multLineMatrix const Line src,
Line dst
const
 

Multiplies the given line by the matrix resulting in a new line.

The origin of the line is transformed by the whole matrix. The translation part of the matrix is ignored when transforming the direction of the line.


Generated on Sat Apr 1 06:08:07 2006 for Emma Content Development Kit by  doxygen 1.4.3