Xface Core Library: XMath::Matrix4 Class Reference

XFace / XEngine / XMath

XMath::Matrix4 Class Reference
[XMath]

#include <Matrix4.h>

List of all members.


Detailed Description

Author:
Koray Balci
Version:
1.0 (April 2002) 1.1
Date:
April 2002
Class which defines 4x4 matrix and related/necessary mathematical operations.

Matrix data are stored in a one dimensional array in OpenGL format. Check the additional constructor and () operator overload implementation for accessing data as if it is a two dimensional array.

Note:
No inlining has been done yet. All the inlines and other optimizations are to be added in a later stage when we have a better understanding of bottlenecks.


Public Member Functions

void negate (void)
 Negates.
Matrix4 getInverseTransform () const
 Switches to inverse of this matrix.
void loadIdentity ()
 Switches to Identity matrix.
Matrix4 getTranspose () const
 returns Transpose
 operator float * ()
 float* cast overloaded
 operator const float * () const
 float* cast overloaded
Matrix4 operator * (const Matrix4 &rhs)
 * operator overloaded (matrix)
Matrix4d operator * (const Matrix4d &rhs)
 * operator overloaded (matrix double)
Matrix4 operator * (const float scalar) const
 * operator overloaded (scalar)
float & operator() (unsigned int i, unsigned int j)
 () operator overloaded
float & operator[] (int i)
 [] operator overloaded
float operator[] (int i) const
 [] operator overloaded (const version)
Matrix4operator= (const Matrix4 &rhs)
 = operator overloaded
Vector3 operator * (const Vector3 &rhs) const
 * operator overloaded (vector)
const float * getMatrix ()
 Accessor function for the data member.
 Matrix4 (const Matrix4 &pCopy)
 Copy Constructor.
 Matrix4 ()
 Default Constructor.
 Matrix4 (float f00, float f01, float f02, float f03, float f10, float f11, float f12, float f13, float f20, float f21, float f22, float f23, float f30, float f31, float f32, float f33)
 Additional constructor for easy initialization.
 Matrix4 (const float mat[16])
 Additional constructor for easy initialization.
 ~Matrix4 ()
 Destructor.

Member Function Documentation

Matrix4 XMath::Matrix4::getInverseTransform  )  const
 

Gets the inverse of the transformation matrix.

Note:
Only usable for OpenGL transform matrix inverse

Matrix4 XMath::Matrix4::getTranspose  )  const
 

Returns the transpose of the current matrix data. Does not change the content of this matrix.

void XMath::Matrix4::loadIdentity  ) 
 

Loads the identity matrix, erasing current data.

void XMath::Matrix4::negate void   ) 
 

Negates the contents of the matrix.

Vector3 XMath::Matrix4::operator * const Vector3 rhs  )  const
 

Matrix by Vector Multiplication operator overloaded.

Warning:
Multiplied according to OpenGL matrix format!

Matrix4 XMath::Matrix4::operator * const float  scalar  )  const
 

Matrix by Scalar Multiplication operator overloaded.

Note:
Not tested and can be optimized as well.

Matrix4d XMath::Matrix4::operator * const Matrix4d &  rhs  ) 
 

Matrix by Matrix Multiplication operator overloaded.

Warning:
Not tested and can be optimized as well.

Matrix4 XMath::Matrix4::operator * const Matrix4 rhs  ) 
 

Matrix by Matrix Multiplication operator overloaded.

Warning:
Not tested and can be optimized as well.


The documentation for this class was generated from the following files:
Generated on Mon Aug 28 15:39:26 2006 for Xface Core Library by  doxygen 1.4.6-NO