Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Matrix3 Class Reference

3x3 matrix class, right-handed coordinates system. More...

#include <Matrix3.h>

List of all members.

Public Methods

 Matrix3 ()
 Matrix3 (const Matrix3 &m)
void identity ()
void transpose ()
void rotate (Vertex3 &a, real alpha)
 Construct rotation matrix.

void construct (Vertex3 &up, const Vertex3 &dir)
 . More...

MatrixRow operator[] (unsigned int row)
const realdata () const
Matrix3 & operator= (const Matrix3 &right)
Matrix3 & operator= (const Quaternion &q)
void operator *= (const Matrix3 &right)
Matrix3 operator * (const Matrix3 &right) const
Vertex3 operator * (const Vertex3 &v) const
Matrix3 operator~ () const
real det () const
Quaternion quaternion ()
Vertex3 apply (const Vertex3 &v) const
Vertex3 applyInverse (const Vertex3 &v) const
 . More...

void scale (Vertex3 &v)
void rotate (Vertex3 &v)
 .

void rotateX (real alpha)
 Post concatanate x-axis rotation. More...

void rotateY (real alpha)
 Post concatanate y-axis rotation. More...

void rotateZ (real alpha)
 Post concatanate z-axis rotation. More...


Friends

ostream & operator<< (ostream &stream, Matrix3 &m)
ObjectFileoperator>> (ObjectFile &f, Matrix3 &m)


Detailed Description

3x3 matrix class, right-handed coordinates system.


Member Function Documentation

Vertex3 Matrix3::applyInverse const Vertex3   v const
 

.

Note:
Only for pure rotational matrices.

void Matrix3::construct Vertex3   up,
const Vertex3   dir
 

.

Construct the orientation matrix given an up vector and direction.

Parameters:
up  up-vector or camera y-axis.
dir  direction-vector or camera z-axis.
Precondition:
up and dir are normalized vectors. up and dir may not lie on the same line.
Postcondition:
The matrix orientation is aligned to the input vectors. up is recalculated and is orthogonal to dir.

void Matrix3::rotateX real    alpha
 

Post concatanate x-axis rotation.

Calculates:

void Matrix3::rotateY real    alpha
 

Post concatanate y-axis rotation.

Calculates:

void Matrix3::rotateZ real    alpha
 

Post concatanate z-axis rotation.

Calculates:


The documentation for this class was generated from the following files:
This documentation was generated using doxygen. If you have any comments or additions please mail me.