[AE Engine logo] Public API Reference
Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

aeMatrix3 Class Reference

A standard 3x3 matrix. More...

#include <matrix3.h>

List of all members.

Public Member Functions

 aeMatrix3 ()
 Construct a new uninitialized matrix.

 aeMatrix3 (float nm11, float nm12, float nm13, float nm21, float nm22, float nm23, float nm31, float nm32, float nm33)
 Construct a new matrix and initialize it to given values.

 aeMatrix3 (const aeMatrix3 &m)
 Construct a new matrix and initialize it to another 3x3 matrix.

 aeMatrix3 (const aeMatrix4 &m)
 Construct a new matrix and initialize it to the rotation / scaling part of a 4x4 matrix.

aeMatrix3 & operator+= (const aeMatrix3 &m)
 Add another matrix to this matrix.

aeMatrix3 & operator-= (const aeMatrix3 &m)
 Subtract another matrix from this matrix.

aeMatrix3 & operator *= (const aeMatrix3 &m)
 Multiply this matrix with another.

aeMatrix3 & operator *= (float s)
 Multiply this matrix with a scalar.

aeMatrix3 & operator/= (float s)
 Divide this matrix by a scalar.

aeMatrix3 operator+ () const
 Unary + operator.

aeMatrix3 operator- () const
 Unary - operator.

aeVector3 getFirstRow () const
 Get the first row of this matrix as a 4D vector.

aeVector3 getSecondRow () const
 Get the second row of this matrix as a 4D vector.

aeVector3 getThirdRow () const
 Get the third row of this matrix as a 4D vector.

aeVector3 getFirstColumn () const
 Get the first column of this matrix as a 4D vector.

aeVector3 getSecondColumn () const
 Get the second column of this matrix as a 4D vector.

aeVector3 getThirdColumn () const
 Get the third column of this matrix as a 4D vector.

void set (float nm11, float nm12, float nm13, float nm21, float nm22, float nm23, float nm31, float nm32, float nm33)
 Set this matrix to given values.

void set (const aeMatrix3 &m)
 Set this matrix to another matrix.

void set (const aeMatrix4 &m)
 Set this matrix to the rotation / scaling part of a 4x4 matrix.

void setToIdentity ()
 Set this matrix to the identity matrix.

bool isIdentity () const
 Check if this matrix is the identity matrix.

void transpose ()
 Transpose this matrix and store result in this matrix.

aeMatrix3 getTranspose () const
 Transpose this matrix and return result as new matrix.


Public Attributes

float m11
 Row 1 column 1 element.

float m12
 Row 1 column 2 element.

float m13
 Row 1 column 3 element.

float m21
 Row 2 column 1 element.

float m22
 Row 2 column 2 element.

float m23
 Row 2 column 3 element.

float m31
 Row 3 column 1 element.

float m32
 Row 3 column 2 element.

float m33
 Row 3 column 3 element.


Friends

aeMatrix3 operator+ (const aeMatrix3 &m1, const aeMatrix3 &m2)
 Add two matrices.

aeMatrix3 operator- (const aeMatrix3 &m1, const aeMatrix3 &m2)
 Subtract two matrices.

aeMatrix3 operator * (const aeMatrix3 &m1, const aeMatrix3 &m2)
 Multiply two matrices.

aeVector3 operator * (const aeMatrix3 &m, const aeVector3 &v)
 Multiply a vector by a matrix (transform vector).

aeMatrix3 operator * (const aeMatrix3 &m, float f)
 Multiply a matrix and a scalar float.

aeMatrix3 operator * (float f, const aeMatrix3 &m)
 Multiply a scalar float and a matrix.

aeMatrix3 operator/ (const aeMatrix3 &m, float f)
 Divide a matrix by a scalar float.

bool operator== (const aeMatrix3 &m1, const aeMatrix3 &m2)
 Check two matrices for equality.

bool operator!= (const aeMatrix3 &m1, const aeMatrix3 &m2)
 Check two matrices for inequality.


Detailed Description

A standard 3x3 matrix.

Definition at line 30 of file matrix3.h.


Constructor & Destructor Documentation

aeMatrix3::aeMatrix3   [inline]
 

Construct a new uninitialized matrix.

Definition at line 35 of file matrix3.h.

Referenced by operator-().

aeMatrix3::aeMatrix3 float    nm11,
float    nm12,
float    nm13,
float    nm21,
float    nm22,
float    nm23,
float    nm31,
float    nm32,
float    nm33
[inline]
 

Construct a new matrix and initialize it to given values.

Parameters:
nm11 Row 1 column 1 value.
nm12 Row 1 column 2 value.
nm13 Row 1 column 3 value.
nm21 Row 2 column 1 value.
nm22 Row 2 column 2 value.
nm23 Row 2 column 3 value.
nm31 Row 3 column 1 value.
nm32 Row 3 column 2 value.
nm33 Row 3 column 3 value.

Definition at line 50 of file matrix3.h.

References m11, m12, m13, m21, m22, and m23.

aeMatrix3::aeMatrix3 const aeMatrix3 &    m [inline]
 

Construct a new matrix and initialize it to another 3x3 matrix.

Parameters:
m 3x3 matrix to initialize this one to.

Definition at line 62 of file matrix3.h.

References m11, m12, m13, m21, m22, m23, m31, m32, and m33.

aeMatrix3::aeMatrix3 const aeMatrix4   m [inline]
 

Construct a new matrix and initialize it to the rotation / scaling part of a 4x4 matrix.

Parameters:
m 4x4 matrix to initialize this one to.

Definition at line 72 of file matrix3.h.

References m11, m12, m13, m21, m22, m23, m31, m32, and m33.


Member Function Documentation

aeVector3 aeMatrix3::getFirstColumn   const [inline]
 

Get the first column of this matrix as a 4D vector.

Returns:
The first column of this matrix as aeVector4 vector.

Definition at line 281 of file matrix3.h.

aeVector3 aeMatrix3::getFirstRow   const [inline]
 

Get the first row of this matrix as a 4D vector.

Returns:
The first row of this matrix as aeVector4 vector.

Definition at line 260 of file matrix3.h.

aeVector3 aeMatrix3::getSecondColumn   const [inline]
 

Get the second column of this matrix as a 4D vector.

Returns:
The second column of this matrix as aeVector4 vector.

Definition at line 288 of file matrix3.h.

aeVector3 aeMatrix3::getSecondRow   const [inline]
 

Get the second row of this matrix as a 4D vector.

Returns:
The second row of this matrix as a aeVector4 vector.

Definition at line 267 of file matrix3.h.

aeVector3 aeMatrix3::getThirdColumn   const [inline]
 

Get the third column of this matrix as a 4D vector.

Returns:
The third column of this matrix as aeVector4 vector.

Definition at line 295 of file matrix3.h.

aeVector3 aeMatrix3::getThirdRow   const [inline]
 

Get the third row of this matrix as a 4D vector.

Returns:
The third row of this matrix as aeVector4 vector.

Definition at line 274 of file matrix3.h.

aeMatrix3 aeMatrix3::getTranspose   const
 

Transpose this matrix and return result as new matrix.

Returns:
The transpose of this matrix.

bool aeMatrix3::isIdentity   const
 

Check if this matrix is the identity matrix.

Returns:
True if this matrix is the identity matrix, false if not.

aeMatrix3& aeMatrix3::operator *= float    s
 

Multiply this matrix with a scalar.

Parameters:
s Scalar to multiply this matrix with.
Returns:
This matrix * scalar.

aeMatrix3& aeMatrix3::operator *= const aeMatrix3 &    m
 

Multiply this matrix with another.

Parameters:
m Matrix to multiply with this.
Returns:
This matrix * another matrix.

aeMatrix3 aeMatrix3::operator+   const [inline]
 

Unary + operator.

Returns:
This matrix.

Definition at line 148 of file matrix3.h.

aeMatrix3& aeMatrix3::operator+= const aeMatrix3 &    m
 

Add another matrix to this matrix.

Parameters:
m Matrix to add to this.
Returns:
This matrix + another matrix.

aeMatrix3 aeMatrix3::operator-   const [inline]
 

Unary - operator.

Returns:
This matrix negated.

Definition at line 155 of file matrix3.h.

References aeMatrix3().

aeMatrix3& aeMatrix3::operator-= const aeMatrix3 &    m
 

Subtract another matrix from this matrix.

Parameters:
m Matrix to subtract from this.
Returns:
This matrix - another matrix.

aeMatrix3& aeMatrix3::operator/= float    s
 

Divide this matrix by a scalar.

Parameters:
s Scalar to divide this matrix with.
Returns:
This matrix / scalar.

void aeMatrix3::set const aeMatrix4   m [inline]
 

Set this matrix to the rotation / scaling part of a 4x4 matrix.

Parameters:
m Matrix to set this one to.

Definition at line 341 of file matrix3.h.

References aeMatrix4::m11, aeMatrix4::m12, aeMatrix4::m13, aeMatrix4::m21, aeMatrix4::m22, aeMatrix4::m23, aeMatrix4::m31, aeMatrix4::m32, and aeMatrix4::m33.

void aeMatrix3::set const aeMatrix3 &    m [inline]
 

Set this matrix to another matrix.

Parameters:
m Matrix to set this one to.

Definition at line 330 of file matrix3.h.

References m11, m12, m13, m21, m22, m23, m31, m32, and m33.

void aeMatrix3::set float    nm11,
float    nm12,
float    nm13,
float    nm21,
float    nm22,
float    nm23,
float    nm31,
float    nm32,
float    nm33
[inline]
 

Set this matrix to given values.

Parameters:
nm11 Row 1 column 1 value.
nm12 Row 1 column 2 value.
nm13 Row 1 column 3 value.
nm14 Row 1 column 4 value.
nm21 Row 2 column 1 value.
nm22 Row 2 column 2 value.
nm23 Row 2 column 3 value.
nm24 Row 2 column 4 value.
nm31 Row 3 column 1 value.
nm32 Row 3 column 2 value.
nm33 Row 3 column 3 value.
nm34 Row 3 column 4 value.
nm41 Row 4 column 1 value.
nm42 Row 4 column 2 value.
nm43 Row 4 column 3 value.
nm44 Row 4 column 4 value.

Definition at line 317 of file matrix3.h.

void aeMatrix3::setToIdentity  
 

Set this matrix to the identity matrix.

void aeMatrix3::transpose  
 

Transpose this matrix and store result in this matrix.


Friends And Related Function Documentation

aeMatrix3 operator * float    f,
const aeMatrix3 &    m
[friend]
 

Multiply a scalar float and a matrix.

Parameters:
f Scalar float.
m Matrix.
Returns:
Scalar float * matrix.

aeMatrix3 operator * const aeMatrix3 &    m,
float    f
[friend]
 

Multiply a matrix and a scalar float.

Parameters:
m Matrix.
f Scalar float.
Returns:
Matrix * scalar float.

aeVector3 operator * const aeMatrix3 &    m,
const aeVector3   v
[friend]
 

Multiply a vector by a matrix (transform vector).

Parameters:
m Matrix.
v Vector.
Returns:
Matrix * vector.

Definition at line 199 of file matrix3.h.

aeMatrix3 operator * const aeMatrix3 &    m1,
const aeMatrix3 &    m2
[friend]
 

Multiply two matrices.

Parameters:
m1 Matrix1.
m2 Matrix2.
Returns:
Matrix1 * matrix2.

bool operator!= const aeMatrix3 &    m1,
const aeMatrix3 &    m2
[friend]
 

Check two matrices for inequality.

Parameters:
m1 Matrix1.
m2 Matrix2.
Returns:
True if matrix1 doesn't equal matrix2, false otherwise.

aeMatrix3 operator+ const aeMatrix3 &    m1,
const aeMatrix3 &    m2
[friend]
 

Add two matrices.

Parameters:
m1 Matrix1.
m2 Matrix2.
Returns:
Matrix1 + matrix2.

aeMatrix3 operator- const aeMatrix3 &    m1,
const aeMatrix3 &    m2
[friend]
 

Subtract two matrices.

Parameters:
m1 Matrix1.
m2 Matrix2.
Returns:
Matrix1 - matrix2.

aeMatrix3 operator/ const aeMatrix3 &    m,
float    f
[friend]
 

Divide a matrix by a scalar float.

Parameters:
m Matrix
f Scalar float.
Returns:
Matrix / scalar float.

bool operator== const aeMatrix3 &    m1,
const aeMatrix3 &    m2
[friend]
 

Check two matrices for equality.

Parameters:
m1 Matrix1.
m2 Matrix2.
Returns:
True if matrix1 equals matrix2, false if not.


The documentation for this class was generated from the following file:
AE Engine Public API Reference
Generated on Wed Apr 9 09:43:40 2003 by Doxygen.