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

aeMatrix4 Class Reference

A standard 4x4 matrix. More...

#include <matrix4.h>

List of all members.

Public Member Functions

 aeMatrix4 ()
 Construct a new uninitialized matrix.

 aeMatrix4 (float nm11, float nm12, float nm13, float nm14, float nm21, float nm22, float nm23, float nm24, float nm31, float nm32, float nm33, float nm34, float nm41, float nm42, float nm43, float nm44)
 Construct a new matrix and initialize it to given values.

 aeMatrix4 (const aeMatrix4 &m)
 Construct a new matrix and initialize it to another 4x4 matrix.

 aeMatrix4 (const aeMatrix3 &m)
 Construct a new matrix and initialize the rotation / scaling part to a 3x3 matrix.

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

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

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

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

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

aeMatrix4 operator+ () const
 Unary + operator.

aeMatrix4 operator- () const
 Unary - operator.

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

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

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

aeVector4 getFourthRow () const
 Get the fourth row of this matrix as a 4D vector.

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

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

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

aeVector4 getFourthColumn () const
 Get the fourth column of this matrix as a 4D vector.

void set (float nm11, float nm12, float nm13, float nm14, float nm21, float nm22, float nm23, float nm24, float nm31, float nm32, float nm33, float nm34, float nm41, float nm42, float nm43, float nm44)
 Set this matrix to given values.

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

void set (const aeMatrix3 &m)
 Set the rotation / translation part of this matrix to a 3x3 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.

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

void extract3x3 (aeMatrix3 &m3x3) const
 Extract the rotation / scaling part of this matrix into a 3x3 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 m14
 Row 1 column 4 element.

float m21
 Row 2 column 1 element.

float m22
 Row 2 column 2 element.

float m23
 Row 2 column 3 element.

float m24
 Row 2 column 4 element.

float m31
 Row 3 column 1 element.

float m32
 Row 3 column 2 element.

float m33
 Row 3 column 3 element.

float m34
 Row 3 column 4 element.

float m41
 Row 4 column 1 element.

float m42
 Row 4 column 2 element.

float m43
 Row 4 column 3 element.

float m44
 Row 4 column 4 element.


Friends

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

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

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

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

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

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

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

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

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


Detailed Description

A standard 4x4 matrix.

Definition at line 31 of file matrix4.h.


Constructor & Destructor Documentation

aeMatrix4::aeMatrix4   [inline]
 

Construct a new uninitialized matrix.

Definition at line 36 of file matrix4.h.

Referenced by operator-().

aeMatrix4::aeMatrix4 float    nm11,
float    nm12,
float    nm13,
float    nm14,
float    nm21,
float    nm22,
float    nm23,
float    nm24,
float    nm31,
float    nm32,
float    nm33,
float    nm34,
float    nm41,
float    nm42,
float    nm43,
float    nm44
[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.
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 58 of file matrix4.h.

References m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, and m44.

aeMatrix4::aeMatrix4 const aeMatrix4 &    m [inline]
 

Construct a new matrix and initialize it to another 4x4 matrix.

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

Definition at line 72 of file matrix4.h.

References m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, and m44.

aeMatrix4::aeMatrix4 const aeMatrix3   m [inline]
 

Construct a new matrix and initialize the rotation / scaling part to a 3x3 matrix.

The translation part and bottom row of this matrix will be initialized to 0, 0, 0, 1.

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

Definition at line 84 of file matrix4.h.

References m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, and m44.


Member Function Documentation

void aeMatrix4::extract3x3 aeMatrix3   m3x3 const [inline]
 

Extract the rotation / scaling part of this matrix into a 3x3 matrix.

Parameters:
m3x3 3x3 matrix to store the rotation / scaling part of this matrix in.

Definition at line 421 of file matrix4.h.

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

aeVector4 aeMatrix4::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 316 of file matrix4.h.

aeVector4 aeMatrix4::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 288 of file matrix4.h.

aeVector4 aeMatrix4::getFourthColumn   const [inline]
 

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

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

Definition at line 337 of file matrix4.h.

aeVector4 aeMatrix4::getFourthRow   const [inline]
 

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

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

Definition at line 309 of file matrix4.h.

aeVector4 aeMatrix4::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 323 of file matrix4.h.

aeVector4 aeMatrix4::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 295 of file matrix4.h.

aeVector4 aeMatrix4::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 330 of file matrix4.h.

aeVector4 aeMatrix4::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 302 of file matrix4.h.

aeMatrix4 aeMatrix4::getTranspose   const
 

Transpose this matrix and return result as new matrix.

Returns:
The transpose of this matrix.

bool aeMatrix4::isIdentity   const
 

Check if this matrix is the identity matrix.

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

aeMatrix4& aeMatrix4::operator *= float    s
 

Multiply this matrix with a scalar.

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

aeMatrix4& aeMatrix4::operator *= const aeMatrix4 &    m
 

Multiply this matrix with another.

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

aeMatrix4 aeMatrix4::operator+   const [inline]
 

Unary + operator.

Returns:
This matrix.

Definition at line 175 of file matrix4.h.

aeMatrix4& aeMatrix4::operator+= const aeMatrix4 &    m
 

Add another matrix to this matrix.

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

aeMatrix4 aeMatrix4::operator-   const [inline]
 

Unary - operator.

Returns:
This matrix negated.

Definition at line 182 of file matrix4.h.

References aeMatrix4().

aeMatrix4& aeMatrix4::operator-= const aeMatrix4 &    m
 

Subtract another matrix from this matrix.

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

aeMatrix4& aeMatrix4::operator/= float    s
 

Divide this matrix by a scalar.

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

void aeMatrix4::set const aeMatrix3   m [inline]
 

Set the rotation / translation part of this matrix to a 3x3 matrix.

Parameters:
m Matrix to set the rotation / translation part of this one to.

Definition at line 386 of file matrix4.h.

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

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

Set this matrix to another matrix.

Parameters:
m Matrix to set this one to.

Definition at line 374 of file matrix4.h.

References m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, and m44.

void aeMatrix4::set float    nm11,
float    nm12,
float    nm13,
float    nm14,
float    nm21,
float    nm22,
float    nm23,
float    nm24,
float    nm31,
float    nm32,
float    nm33,
float    nm34,
float    nm41,
float    nm42,
float    nm43,
float    nm44
[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 359 of file matrix4.h.

void aeMatrix4::setToIdentity  
 

Set this matrix to the identity matrix.

void aeMatrix4::transpose  
 

Transpose this matrix and store result in this matrix.


Friends And Related Function Documentation

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

Multiply a scalar float and a matrix.

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

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

Multiply a matrix and a scalar float.

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

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

Multiply a vector by a matrix (transform vector).

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

Definition at line 227 of file matrix4.h.

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

Multiply two matrices.

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

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

Check two matrices for inequality.

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

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

Add two matrices.

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

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

Subtract two matrices.

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

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

Divide a matrix by a scalar float.

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

bool operator== const aeMatrix4 &    m1,
const aeMatrix4 &    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.