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

Emma::Matrix Class Reference

Matrix specification. More...

#include <EmmaMatrix.h>

List of all members.

Public Member Functions

 Matrix ()
 Default constructor.
 Matrix (const Matrix &mat)
 Copy constructor.
 Matrix (const Matrix2D &mat)
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
const float * operator[] (int i) const
MatrixmultRight (const Matrix &mat)
 multiplies matrix by given matrix on the right
MatrixmultRight (const Matrix2D &mat)
Matrixoperator *= (const Matrix &mat)
MatrixmultLeft (const Matrix &mat)
 multiplies matrix by given matrix on the left
MatrixmultLeft (const Matrix2D &mat)
void multVecMatrix (const Fusion::Vec3f &src, Fusion::Vec3f &dst) const
 Multiplies given row vector by matrix, giving vector result.
void multVecMatrix (const Fusion::Vec2f &src, Fusion::Vec2f &dst) const
void multVecMatrix (const Fusion::Vec3f &src, Fusion::Vec4f &dst) const
void multVecMatrix (const Fusion::Vec2f &src, Fusion::Vec4f &dst) const
void multVecMatrix (const Fusion::Vec4f &src, Fusion::Vec4f &dst) const
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
Matrixoperator= (const float *mat)
Matrix inverse () const
 returns inverse of matrix
Matrix transpose () const
 returns the transpose of the matrix
Fusion::UTF8String toString ()

Static Public Member Functions

static const MatrixgetIdentityMatrix ()
static void cleanSingletons ()

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.
FUSION_EXPORT friend int operator!= (const Matrix &m1, const Matrix &m2)
FUSION_EXPORT friend int operator< (const Matrix &m1, const Matrix &m2)


Detailed Description

Matrix specification.

It is stored internally as a 4x4 array of floats


Constructor & Destructor Documentation

Emma::Matrix::Matrix  )  [inline]
 

Default constructor.

Emma::Matrix::Matrix const Matrix mat  )  [inline]
 

Copy constructor.

Emma::Matrix::Matrix const Matrix2D mat  ) 
 


Member Function Documentation

static void Emma::Matrix::cleanSingletons  )  [static]
 

static const Matrix& Emma::Matrix::getIdentityMatrix  )  [static]
 

bool Emma::Matrix::getValue Fusion::Vec3f translation,
Fusion::Rotation rotation,
Fusion::Vec3f scale,
Fusion::Vec3f shear
 

decompose the matrix into the passed values, return false if singular

const float* Emma::Matrix::getValue  )  const [inline]
 

Get a pointer to the matrix values.

Matrix Emma::Matrix::inverse  )  const
 

returns inverse of matrix

void Emma::Matrix::makeIdentity  ) 
 

Make the matrix be the identity matrix.

void Emma::Matrix::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.

Matrix& Emma::Matrix::multLeft const Matrix2D mat  ) 
 

Matrix& Emma::Matrix::multLeft const Matrix mat  ) 
 

multiplies matrix by given matrix on the left

void Emma::Matrix::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.

void Emma::Matrix::multMatrixVec const Fusion::Vec3f src,
Fusion::Vec3f dst
const
 

Multiplies given column vector by matrix, giving vector result.

Matrix& Emma::Matrix::multRight const Matrix2D mat  ) 
 

Matrix& Emma::Matrix::multRight const Matrix mat  ) 
 

multiplies matrix by given matrix on the right

void Emma::Matrix::multVecMatrix const Fusion::Vec4f src,
Fusion::Vec4f dst
const
 

void Emma::Matrix::multVecMatrix const Fusion::Vec2f src,
Fusion::Vec4f dst
const
 

void Emma::Matrix::multVecMatrix const Fusion::Vec3f src,
Fusion::Vec4f dst
const
 

void Emma::Matrix::multVecMatrix const Fusion::Vec2f src,
Fusion::Vec2f dst
const
 

void Emma::Matrix::multVecMatrix const Fusion::Vec3f src,
Fusion::Vec3f dst
const
 

Multiplies given row vector by matrix, giving vector result.

Matrix& Emma::Matrix::operator *= const Matrix mat  )  [inline]
 

Matrix& Emma::Matrix::operator= const float *  mat  )  [inline]
 

Matrix& Emma::Matrix::operator= const Matrix mat  )  [inline]
 

assignment operators

const float* Emma::Matrix::operator[] int  i  )  const [inline]
 

float* Emma::Matrix::operator[] int  i  )  [inline]
 

[] operator to make it look like a normal matrix

void Emma::Matrix::setRotate const Fusion::Rotation rot  ) 
 

set matrix to be a rotation matrix

void Emma::Matrix::setScale const Fusion::Vec3f scale  ) 
 

set matrix to be a scale matrix

void Emma::Matrix::setTexRotate float  angle  ) 
 

set matrix to be a texture rotation matrix

void Emma::Matrix::setTexScale const Fusion::Vec2f scale  ) 
 

set matrix to be a texture scale matrix

void Emma::Matrix::setTexTranslate const Fusion::Vec2f trans  ) 
 

set matrix to be a texture translation matrix

void Emma::Matrix::setTranslate const Fusion::Vec3f trans  ) 
 

set matrix to be a translation matrix

void Emma::Matrix::setValue const Fusion::Vec3f eye,
const Fusion::Vec3f center,
const Fusion::Vec3f up
 

Set value from eye point, center, up (lookAt).

void Emma::Matrix::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 Emma::Matrix::setValue const float *  mat  ) 
 

Set value from an array of floats.

void Emma::Matrix::setValue const Matrix mat  ) 
 

Set value from another Matrix.

Fusion::UTF8String Emma::Matrix::toString  ) 
 

Matrix Emma::Matrix::transpose  )  const
 

returns the transpose of the matrix


Friends And Related Function Documentation

FUSION_EXPORT friend Matrix operator * const Matrix mat1,
const Matrix mat2
[friend]
 

multiplies two matrices

FUSION_EXPORT friend int operator!= const Matrix m1,
const Matrix m2
[friend]
 

FUSION_EXPORT friend int operator< const Matrix m1,
const Matrix m2
[friend]
 

FUSION_EXPORT friend int operator== const Matrix m1,
const Matrix m2
[friend]
 

Equality comparison operator.


The documentation for this class was generated from the following file:
Generated on Sat Apr 1 06:08:23 2006 for Emma SDK Guide by  doxygen 1.4.3