Matrix3
Inherited: None
Description
Internally the data is stored as column-major format, so as to be optimal for passing to OpenGL functions, which expect column-major data.
Public Methods
Matrix3 () |
|
areal |
determinant () const |
euler () |
|
void |
identity () |
inverse () const |
|
void |
|
void |
rotate (const Vector3 & angles) |
void |
rotate (const Vector3 & axis, areal angle) |
void |
scale (const Vector3 & vector) |
transpose () const |
|
void |
zero () |
bool |
operator!= (const Matrix3 & matrix) const |
operator* (areal factor) const |
|
operator* (const Matrix3 & matrix) const |
|
operator* (const Vector3 & vector) const |
|
operator* (const Vector4 & vector) const |
|
Matrix3 & |
operator*= (areal factor) |
Matrix3 & |
operator*= (const Matrix3 & matrix) |
operator+ (const Matrix3 & matrix) const |
|
Matrix3 & |
operator+= (const Matrix3 & matrix) |
operator- (const Matrix3 & matrix) const |
|
Matrix3 & |
operator-= (const Matrix3 & matrix) |
bool |
operator== (const Matrix3 & matrix) const |
areal |
operator[] (int i) |
areal |
operator[] (int i) const |
Static Methods
None
Methods Description
Matrix3::Matrix3 ()
Constructs a identity matrix.
areal Matrix3::determinant () const
Returns the matrix determinant.
Vector3 Matrix3::euler ()
Returns an Euler angles represented by Vector3(pitch, yaw, roll) in rotation degrees.
void Matrix3::identity ()
Resets this matrix to an identity matrix.
Matrix3 Matrix3::inverse () const
Returns an inverted copy of this matrix.
void Matrix3::orthonormalize ()
Orthonormalize this matrix.
void Matrix3::rotate (Vector3 & angles)
Rotate this matrix with Euler angles represented by Vector3(pitch, yaw, roll) in rotation degrees.
void Matrix3::rotate (Vector3 & axis, areal angle)
Rotate this matrix around axis to angle in rotation degrees.
void Matrix3::scale (Vector3 & vector)
Scales the coordinate system by vector.
Matrix3 Matrix3::transpose () const
Returns this matrix, transposed about its diagonal.
void Matrix3::zero ()
Clear this matrix, with 0.0 value for all components.
bool Matrix3::operator!= (Matrix3 & matrix) const
Returns true if this matrix is NOT equal to given matrix; otherwise returns false. This operator uses an exact floating-point comparison.
Matrix3 Matrix3::operator* (areal factor) const
Returns the result of multiplying this matrix and the given factor.
Returns the result of multiplying this matrix by the given matrix.
Note that matrix multiplication is not commutative, i.e. a*b != b*a.
Returns the result of multiplying this matrix and the given 3D vector.
Returns the result of multiplying this matrix and the given 4D vector.
Matrix3 & Matrix3::operator*= (areal factor)
Multiplies all elements of this matrix by factor.
Returns the result of multiplying this matrix by the given matrix.
Returns the sum of this matrix and the given matrix.
Adds the contents of matrix to this matrix.
Returns the difference of this matrix and the given matrix.
Subtracts the contents of matrix from this matrix.
bool Matrix3::operator== (Matrix3 & matrix) const
Returns true if this matrix is equal to given matrix; otherwise returns false. This operator uses an exact floating-point comparison.
areal Matrix3::operator[] (int i)
Returns the component of the matrix at i*ndex position *i as a modifiable reference. i must be a valid i*ndex position *i*n the matrix (i.e., 0 <= *i < 9). Data *i*s stored as column-major format so this function retrieving data from rows *i*n colmns.
areal Matrix3::operator[] (int i) const
Returns the component of the matrix at i*ndex position. *i must be a valid i*ndex position *i*n the matrix (i.e., 0 <= *i < 9). Data *i*s stored as column-major format so this function retrieving data from rows *i*n colmns.