#include <vmath.h>
Public Member Functions | |
Matrix3 () | |
Creates identity matrix. | |
Matrix3 (const T *dt) | |
Copy matrix values from array (these data must be in column major order!). | |
Matrix3 (const Matrix3< T > &src) | |
Copy constructor. | |
template<class FromT > | |
Matrix3 (const Matrix3< FromT > &src) | |
Copy casting constructor. | |
void | identity () |
Resets matrix to be identity matrix. | |
bool | operator== (const Matrix3< T > &rhs) const |
Equality test operator. | |
bool | operator!= (const Matrix3< T > &rhs) const |
Inequality test operator. | |
T & | at (int x, int y) |
Get reference to element at postion (x,y). | |
const T & | at (int x, int y) const |
Get constant reference to element at postion (x,y). | |
Matrix3< T > & | operator= (const Matrix3< T > &rhs) |
Copy operator. | |
template<class FromT > | |
Matrix3< T > & | operator= (const Matrix3< FromT > &rhs) |
Copy casting operator. | |
Matrix3< T > & | operator= (const T *rhs) |
Copy operator. | |
Matrix3< T > | operator+ (const Matrix3< T > &rhs) const |
Addition operator. | |
Matrix3< T > | operator- (const Matrix3< T > &rhs) const |
Substraction operator. | |
Matrix3< T > | operator+ (T rhs) const |
Addition operator. | |
Matrix3< T > | operator- (T rhs) const |
Substraction operator. | |
Matrix3< T > | operator* (T rhs) const |
Multiplication operator. | |
Matrix3< T > | operator/ (T rhs) const |
Division operator. | |
Vector3< T > | operator* (const Vector3< T > &rhs) const |
Multiplication operator. | |
Matrix3< T > | operator* (Matrix3< T > rhs) const |
Multiplication operator. | |
Matrix3< T > | transpose () |
Transpose matrix. | |
Matrix3< T > | lerp (T fact, const Matrix3< T > &rhs) const |
Linear interpolation of two vectors. | |
operator T * () | |
Conversion to pointer operator. | |
operator const T * () const | |
Conversion to pointer operator. | |
Static Public Member Functions | |
static Matrix3< T > | createRotationAroundAxis (T a, T b, T c) |
Creates rotation matrix by rotation around axis. | |
template<class It > | |
static Matrix3< T > | fromOde (const It *mat) |
Creates roation matrix from ODE Matrix. | |
Public Attributes | |
T | data [9] |
Data stored in column major order. | |
Friends | |
std::ostream & | operator<< (std::ostream &lhs, const Matrix3< T > &rhs) |
Output to stream operator. |
Copy matrix values from array (these data must be in column major order!).
Copy constructor.
src | Data source for new created instance of Matrix3 |
References Matrix3< T >::data.
Matrix3< T >::Matrix3 | ( | const Matrix3< FromT > & | src | ) | [inline] |
Copy casting constructor.
src | Data source for new created instance of Matrix3 |
References Matrix3< T >::data.
const T& Matrix3< T >::at | ( | int | x, | |
int | y | |||
) | const [inline] |
Get constant reference to element at postion (x,y).
x | Number of column (0..2) | |
y | Number of row (0..2) |
T& Matrix3< T >::at | ( | int | x, | |
int | y | |||
) | [inline] |
Get reference to element at postion (x,y).
x | Number of column (0..2) | |
y | Number of row (0..2) |
Referenced by Matrix3< T >::createRotationAroundAxis(), Quaternion< T >::fromMatrix(), Matrix3< T >::fromOde(), Matrix3< T >::operator*(), Quaternion< T >::rotMatrix(), Matrix4< T >::setRotation(), and Matrix3< T >::transpose().
static Matrix3<T> Matrix3< T >::createRotationAroundAxis | ( | T | a, | |
T | b, | |||
T | c | |||
) | [inline, static] |
Creates rotation matrix by rotation around axis.
a | Angle (in radians) of rotation around axis X. | |
b | Angle (in radians) of rotation around axis Y. | |
c | Angle (in radians) of rotation around axis Z. |
References Matrix3< T >::at().
void Matrix3< T >::identity | ( | ) | [inline] |
Resets matrix to be identity matrix.
Linear interpolation of two vectors.
fact | Factor of interpolation. For translation from positon of this matrix (lhs) to matrix rhs, values of factor goes from 0.0 to 1.0. | |
rhs | Second Matrix for interpolation |
Matrix3< T >::operator const T * | ( | ) | const [inline] |
Conversion to pointer operator.
Matrix3< T >::operator T * | ( | ) | [inline] |
Conversion to pointer operator.
Inequality test operator.
rhs | Right hand side argument of binary operator. |
Multiplication operator.
rhs | Right hand side argument of binary operator. |
References Matrix3< T >::at().
Multiplication operator.
rhs | Right hand side argument of binary operator. |
References Vector3< T >::x, Vector3< T >::y, and Vector3< T >::z.
Multiplication operator.
rhs | Right hand side argument of binary operator. |
References Matrix3< T >::data.
Addition operator.
rhs | Right hand side argument of binary operator. |
References Matrix3< T >::data.
Addition operator.
rhs | Right hand side argument of binary operator. |
References Matrix3< T >::data.
Substraction operator.
rhs | Right hand side argument of binary operator. |
References Matrix3< T >::data.
Substraction operator.
rhs | Right hand side argument of binary operator. |
References Matrix3< T >::data.
Division operator.
rhs | Right hand side argument of binary operator. |
References Matrix3< T >::data.
Copy operator.
rhs | Right hand side argument of binary operator. |
Matrix3<T>& Matrix3< T >::operator= | ( | const Matrix3< FromT > & | rhs | ) | [inline] |
Copy casting operator.
rhs | Right hand side argument of binary operator. |
References Matrix3< T >::data.
Copy operator.
rhs | Right hand side argument of binary operator. |
References Matrix3< T >::data.
Equality test operator.
rhs | Right hand side argument of binary operator. |
References Matrix3< T >::data, and EPSILON.
std::ostream& operator<< | ( | std::ostream & | lhs, | |
const Matrix3< T > & | rhs | |||
) | [friend] |
Output to stream operator.
lhs | Left hand side argument of operator (commonly ostream instance). | |
rhs | Right hand side argument of operator. |
Data stored in column major order.
Referenced by Matrix3< T >::Matrix3(), Matrix3< T >::operator*(), Matrix3< T >::operator+(), Matrix3< T >::operator-(), Matrix3< T >::operator/(), Matrix3< T >::operator=(), and Matrix3< T >::operator==().