Matrix.cpp File Reference

Provides basic functionality for a templated, arbitrarily-sized matrix. More...

#include "Matrix.h"
#include <iostream>

Go to the source code of this file.

Functions

Matrix4x4 getScaleMat (const Vector3 &v)
Matrix4x4 getTransMat (const Vector3 &v)
Matrix4x4 getRotXMat (const real_t radians)
Matrix4x4 getRotYMat (const real_t radians)
Matrix4x4 getRotZMat (const real_t radians)
Matrix4x4 getRotMat (const Point3 &p, const Vector3 &v, const real_t a)
Matrix4x4 getInvScaleMat (const Vector3 &v)
Matrix4x4 getInvTransMat (const Vector3 &v)
Matrix4x4 getInvRotXMat (const real_t radians)
Matrix4x4 getInvRotYMat (const real_t radians)
Matrix4x4 getInvRotZMat (const real_t radians)
Matrix4x4 getInvRotMat (const Point3 &p, const Vector3 &v, const real_t a)


Detailed Description

Provides basic functionality for a templated, arbitrarily-sized matrix.

Author:
Travis Fischer (fisch0920@gmail.com)
Date:
Fall 2008
A Matrix is templated to store M rows and N columns of data of type T. If left off, T will default to a "real_t" data type. Also, if N is not specified, the template will default to a square MxM matrix.

Included in this definition are typedefs for the most commonly used matrices (4x4, 3x3, etc), and these can be thought of as shortcuts to reference their associated Matrix templates. For example, Matrix4x4 can be used to refer to Matrix<4, 4, real_t>.

A Matrix stores each of its M rows internally as an N-length Vector called rows which has been defined as:

Vector<N, T> rows[M];

Definition in file Matrix.cpp.


Function Documentation

Matrix4x4 getInvRotMat ( const Point3 p,
const Vector3 v,
const real_t  a 
)

Definition at line 155 of file Matrix.cpp.

Matrix4x4 getInvRotXMat ( const real_t  radians  ) 

Returns:
the inverse rotation matrix about the x axis by the specified angle

Definition at line 122 of file Matrix.cpp.

Matrix4x4 getInvRotYMat ( const real_t  radians  ) 

Returns:
the inverse rotation matrix about the y axis by the specified angle

Definition at line 133 of file Matrix.cpp.

Matrix4x4 getInvRotZMat ( const real_t  radians  ) 

Returns:
the inverse rotation matrix about the z axis by the specified angle

Definition at line 144 of file Matrix.cpp.

Matrix4x4 getInvScaleMat ( const Vector3 v  ) 

Definition at line 101 of file Matrix.cpp.

Matrix4x4 getInvTransMat ( const Vector3 v  ) 

Definition at line 114 of file Matrix.cpp.

Matrix4x4 getRotMat ( const Point3 p,
const Vector3 v,
const real_t  a 
)

Definition at line 81 of file Matrix.cpp.

Matrix4x4 getRotXMat ( const real_t  radians  ) 

Returns:
the rotation matrix about the x axis by the specified angle

Definition at line 48 of file Matrix.cpp.

Matrix4x4 getRotYMat ( const real_t  radians  ) 

Returns:
the rotation matrix about the y axis by the specified angle

Definition at line 59 of file Matrix.cpp.

Matrix4x4 getRotZMat ( const real_t  radians  ) 

Returns:
the rotation matrix about the z axis by the specified angle

Definition at line 70 of file Matrix.cpp.

Matrix4x4 getScaleMat ( const Vector3 v  ) 

Definition at line 32 of file Matrix.cpp.

Matrix4x4 getTransMat ( const Vector3 v  ) 

Definition at line 40 of file Matrix.cpp.


Generated on 28 Feb 2009 for Milton by doxygen 1.5.6