#include <lvt/Vec.h>
The Matrix class encapsulates a 4x4 homogeneous matrix. The semantics of vector multiplication is that of postmultiplication by column vectors. However, the matrix data is stored internally in columnmajor format, so that a matrix can be passed directly to a call to e.g. glMultMatrix(). The general rule of thumb is: don't manually modify the values in a Matrix, but rather rely on the arithmetic operators.
Public Member Functions  
Matrix &  LoadIdentity () 
Sets the matrix to the identity matrix.  
Matrix (const Vec &u, const Vec &v, const Vec &w)  
Constructs a new matrix with column entries equal to u, v, w.  
Matrix ()  
Default constructor.  
operator float * ()  
Converts the matrix to a float array.  
Matrix  Transpose () 
Returns a new Matrix that is the transpose of the current Matrix.  
float &  operator() (int r, int c) 
Returns a reference to the element in the rth row and cth column.  
float &  operator[] (int i) 
Returns a reference to the ith element of the Matrix. 

Default constructor. Sets the Matrix to the identity. 

Constructs a new matrix with column entries equal to u, v, w.


Sets the matrix to the identity matrix.


Converts the matrix to a float array. This is intended for use in the gl*Matrix() family of functions. 

Returns a reference to the element in the rth row and cth column.


Returns a reference to the ith element of the Matrix. Note that since the internal format of the Matrix is columnmajor, the element returned might not be the one intended. Consider using the () operator instead of this operator. 

Returns a new Matrix that is the transpose of the current Matrix.
