decTexMatrix Class Reference

3x3 Component Texture Matrix. More...

#include <decTexMatrix.h>

List of all members.

Public Member Functions

Constructors and Destructors
 decTexMatrix ()
 Creates a new matrix initialized to identity.
Management
void SetIdentity ()
 Sets the matrix to the identity matrix.
bool IsEqualTo (const decTexMatrix &matrix, float threshold=0.0001) const
 Determines if this matrix is cell wise equal to anither one in respect to a threshold.
Operators
decTexMatrixoperator= (const decTexMatrix &m)
 Sets the cells of this matrix to the values of another one.
decTexMatrixoperator+= (const decTexMatrix &m)
 Adds the cells of another matrix to this one.
decTexMatrixoperator-= (const decTexMatrix &m)
 Subtracts the cells of another matrix from this vector.
decTexMatrixoperator*= (float k)
 Multiplies the cells of this matrix with a value k.
decTexMatrixoperator/= (float k)
 Divides the cells of this matrix by a value k.
decTexMatrixoperator*= (const decTexMatrix &m)
 Multiplies this matrix with another one.
decTexMatrix operator+ (const decTexMatrix &m) const
 Retrieves a new matrix with the sum of this matrix with another one.
decTexMatrix operator- (const decTexMatrix &m) const
 Retrieves a new matrix with the difference of this matrix to another one.
decTexMatrix operator* (float k) const
 Retrieves a new matrix with this matrix scaled by k.
decTexMatrix operator/ (float k) const
 Retrieves a new matrix with this matrix divided by k.
decTexMatrix operator* (const decTexMatrix &m) const
 Retrieves a new matrix with this matrix multiplied with another one.
decTexel operator* (const decTexel &v) const
 Transforms vector by this matrix.

Static Public Member Functions

Matrix Creation
static decTexMatrix CreateIdentity ()
 Creates a new identity matrix.
static decTexMatrix CreateTranslation (float u, float v)
 Creates a new translation matrix.
static decTexMatrix CreateTranslation (const decTexel &t)
 Creates a new translation matrix.
static decTexMatrix CreateScale (float su, float sv)
 Creates a new scaling matrix.
static decTexMatrix CreateScale (const decTexel &s)
 Creates a new scaling matrix.
static decTexMatrix CreateRotation (float arc)
 Creates a new rotation matrix.

Public Attributes

Cells

The first number indicates the row the second the column.

float a11
float a12
float a13
float a21
float a22
float a23
float a31
float a32
float a33

Detailed Description

3x3 Component Texture Matrix.

Provides matrix calculation on a 3x3 matrix in row major order. This kind of matrix is intended to be used for texture coordinate transformations and composes of a single rotation part and a translation part. For more complex transformations a 4x4 matrix can be used too.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

decTexMatrix::decTexMatrix (  )

Creates a new matrix initialized to identity.


Member Function Documentation

static decTexMatrix decTexMatrix::CreateIdentity (  ) [static]

Creates a new identity matrix.

static decTexMatrix decTexMatrix::CreateRotation ( float  arc ) [static]

Creates a new rotation matrix.

static decTexMatrix decTexMatrix::CreateScale ( float  su,
float  sv 
) [static]

Creates a new scaling matrix.

static decTexMatrix decTexMatrix::CreateScale ( const decTexel s ) [static]

Creates a new scaling matrix.

static decTexMatrix decTexMatrix::CreateTranslation ( float  u,
float  v 
) [static]

Creates a new translation matrix.

static decTexMatrix decTexMatrix::CreateTranslation ( const decTexel t ) [static]

Creates a new translation matrix.

bool decTexMatrix::IsEqualTo ( const decTexMatrix matrix,
float  threshold = 0.0001 
) const

Determines if this matrix is cell wise equal to anither one in respect to a threshold.

decTexMatrix decTexMatrix::operator* ( float  k ) const

Retrieves a new matrix with this matrix scaled by k.

decTexMatrix decTexMatrix::operator* ( const decTexMatrix m ) const

Retrieves a new matrix with this matrix multiplied with another one.

decTexel decTexMatrix::operator* ( const decTexel v ) const

Transforms vector by this matrix.

decTexMatrix& decTexMatrix::operator*= ( float  k )

Multiplies the cells of this matrix with a value k.

decTexMatrix& decTexMatrix::operator*= ( const decTexMatrix m )

Multiplies this matrix with another one.

decTexMatrix decTexMatrix::operator+ ( const decTexMatrix m ) const

Retrieves a new matrix with the sum of this matrix with another one.

decTexMatrix& decTexMatrix::operator+= ( const decTexMatrix m )

Adds the cells of another matrix to this one.

decTexMatrix decTexMatrix::operator- ( const decTexMatrix m ) const

Retrieves a new matrix with the difference of this matrix to another one.

decTexMatrix& decTexMatrix::operator-= ( const decTexMatrix m )

Subtracts the cells of another matrix from this vector.

decTexMatrix decTexMatrix::operator/ ( float  k ) const

Retrieves a new matrix with this matrix divided by k.

If k is 0 an exception is thrown.

decTexMatrix& decTexMatrix::operator/= ( float  k )

Divides the cells of this matrix by a value k.

If the value k is 0 an exception is thrown.

decTexMatrix& decTexMatrix::operator= ( const decTexMatrix m )

Sets the cells of this matrix to the values of another one.

void decTexMatrix::SetIdentity (  )

Sets the matrix to the identity matrix.


Member Data Documentation


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