Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

Matrix2C Class Reference

2x3 matrix class. More...

#include <Matrix2C.h>

List of all members.

Public Methods

 Matrix2C ()
 Default constructor.

 Matrix2C (const Matrix2C &rMat)
 Copy constructor.

 Matrix2C (const float32 *pMat)
 Contructor from array of floats.

virtual ~Matrix2C ()
 Default destructor.

Matrix2C operator * (const Matrix2C &rMat) const
 Multiplies two matrices and returns the result.

Matrix2C & operator *= (const Matrix2C &rMat)
 Multiplies two matrices and stores the result.

Vector2Coperator[] (int32 i)
 Returns reference to the vector at a row pointed by the index.

const Vector2Coperator[] (int32 i) const
 Returns reference to the vector at a row pointed by the index.

Matrix2C operator- () const
 Negates the matrix and returns the result.

Matrix2C & operator-= (const Matrix2C &rMat)
 Subtracts two matrices and stores the result in the matrix.

Matrix2C & operator+= (const Matrix2C &rMat)
 Adds two matrices and stores the result in the matrix.

Matrix2C operator- (const Matrix2C &rMat) const
 Substracts two matrices and returns the result.

Matrix2C operator+ (const Matrix2C &rMat) const
 Adds two matrices and returns the result.

Matrix2C & set_identity ()
 Sets the matrix as identity matrix.

Matrix2C & set_trans (const Vector2C &rVec)
 Sets the matrix to identity and then translates the matrix to the value of the argument.

Matrix2C & set_scale (const Vector2C &rVec)
 Sets the matrix to identity and then scales the matrix to the value of the argument.

Matrix2C & set_rot (float32 f32Angle)
 Sets the matrix to identity and then rotates the matrix to the value of the argument.

Matrix2C pre_trans (const Vector2C &rVec) const
 Pretranslates the matrix and returns the result.

Matrix2C invert () const
 Inverts the matrix and returns the result.

Matrix2C transpose () const
 Transposes the matrix and returns the result.

Matrix2C ortho_norm () const
 Ortho normalizes the matrix and returns the result.


Friends

Vector2C operator * (const Matrix2C &rMat, const Vector2C &rVec)
 Multiplies the specified vector by the specified matrix and returns the result.

Vector2C operator * (const Vector2C &rVec, const Matrix2C &rMat)
 Multiplies the specified vector by the specified matrix and returns the result.

Vector2Coperator *= (Vector2C &rVec, const Matrix2C &rMat)
 Multiplies the specified vector by the specified matrix and stores the result to the vector.


Detailed Description

2x3 matrix class.

Matrix2C class defines a 2 by 3 matrix class which is used by the Demopaja system. The matrix class implements standard set of methods and overdriven operators for easy use.

This class is implemented by the system.


Constructor & Destructor Documentation

Matrix2C  
 

Default constructor.

Matrix2C const Matrix2C &    rMat
 

Copy constructor.

Matrix2C const float32   pMat
 

Contructor from array of floats.

Creates a new vector with the values as the array pointed by the argument. The array should contain 6 values, 2 for each row in the matrix. The rows in the array are arranged linearly.

virtual ~Matrix2C   [virtual]
 

Default destructor.


Member Function Documentation

Matrix2C invert   const
 

Inverts the matrix and returns the result.

Matrix2C operator * const Matrix2C &    rMat const
 

Multiplies two matrices and returns the result.

Matrix2C& operator *= const Matrix2C &    rMat
 

Multiplies two matrices and stores the result.

Matrix2C operator+ const Matrix2C &    rMat const
 

Adds two matrices and returns the result.

Matrix2C& operator+= const Matrix2C &    rMat
 

Adds two matrices and stores the result in the matrix.

Matrix2C operator- const Matrix2C &    rMat const
 

Substracts two matrices and returns the result.

Matrix2C operator-   const
 

Negates the matrix and returns the result.

Matrix2C& operator-= const Matrix2C &    rMat
 

Subtracts two matrices and stores the result in the matrix.

const Vector2C & operator[] int32    i const [inline]
 

Returns reference to the vector at a row pointed by the index.

The index values from 0 to 2 corresponds to the rows in the matrix. There are two versions of this method, this version is for retrieving the values.

Vector2C & operator[] int32    i [inline]
 

Returns reference to the vector at a row pointed by the index.

The index values from 0 to 2 corresponds to the rows in the matrix. There are two versions of this method, this version enables to assign values.

Matrix2C ortho_norm   const
 

Ortho normalizes the matrix and returns the result.

Matrix2C pre_trans const Vector2C   rVec const
 

Pretranslates the matrix and returns the result.

Matrix2C& set_identity  
 

Sets the matrix as identity matrix.

Matrix2C& set_rot float32    f32Angle
 

Sets the matrix to identity and then rotates the matrix to the value of the argument.

Matrix2C& set_scale const Vector2C   rVec
 

Sets the matrix to identity and then scales the matrix to the value of the argument.

Matrix2C& set_trans const Vector2C   rVec
 

Sets the matrix to identity and then translates the matrix to the value of the argument.

Matrix2C transpose   const
 

Transposes the matrix and returns the result.


Friends And Related Function Documentation

Vector2C operator * const Vector2C   v,
const Matrix2C &    m
[friend]
 

Multiplies the specified vector by the specified matrix and returns the result.

Vector2C operator * const Matrix2C &    m,
const Vector2C   v
[friend]
 

Multiplies the specified vector by the specified matrix and returns the result.

Vector2C& operator *= Vector2C   v,
const Matrix2C &    m
[friend]
 

Multiplies the specified vector by the specified matrix and stores the result to the vector.


Moppi Demopaja SDK Documentation -- Copyright © 2000-2002 Moppi Productions