Matrix Class Reference
[System]
Four-by-four matrix with multiplication and inversion.
More...
#include <Matrix.hpp>
List of all members.
Public Member Functions |
| Matrix () |
| Matrix (float a0, float a1, float a2, float a3, float b0, float b1, float b2, float b3, float c0, float c1, float c2, float c3, float d0, float d1, float d2, float d3) |
float | getDeterminant () const |
int | getColumns () const |
Matrix | getInverse () const |
int | getRows () const |
int | getSize () const |
Matrix | getTranspose () const |
float & | operator() (int i, int j) |
float | operator() (int i, int j) const |
void | print () |
void | set (float array[16]) |
void | toArray (float *array) |
Protected Member Functions |
Matrix | getSubmatrix (int i, int j) const |
float | det (int n) const |
Private Member Functions |
| Matrix (int size) |
Private Attributes |
float | arr [4][4] |
int | size |
Friends |
Matrix | operator* (const Matrix &A, const Matrix &B) |
Vector | operator* (const Matrix &A, const Vector &B) |
Detailed Description
Four-by-four matrix with multiplication and inversion.
Constructor & Destructor Documentation
Creates the identity matrix.
Matrix |
( |
float |
a0, |
|
|
float |
a1, |
|
|
float |
a2, |
|
|
float |
a3, |
|
|
float |
b0, |
|
|
float |
b1, |
|
|
float |
b2, |
|
|
float |
b3, |
|
|
float |
c0, |
|
|
float |
c1, |
|
|
float |
c2, |
|
|
float |
c3, |
|
|
float |
d0, |
|
|
float |
d1, |
|
|
float |
d2, |
|
|
float |
d3 | |
|
) |
| | |
Creates a matrix from explicit values.
Creates an uninitialized matrix
Member Function Documentation
float det |
( |
int |
n |
) |
const [protected] |
Calculate the determinant of a part of the matrix.
int getColumns |
( |
|
) |
const [inline] |
- Returns:
- the number of columns
float getDeterminant |
( |
|
) |
const [inline] |
Calculate the determinant of the entire matrix.
Get the inverse of this matrix.
int getRows |
( |
|
) |
const [inline] |
- Returns:
- the number of rows.
Matrix getSubmatrix |
( |
int |
i, |
|
|
int |
j | |
|
) |
| | const [protected] |
- Returns:
- a new matrix with row i and column j deleted.
- Returns:
- matrix with rows and columns switched.
float operator() |
( |
int |
i, |
|
|
int |
j | |
|
) |
| | const |
Returns one of the elements in the matrix.
float & operator() |
( |
int |
i, |
|
|
int |
j | |
|
) |
| | |
Returns one of the elements in the matrix.
Pretty prints the matrix to standard out.
void set |
( |
float |
array[16] |
) |
|
Sets the Matrix from values in the array (column-major order).
void toArray |
( |
float * |
array |
) |
|
Puts the matrix into a single-subscript array (column-major order).
Friends And Related Function Documentation
Multiplies a matrix with a vector.
Multiplies two matrices together.
The documentation for this class was generated from the following files: