Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <opmatrix3.h>
Public Member Functions | |
csMatrix3 () | |
Construct a matrix, initialized to be the identity. More... | |
csMatrix3 (float am11, float am12, float am13, float am21, float am22, float am23, float am31, float am32, float am33) | |
Construct a matrix and initialize it. More... | |
csMatrix3 (const Quaternion &quat) | |
Construct a matrix with a quaternion. More... | |
csVector3 | Row1 () const |
Get the first row of this matrix as a vector. More... | |
csVector3 | Row2 () const |
Get the second row of this matrix as a vector. More... | |
csVector3 | Row3 () const |
Get the third row of this matrix as a vector. More... | |
csVector3 | Col1 () const |
Get the first column of this matrix as a vector. More... | |
csVector3 | Col2 () const |
Get the second column of this matrix as a vector. More... | |
csVector3 | Col3 () const |
Get the third column of this matrix as a vector. More... | |
void | Set (float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33) |
Set matrix values. More... | |
void | Set (const Quaternion &quat) |
Initialize matrix with a quaternion. More... | |
csMatrix3 & | operator+= (const csMatrix3 &m) |
Add another matrix to this matrix. More... | |
csMatrix3 & | operator-= (const csMatrix3 &m) |
Subtract another matrix from this matrix. More... | |
csMatrix3 & | operator*= (const csMatrix3 &m) |
Multiply another matrix with this matrix. More... | |
csMatrix3 & | operator*= (float s) |
Multiply this matrix with a scalar. More... | |
csMatrix3 & | operator/= (float s) |
Divide this matrix by a scalar. More... | |
csMatrix3 | operator+ () const |
Unary + operator. More... | |
csMatrix3 | operator- () const |
Unary - operator. More... | |
void | Transpose () |
Transpose this matrix. More... | |
csMatrix3 | GetTranspose () const |
Return the transpose of this matrix. More... | |
csMatrix3 | GetInverse () const |
Return the inverse of this matrix. More... | |
void | Invert () |
Invert this matrix. More... | |
float | Determinant () const |
Compute the determinant of this matrix. More... | |
void | Identity () |
Set this matrix to the identity matrix. More... | |
bool | IsIdentity () const |
Check if the matrix is identity. More... | |
Public Attributes | |
float | m11 |
float | m12 |
float | m13 |
float | m21 |
float | m22 |
float | m23 |
float | m31 |
float | m32 |
float | m33 |
Friends | |
csMatrix3 | operator+ (const csMatrix3 &m1, const csMatrix3 &m2) |
Add two matricies. More... | |
csMatrix3 | operator- (const csMatrix3 &m1, const csMatrix3 &m2) |
Subtract two matricies. More... | |
csMatrix3 | operator* (const csMatrix3 &m1, const csMatrix3 &m2) |
Multiply two matricies. More... | |
csVector3 | operator* (const csMatrix3 &m, const csVector3 &v) |
Multiply a vector by a matrix (transform it). More... | |
csMatrix3 | operator* (const csMatrix3 &m, float f) |
Multiply a matrix and a scalar. More... | |
csMatrix3 | operator* (float f, const csMatrix3 &m) |
Multiply a matrix and a scalar. More... | |
csMatrix3 | operator/ (const csMatrix3 &m, float f) |
Divide a matrix by a scalar. More... | |
bool | operator== (const csMatrix3 &m1, const csMatrix3 &m2) |
Check if two matricies are equal. More... | |
bool | operator!= (const csMatrix3 &m1, const csMatrix3 &m2) |
Check if two matricies are not equal. More... | |
bool | operator< (const csMatrix3 &m, float f) |
Test if each component of a matrix is less than a small epsilon value. More... | |
bool | operator> (float f, const csMatrix3 &m) |
Test if each component of a matrix is greater than a small epsilon value. More... | |
A 3x3 matrix.
Definition at line 31 of file opmatrix3.h.
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
float csMatrix3::Determinant | ( | ) | const |
|
inline |
Return the inverse of this matrix.
Definition at line 121 of file opmatrix3.h.
References float, m11, m12, m13, m21, m22, m23, m31, m32, and m33.
Referenced by csReversibleTransform::csReversibleTransform(), Invert(), csReversibleTransform::SetO2T(), and csReversibleTransform::SetT2O().
csMatrix3 csMatrix3::GetTranspose | ( | ) | const |
Return the transpose of this matrix.
Definition at line 94 of file opmatrix3.cpp.
References m11, m12, m13, m21, m22, m23, m31, m32, and m33.
Referenced by csOrthoTransform::SetO2T(), and csOrthoTransform::SetT2O().
void csMatrix3::Identity | ( | ) |
|
inline |
bool csMatrix3::IsIdentity | ( | ) | const |
Check if the matrix is identity.
Definition at line 79 of file opmatrix3.cpp.
|
inline |
Add another matrix to this matrix.
Definition at line 29 of file opmatrix3.cpp.
|
inline |
Subtract another matrix from this matrix.
Definition at line 37 of file opmatrix3.cpp.
|
inline |
Get the first row of this matrix as a vector.
Definition at line 59 of file opmatrix3.h.
Referenced by csOPCODECollider::Collide().
|
inline |
Get the second row of this matrix as a vector.
Definition at line 62 of file opmatrix3.h.
Referenced by csOPCODECollider::Collide().
|
inline |
Get the third row of this matrix as a vector.
Definition at line 65 of file opmatrix3.h.
Referenced by csOPCODECollider::Collide().
|
inline |
void csMatrix3::Set | ( | const Quaternion & | quat) |
void csMatrix3::Transpose | ( | ) |
Check if two matricies are not equal.
Definition at line 201 of file opmatrix3.cpp.
Check if two matricies are equal.
Definition at line 193 of file opmatrix3.cpp.
float csMatrix3::m11 |
Definition at line 34 of file opmatrix3.h.
Referenced by Col1(), csXRotMatrix3::csXRotMatrix3(), csYRotMatrix3::csYRotMatrix3(), csZRotMatrix3::csZRotMatrix3(), Determinant(), GetInverse(), GetTranspose(), Identity(), IsIdentity(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator<(), operator==(), operator>(), Row1(), and Set().
float csMatrix3::m12 |
Definition at line 34 of file opmatrix3.h.
Referenced by Col2(), csXRotMatrix3::csXRotMatrix3(), csYRotMatrix3::csYRotMatrix3(), csZRotMatrix3::csZRotMatrix3(), Determinant(), GetInverse(), GetTranspose(), Identity(), IsIdentity(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator<(), operator==(), operator>(), Row1(), Set(), and Transpose().
float csMatrix3::m13 |
Definition at line 34 of file opmatrix3.h.
Referenced by Col3(), csXRotMatrix3::csXRotMatrix3(), csYRotMatrix3::csYRotMatrix3(), csZRotMatrix3::csZRotMatrix3(), Determinant(), GetInverse(), GetTranspose(), Identity(), IsIdentity(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator<(), operator==(), operator>(), Row1(), Set(), and Transpose().
float csMatrix3::m21 |
Definition at line 35 of file opmatrix3.h.
Referenced by Col1(), csXRotMatrix3::csXRotMatrix3(), csYRotMatrix3::csYRotMatrix3(), csZRotMatrix3::csZRotMatrix3(), Determinant(), GetInverse(), GetTranspose(), Identity(), IsIdentity(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator<(), operator==(), operator>(), Row2(), Set(), and Transpose().
float csMatrix3::m22 |
Definition at line 35 of file opmatrix3.h.
Referenced by Col2(), csXRotMatrix3::csXRotMatrix3(), csYRotMatrix3::csYRotMatrix3(), csZRotMatrix3::csZRotMatrix3(), Determinant(), GetInverse(), GetTranspose(), Identity(), IsIdentity(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator<(), operator==(), operator>(), Row2(), and Set().
float csMatrix3::m23 |
Definition at line 35 of file opmatrix3.h.
Referenced by Col3(), csXRotMatrix3::csXRotMatrix3(), csYRotMatrix3::csYRotMatrix3(), csZRotMatrix3::csZRotMatrix3(), Determinant(), GetInverse(), GetTranspose(), Identity(), IsIdentity(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator<(), operator==(), operator>(), Row2(), Set(), and Transpose().
float csMatrix3::m31 |
Definition at line 36 of file opmatrix3.h.
Referenced by Col1(), csXRotMatrix3::csXRotMatrix3(), csYRotMatrix3::csYRotMatrix3(), csZRotMatrix3::csZRotMatrix3(), Determinant(), GetInverse(), GetTranspose(), Identity(), IsIdentity(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator<(), operator==(), operator>(), Row3(), Set(), and Transpose().
float csMatrix3::m32 |
Definition at line 36 of file opmatrix3.h.
Referenced by Col2(), csXRotMatrix3::csXRotMatrix3(), csYRotMatrix3::csYRotMatrix3(), csZRotMatrix3::csZRotMatrix3(), Determinant(), GetInverse(), GetTranspose(), Identity(), IsIdentity(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator<(), operator==(), operator>(), Row3(), Set(), and Transpose().
float csMatrix3::m33 |
Definition at line 36 of file opmatrix3.h.
Referenced by Col3(), csXRotMatrix3::csXRotMatrix3(), csYRotMatrix3::csYRotMatrix3(), csZRotMatrix3::csZRotMatrix3(), Determinant(), GetInverse(), GetTranspose(), Identity(), IsIdentity(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator<(), operator==(), operator>(), Row3(), and Set().