#include <matrix.h>
Inheritance diagram for math::matrix4:
Public Methods | |
matrix4 (void) | |
Default Constructor. | |
matrix4 (real_t d00, real_t d01, real_t d02, real_t d10, real_t d11, real_t d12, real_t d20, real_t d21, real_t d22) | |
Rotation Set Constructor. More... | |
matrix4 (real_t d00, real_t d01, real_t d02, real_t d03, real_t d10, real_t d11, real_t d12, real_t d13, real_t d20, real_t d21, real_t d22, real_t d23, real_t d30, real_t d31, real_t d32, real_t d33) | |
Full Matrix Constructor. More... | |
matrix4 (const math::matrix4 &m) | |
Copy Constructor. | |
virtual | ~matrix4 (void) |
Destructor. | |
math::matrix4 & | operator= (const math::matrix4 &m) |
Assignment Operator. | |
operator const real_t * (void) const | |
Cast operator to real_t* . More... | |
void | set (real_t d00, real_t d01, real_t d02, real_t d10, real_t d11, real_t d12, real_t d20, real_t d21, real_t d22) |
Sets rotation part of matrix. More... | |
void | set (real_t d00, real_t d01, real_t d02, real_t d03, real_t d10, real_t d11, real_t d12, real_t d13, real_t d20, real_t d21, real_t d22, real_t d23, real_t d30, real_t d31, real_t d32, real_t d33) |
Sets the matrix. More... | |
void | set (unsigned int row, unsigned int col, real_t x) |
Set the element at row, col to x. More... | |
real_t | operator() (unsigned int row, unsigned int col) const |
Get the element at row, col. More... | |
real_t & | operator() (unsigned int row, unsigned int col) |
Return a reference to the element at row, col. More... | |
math::vector3 | operator * (const math::vector3 &v) const |
Matrix Vector Mulitplication. More... | |
math::matrix4 | operator * (const math::matrix4 &rhs) const |
Matrix Multiplication. | |
math::matrix4 | operator+ (const math::matrix4 &rhs) const |
Matrix Addition. | |
math::matrix4 | operator- (const math::matrix4 &rhs) const |
Matrix Subtraction. | |
void | transpose (void) |
Transposes the matrix. More... | |
void | set_identity () |
Sets the matirx to the identity matrix. More... | |
void | from_angle_axis (real_t radians, const math::vector3 &axis) |
Creates a rotation matrix given around an arbitrary axis. More... | |
math::matrix4 | get_inverted_rotation (void) const |
Computes the inverse of the rotation matrix. More... | |
void | set_translation (const math::vector3 &trans) |
Sets the translation part of the matrix. More... | |
math::vector3 | get_translation (void) const |
Returns a vector describing the translation part of the matrix. | |
Static Public Attributes | |
const math::matrix4 | IDENTITY |
The identity matrix. More... | |
const math::matrix4 | ZERO |
The zero matrix. More... | |
Protected Attributes | |
real_t | m_data [4][4] |
Actual matrix data. | |
Friends | |
math::vector3 | operator * (const math::vector3 &v, const math::matrix4 &m) |
Vector Matrix Mulitplication. More... | |
std::ostream & | operator<< (std::ostream &o, const math::matrix4 &m) |
stream output operator. |
A 4x4 matrix in row major format:
Where
Definition at line 38 of file matrix.h.
|
Rotation Set Constructor. Sets the matrix as follows:
Reimplemented in gl::matrix4. Definition at line 28 of file matrix.cpp. |
|
Full Matrix Constructor. Sets the matrix as follows:
Reimplemented in gl::matrix4. Definition at line 55 of file matrix.cpp. |
|
Creates a rotation matrix given around an arbitrary axis. Given an axis and an angle, this method will create and set this matrix as the rotation matrix that describes the rotation around the axis by angle.
Definition at line 247 of file matrix.cpp. References m_data, real_t, math::vector3::x, math::vector3::y, and math::vector3::z. |
|
Computes the inverse of the rotation matrix. Inverts the rotation part of this matrix.
Definition at line 280 of file matrix.cpp. References math::equals, IDENTITY, m_data, and real_t. |
|
Matrix Vector Mulitplication. Multiplies the matrix m by vector v. The operation is defined as:
Definition at line 163 of file matrix.cpp. References m_data, math::vector3::x, math::vector3::y, and math::vector3::z. |
|
Cast operator to
|
|
Return a reference to the element at row, col.
Definition at line 196 of file matrix.h. References real_t. |
|
Get the element at row, col.
Definition at line 186 of file matrix.h. References real_t. |
|
Set the element at row, col to x.
Definition at line 176 of file matrix.h. References real_t. |
|
Sets the matrix. Sets the matrix as follows:
Definition at line 134 of file matrix.cpp. |
|
Sets rotation part of matrix. Sets the matrix as follows:
Definition at line 106 of file matrix.cpp. References m_data, and real_t. Referenced by math::quaternion::get_rotation_matrix, and math::quaternion::get_transposed_rotation_matrix. |
|
Sets the matirx to the identity matrix. Sets the matrix to:
Definition at line 255 of file matrix.h. References IDENTITY. |
|
Sets the translation part of the matrix. Sets the matrix as follows:
Definition at line 292 of file matrix.h. References math::vector3::x, math::vector3::y, and math::vector3::z. |
|
Transposes the matrix. Sets the matrix to . Definition at line 221 of file matrix.cpp. References m_data, and math::swap. |
|
Vector Matrix Mulitplication. Multiplies the vector v by the matrix m. The operation is defined as:
Definition at line 232 of file matrix.cpp. |
|
The identity matrix. The identity matrix is defined as:
Referenced by get_inverted_rotation, and set_identity. |
|
The zero matrix. The zero matrix is defined as:
|