RenderTools::Mat4 Class Reference

#include <Matrix.h>

List of all members.

Public Member Functions

 Mat4 (float v00=1.0f, float v01=0.0f, float v02=0.0f, float v03=0.0f, float v10=0.0f, float v11=1.0f, float v12=0.0f, float v13=0.0f, float v20=0.0f, float v21=0.0f, float v22=1.0f, float v23=0.0f, float v30=0.0f, float v31=0.0f, float v32=0.0f, float v33=1.0f)
 --------------------------------Mat4-------------------------------
 Mat4 (const float *)
Vec3 operator* (const Vec3 &) const
 rotate through upper left 3x3 and translate, assuming w = 1.0
Vec4 operator* (const Vec4 &) const
 multiply
Mat3 operator* (const Mat3 &) const
 multiply the Mat3 with the upper left 3x3
Mat4 operator* (const Mat4 &) const
 multiply the Mat4
Mat4 operator* (float) const
Mat4 operator+ (const Vec2 &) const
Mat4 operator+ (const Vec3 &) const
 for transformationmatrices, adding a vec3 implies a translation
const float & operator[] (const int index) const
bool operator== (const Mat4 &b) const
const float * operator* (void) const
float & operator[] (int)
Mat4operator*= (const Mat4 &b)
Mat4operator= (const Mat3 &b)
Mat4operator= (const Vec3 &b)
Mat4operator*= (float)
Mat4operator*= (const Vec3 &)
Mat4operator+= (const Vec2 &)
Mat4operator+= (const Vec3 &)
Vec4 getRow (int) const
Vec4 getCol (int) const
const float & getElement (int column, int row) const
bool equals (const Mat4 &, float epsilon=0.0f) const
bool equals (const float *, float epsilon=0.0f) const
Vec3 translation (void) const
Mat3 rotation (void) const
Mat4 transpose (void) const
Mat4 inverse (void) const
 original code from MESA contributed by Jacques Leroy jle@star.be
Vec4 toPolar (void) const
Mat3 toMat3 (void) const
Quat toQuaternion (void) const
Vec4 toPlaneEquation (void) const
float & getElement (int column, int row)
void setElement (int col, int row, float v)
void setRow (int index, const Vec4 &row)
void setCol (int index, const Vec4 &col)
void setIdentity (void)
void ortho (float left, float right, float bottom, float top, float near, float far)
void frustum (float left, float right, float bottom, float top, float near, float far)
void perspective (float fovy, float aspect, float near, float far)
void lookAt (const Vec3 &eye, const Vec3 &center, const Vec3 &up=Vec3(0.0f, 0.0f, 1.0f))
void translate (const Vec3 &b)
void setTranslation (const Vec3 &b)

Static Public Member Functions

static Mat4 fromQuaternion (const Quat &)
static Mat4 fromPlaneEquation (const Vec4 &xyzd)
static Mat4 fromDirectionalAxis (const Vec3 &, char principalAxis= 'z')
static Mat4 fromPolar (const Vec4 &xyVectors)
static Mat4 fromTransformation (const Vec3 &position, const Mat3 &rotation)
static Mat4 fromAxisAngle (const Vec3 &, float radians=0.0, const Vec3 &position=Vec3(0.0f))
static Mat4 fromIdentity (void)
static Mat4 fromOrtho (float left, float right, float bottom, float top, float near, float far)
static Mat4 fromFrustum (float left, float right, float bottom, float top, float near, float far)
static Mat4 fromPerspective (float fovy, float aspect, float near, float far)
static Mat4 fromLookAt (const Vec3 &eye, const Vec3 &center=Vec3(), const Vec3 &up=Vec3(0.0f, 0.0f, 1.0f))


Detailed Description

Definition at line 410 of file Matrix.h.


Constructor & Destructor Documentation

RenderTools::Mat4::Mat4 ( float  v00 = 1.0f,
float  v01 = 0.0f,
float  v02 = 0.0f,
float  v03 = 0.0f,
float  v10 = 0.0f,
float  v11 = 1.0f,
float  v12 = 0.0f,
float  v13 = 0.0f,
float  v20 = 0.0f,
float  v21 = 0.0f,
float  v22 = 1.0f,
float  v23 = 0.0f,
float  v30 = 0.0f,
float  v31 = 0.0f,
float  v32 = 0.0f,
float  v33 = 1.0f 
)

--------------------------------Mat4-------------------------------

Definition at line 1792 of file Matrix.cpp.

RenderTools::Mat4::Mat4 ( const float *  v  ) 

Definition at line 1815 of file Matrix.cpp.


Member Function Documentation

bool RenderTools::Mat4::equals ( const float *  compare,
float  epsilon = 0.0f 
) const

Definition at line 2036 of file Matrix.cpp.

bool RenderTools::Mat4::equals ( const Mat4 compare,
float  epsilon = 0.0f 
) const

Definition at line 2032 of file Matrix.cpp.

Mat4 RenderTools::Mat4::fromAxisAngle ( const Vec3 v,
float  radians = 0.0,
const Vec3 position = Vec3( 0.0f ) 
) [static]

Definition at line 2281 of file Matrix.cpp.

Mat4 RenderTools::Mat4::fromDirectionalAxis ( const Vec3 axis,
char  principalAxis = 'z' 
) [static]

Definition at line 2354 of file Matrix.cpp.

Mat4 RenderTools::Mat4::fromFrustum ( float  left,
float  right,
float  bottom,
float  top,
float  near,
float  far 
) [static]

Definition at line 2411 of file Matrix.cpp.

Mat4 RenderTools::Mat4::fromIdentity ( void   )  [static]

Definition at line 2399 of file Matrix.cpp.

Mat4 RenderTools::Mat4::fromLookAt ( const Vec3 eye,
const Vec3 center = Vec3(),
const Vec3 up = Vec3( 0.0f, 0.0f, 1.0f ) 
) [static]

Definition at line 2423 of file Matrix.cpp.

Mat4 RenderTools::Mat4::fromOrtho ( float  left,
float  right,
float  bottom,
float  top,
float  near,
float  far 
) [static]

Definition at line 2405 of file Matrix.cpp.

Mat4 RenderTools::Mat4::fromPerspective ( float  fovy,
float  aspect,
float  near,
float  far 
) [static]

Definition at line 2417 of file Matrix.cpp.

Mat4 RenderTools::Mat4::fromPlaneEquation ( const Vec4 xyzd  )  [static]

Definition at line 2343 of file Matrix.cpp.

Mat4 RenderTools::Mat4::fromPolar ( const Vec4 xyVectors  )  [static]

Definition at line 2334 of file Matrix.cpp.

Mat4 RenderTools::Mat4::fromQuaternion ( const Quat q  )  [static]

Definition at line 2307 of file Matrix.cpp.

Mat4 RenderTools::Mat4::fromTransformation ( const Vec3 position,
const Mat3 rotation 
) [static]

Definition at line 2260 of file Matrix.cpp.

void RenderTools::Mat4::frustum ( float  left,
float  right,
float  bottom,
float  top,
float  near,
float  far 
)

Definition at line 2448 of file Matrix.cpp.

Vec4 RenderTools::Mat4::getCol ( int  index  )  const

Definition at line 2014 of file Matrix.cpp.

float & RenderTools::Mat4::getElement ( int  column,
int  row 
)

Definition at line 1978 of file Matrix.cpp.

const float & RenderTools::Mat4::getElement ( int  column,
int  row 
) const

Definition at line 1974 of file Matrix.cpp.

Vec4 RenderTools::Mat4::getRow ( int  index  )  const

Definition at line 2010 of file Matrix.cpp.

Mat4 RenderTools::Mat4::inverse ( void   )  const

original code from MESA contributed by Jacques Leroy jle@star.be

Definition at line 2096 of file Matrix.cpp.

void RenderTools::Mat4::lookAt ( const Vec3 eye,
const Vec3 center,
const Vec3 up = Vec3( 0.0f, 0.0f, 1.0f ) 
)

Definition at line 2477 of file Matrix.cpp.

const float * RenderTools::Mat4::operator* ( void   )  const

Definition at line 1970 of file Matrix.cpp.

Mat4 RenderTools::Mat4::operator* ( float  f  )  const

Definition at line 1873 of file Matrix.cpp.

Mat4 RenderTools::Mat4::operator* ( const Mat4 b  )  const

multiply the Mat4

Definition at line 1858 of file Matrix.cpp.

Mat3 RenderTools::Mat4::operator* ( const Mat3 b  )  const

multiply the Mat3 with the upper left 3x3

Definition at line 1839 of file Matrix.cpp.

Vec4 RenderTools::Mat4::operator* ( const Vec4 b  )  const

multiply

Definition at line 1829 of file Matrix.cpp.

Vec3 RenderTools::Mat4::operator* ( const Vec3 b  )  const

rotate through upper left 3x3 and translate, assuming w = 1.0

Definition at line 1820 of file Matrix.cpp.

Mat4 & RenderTools::Mat4::operator*= ( const Vec3 v  ) 

Definition at line 1911 of file Matrix.cpp.

Mat4 & RenderTools::Mat4::operator*= ( float  f  ) 

Definition at line 1895 of file Matrix.cpp.

Mat4 & RenderTools::Mat4::operator*= ( const Mat4 b  ) 

Definition at line 1891 of file Matrix.cpp.

Mat4 RenderTools::Mat4::operator+ ( const Vec3 v  )  const

for transformationmatrices, adding a vec3 implies a translation

Definition at line 1939 of file Matrix.cpp.

Mat4 RenderTools::Mat4::operator+ ( const Vec2 v  )  const

for transformationmatrices, adding a vec2 implies a translation in the x-y plane

Definition at line 1929 of file Matrix.cpp.

Mat4 & RenderTools::Mat4::operator+= ( const Vec3 v  ) 

Definition at line 1955 of file Matrix.cpp.

Mat4 & RenderTools::Mat4::operator+= ( const Vec2 v  ) 

Definition at line 1949 of file Matrix.cpp.

Mat4 & RenderTools::Mat4::operator= ( const Vec3 b  ) 

Definition at line 2003 of file Matrix.cpp.

Mat4 & RenderTools::Mat4::operator= ( const Mat3 b  ) 

Definition at line 1990 of file Matrix.cpp.

bool RenderTools::Mat4::operator== ( const Mat4 b  )  const

Definition at line 1986 of file Matrix.cpp.

float & RenderTools::Mat4::operator[] ( int  index  ) 

Definition at line 1962 of file Matrix.cpp.

const float & RenderTools::Mat4::operator[] ( const int  index  )  const

Definition at line 1966 of file Matrix.cpp.

void RenderTools::Mat4::ortho ( float  left,
float  right,
float  bottom,
float  top,
float  near,
float  far 
)

Definition at line 2429 of file Matrix.cpp.

void RenderTools::Mat4::perspective ( float  fovy,
float  aspect,
float  near,
float  far 
)

Definition at line 2467 of file Matrix.cpp.

Mat3 RenderTools::Mat4::rotation ( void   )  const

return the upper-left 3x3 matrix

Definition at line 2063 of file Matrix.cpp.

void RenderTools::Mat4::setCol ( int  index,
const Vec4 col 
)

Definition at line 2025 of file Matrix.cpp.

void RenderTools::Mat4::setElement ( int  col,
int  row,
float  v 
)

Definition at line 1982 of file Matrix.cpp.

void RenderTools::Mat4::setIdentity ( void   ) 

Definition at line 2241 of file Matrix.cpp.

void RenderTools::Mat4::setRow ( int  index,
const Vec4 row 
)

Definition at line 2018 of file Matrix.cpp.

void RenderTools::Mat4::setTranslation ( const Vec3 b  ) 

Definition at line 2053 of file Matrix.cpp.

Mat3 RenderTools::Mat4::toMat3 ( void   )  const

Vec4 RenderTools::Mat4::toPlaneEquation ( void   )  const

Vec4 RenderTools::Mat4::toPolar ( void   )  const

Definition at line 2328 of file Matrix.cpp.

Quat RenderTools::Mat4::toQuaternion ( void   )  const

void RenderTools::Mat4::translate ( const Vec3 b  ) 

Definition at line 2046 of file Matrix.cpp.

Vec3 RenderTools::Mat4::translation ( void   )  const

Definition at line 2059 of file Matrix.cpp.

Mat4 RenderTools::Mat4::transpose ( void   )  const

Definition at line 2068 of file Matrix.cpp.


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

Generated on Wed Jan 26 00:15:36 2011 for RenderTools by  doxygen 1.5.8