![]() |
RTFX
0.3
Real time special effects collaborative visualization and production library.
|
A homogeneous transformation matrix. More...
#include <algebra.hpp>
Public Member Functions | |
Matrix4x4 () | |
Matrix4x4 (double _a0, double _a1, double _a2, double _b0, double _b1, double _b2, double _c0, double _c1, double _c2) | |
Matrix4x4 (const Matrix4x4 &_other) | |
Matrix4x4 (const Vector4D _row1, const Vector4D _row2, const Vector4D _row3, const Vector4D _row4) | |
Matrix4x4 (double *_vals) | |
Matrix4x4 & | operator= (const Matrix4x4 &_other) |
Vector4D | getRow (size_t _row) const |
double * | getRow (size_t _row) |
Vector4D | getColumn (size_t _col) const |
Vector4D | operator[] (size_t _row) const |
double * | operator[] (size_t _row) |
Matrix4x4 | transpose () const |
Matrix4x4 | invert () const |
double | det () |
const double * | begin () const |
const double * | end () const |
double * | data () |
bool | operator== (Matrix4x4 &_o) |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &_ar, const unsigned int _version) |
Private Attributes | |
double | v [16] |
Friends | |
class | boost::serialization::access |
A homogeneous transformation matrix.
This matrix has 4 rows and 4 columns for a total of 16 elements. The matrix is of the Matlab form [ A B C dX; D E F dY; G H I dZ; 0 0 0 1 ];
|
inline |
The base constructor, sets the matrix to the identity matrix
|
inline |
Construct a Matrix4x4 using 9 input values which correspond to the non-translational rows of the matrix.
|
inline |
Copy constructor
|
inline |
Create a Matrix4x4 from an array of double values. Assumption: the input array has 16 elements
|
inline |
Get a pointer to the beginning of the data
|
inline |
Get a pointer to the data
double RTFX::Matrix4x4::det | ( | ) |
Compute and return the determinant of this Matrix4x4
Compute the determinant: NOT IMPLEMENTED, THIS FUNCTION ALWAYS RETURNS 1
|
inline |
Get a pointer to the end of the data
|
inline |
Return a Vector4D corresponding to the column requested. Assumption: the column value is between 0 and 3
|
inline |
Return a Vector4D corresponding to the row requested. Assumption: the row value is between 0 and 3
|
inline |
Return a double array corresponding to the row requested. Assumption: the row value is between 0 and 3
Matrix4x4 RTFX::Matrix4x4::invert | ( | ) | const |
Return a new Matrix4x4 which is the inversion of this one
invertMatrix
I lifted this code from the skeleton code of a raytracer assignment from a different school. I taught that course too, so I figured it would be okay.
References RTFX::dividerow(), RTFX::submultrow(), and RTFX::swaprows().
Equals operator, sets this matrix to equal another
|
inline |
|
inline |
Get a row of the matrix using the array [] operator as a Vector4D. Assumption: the row specified is between 0 and 3
|
inline |
Get a row of the matrix using the array [] operator as a double array. Assumption: the row specified is between 0 and 3
|
inline |
Return a new Matrix4x4 which is the transpose of this one