FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
Minimal matrix class to assist in view 3d calculations. More...
#include <matrix.h>
Public Member Functions | |
Matrix () | |
template<typename U > | |
Matrix (const Matrix< U > &mat) | |
~Matrix () | |
Matrix | inverse () const |
Adjoint method inverse, constant time inversion implementation. More... | |
Matrix & | operator/= (T val) |
Divide this matrix by a scalar. More... | |
Matrix | adjoint () const |
Get the adjoint matrix. More... | |
Matrix & | loadRotate (T angle, T x, T y, T z) |
Make this a rotation matrix. More... | |
Matrix & | applyScale (T x, T y, T z) |
Apply scale into this matrix. More... | |
Matrix & | loadScale (T x, T y, T z=1) |
Make this a scale matrix. More... | |
Matrix & | applyTranslate (T x, T y, T z) |
Apply translation into this matrix. More... | |
Matrix & | loadTranslate (const T x, const T y, const T z) |
Make this a translation matrix. More... | |
PointType3D< T > | operator* (const PointType3D< T > &vec) |
Transform given point using this matrix. More... | |
T & | operator[] (int32_t ind) |
Direct access to the matrix elements, just remember they are in column major format!! More... | |
const T & | operator[] (int32_t ind) const |
Matrix & | mult3by3 (const Matrix &mat) |
Apply the matrix dot product to this matrix. More... | |
Matrix< T > & | Rmult4by4 (const Matrix< T > &mat) |
this->Rmult4by4(temp) == [temp] X [*this] More... | |
Matrix< T > & | mult4by4 (const Matrix< T > &mat) |
Matrix & | applyRotate (T angle, T x, T y, T z) |
Public Attributes | |
union { | |
T m [16] | |
struct { | |
T m0 | |
T m1 | |
T m2 | |
T m3 | |
T m4 | |
T m5 | |
T m6 | |
T m7 | |
T m8 | |
T m9 | |
T m10 | |
T m11 | |
T m12 | |
T m13 | |
T m14 | |
T m15 | |
} | |
}; | |
Private Member Functions | |
T | cofactorm0 () const |
T | cofactorm1 () const |
T | cofactorm2 () const |
T | cofactorm3 () const |
T | cofactorm4 () const |
T | cofactorm5 () const |
T | cofactorm6 () const |
T | cofactorm7 () const |
T | cofactorm8 () const |
T | cofactorm9 () const |
T | cofactorm10 () const |
T | cofactorm11 () const |
T | cofactorm12 () const |
T | cofactorm13 () const |
T | cofactorm14 () const |
T | cofactorm15 () const |
Friends | |
template<typename U > | |
class | Matrix |
Minimal matrix class to assist in view 3d calculations.
|
inline |
|
inline |
|
inline |
|
inline |
Get the adjoint matrix.
Definition at line 83 of file matrix.h.
Referenced by FIFE::Matrix< double >::inverse().
|
inline |
Definition at line 306 of file matrix.h.
Referenced by FIFE::Camera::getLogicalCellDimensions(), FIFE::Camera::getOriginalZToY(), and FIFE::Camera::updateMatrices().
|
inline |
Apply scale into this matrix.
Definition at line 148 of file matrix.h.
Referenced by FIFE::CellGrid::updateMatrices(), and FIFE::Camera::updateMatrices().
|
inline |
Apply translation into this matrix.
Definition at line 180 of file matrix.h.
Referenced by FIFE::Camera::getOriginalZToY(), FIFE::CellGrid::updateMatrices(), and FIFE::Camera::updateMatrices().
|
inlineprivate |
Definition at line 318 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 321 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 348 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 351 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 354 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 357 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 360 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 363 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 324 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 327 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 330 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 333 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 336 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 339 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 342 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inlineprivate |
Definition at line 345 of file matrix.h.
Referenced by FIFE::Matrix< double >::adjoint().
|
inline |
Adjoint method inverse, constant time inversion implementation.
Definition at line 63 of file matrix.h.
Referenced by FIFE::CellGrid::updateMatrices(), and FIFE::Camera::updateMatrices().
|
inline |
Make this a rotation matrix.
Definition at line 113 of file matrix.h.
Referenced by FIFE::Matrix< double >::applyRotate(), FIFE::Camera::getLogicalCellDimensions(), and FIFE::CellGrid::updateMatrices().
|
inline |
Make this a scale matrix.
Definition at line 157 of file matrix.h.
Referenced by FIFE::Matrix< double >::applyScale(), FIFE::Camera::getOriginalZToY(), and FIFE::Camera::updateMatrices().
|
inline |
Make this a translation matrix.
Definition at line 189 of file matrix.h.
Referenced by FIFE::Matrix< double >::applyTranslate().
|
inline |
|
inline |
Definition at line 281 of file matrix.h.
Referenced by FIFE::Matrix< double >::applyRotate(), FIFE::Matrix< double >::applyScale(), FIFE::Matrix< double >::applyTranslate(), and FIFE::Camera::updateMatrices().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
union { ... } |
T FIFE::Matrix< T >::m[16] |
Definition at line 369 of file matrix.h.
Referenced by FIFE::Matrix< double >::Matrix(), FIFE::Matrix< double >::operator/=(), FIFE::operator<<(), and FIFE::Matrix< double >::operator[]().
T FIFE::Matrix< T >::m0 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm10(), FIFE::Matrix< double >::cofactorm11(), FIFE::Matrix< double >::cofactorm14(), FIFE::Matrix< double >::cofactorm15(), FIFE::Matrix< double >::cofactorm5(), FIFE::Matrix< double >::cofactorm6(), FIFE::Matrix< double >::cofactorm7(), FIFE::Matrix< double >::cofactorm9(), FIFE::Matrix< double >::inverse(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult3by3(), FIFE::Matrix< double >::mult4by4(), FIFE::Matrix< double >::operator*(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m1 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm10(), FIFE::Matrix< double >::cofactorm11(), FIFE::Matrix< double >::cofactorm12(), FIFE::Matrix< double >::cofactorm14(), FIFE::Matrix< double >::cofactorm15(), FIFE::Matrix< double >::cofactorm4(), FIFE::Matrix< double >::cofactorm6(), FIFE::Matrix< double >::cofactorm7(), FIFE::Matrix< double >::cofactorm8(), FIFE::Matrix< double >::inverse(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult3by3(), FIFE::Matrix< double >::mult4by4(), FIFE::Matrix< double >::operator*(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m10 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm0(), FIFE::Matrix< double >::cofactorm1(), FIFE::Matrix< double >::cofactorm12(), FIFE::Matrix< double >::cofactorm13(), FIFE::Matrix< double >::cofactorm15(), FIFE::Matrix< double >::cofactorm3(), FIFE::Matrix< double >::cofactorm4(), FIFE::Matrix< double >::cofactorm5(), FIFE::Matrix< double >::cofactorm7(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult3by3(), FIFE::Matrix< double >::mult4by4(), FIFE::Matrix< double >::operator*(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m11 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm0(), FIFE::Matrix< double >::cofactorm1(), FIFE::Matrix< double >::cofactorm12(), FIFE::Matrix< double >::cofactorm13(), FIFE::Matrix< double >::cofactorm14(), FIFE::Matrix< double >::cofactorm2(), FIFE::Matrix< double >::cofactorm4(), FIFE::Matrix< double >::cofactorm5(), FIFE::Matrix< double >::cofactorm6(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult3by3(), FIFE::Matrix< double >::mult4by4(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m12 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm1(), FIFE::Matrix< double >::cofactorm10(), FIFE::Matrix< double >::cofactorm11(), FIFE::Matrix< double >::cofactorm2(), FIFE::Matrix< double >::cofactorm3(), FIFE::Matrix< double >::cofactorm5(), FIFE::Matrix< double >::cofactorm6(), FIFE::Matrix< double >::cofactorm7(), FIFE::Matrix< double >::cofactorm9(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult4by4(), FIFE::Matrix< double >::operator*(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m13 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm0(), FIFE::Matrix< double >::cofactorm10(), FIFE::Matrix< double >::cofactorm11(), FIFE::Matrix< double >::cofactorm2(), FIFE::Matrix< double >::cofactorm3(), FIFE::Matrix< double >::cofactorm4(), FIFE::Matrix< double >::cofactorm6(), FIFE::Matrix< double >::cofactorm7(), FIFE::Matrix< double >::cofactorm8(), FIFE::Matrix< double >::cofactorm9(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult4by4(), FIFE::Matrix< double >::operator*(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m14 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm0(), FIFE::Matrix< double >::cofactorm1(), FIFE::Matrix< double >::cofactorm11(), FIFE::Matrix< double >::cofactorm3(), FIFE::Matrix< double >::cofactorm4(), FIFE::Matrix< double >::cofactorm5(), FIFE::Matrix< double >::cofactorm7(), FIFE::Matrix< double >::cofactorm8(), FIFE::Matrix< double >::cofactorm9(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult4by4(), FIFE::Matrix< double >::operator*(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m15 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm0(), FIFE::Matrix< double >::cofactorm1(), FIFE::Matrix< double >::cofactorm10(), FIFE::Matrix< double >::cofactorm2(), FIFE::Matrix< double >::cofactorm4(), FIFE::Matrix< double >::cofactorm5(), FIFE::Matrix< double >::cofactorm6(), FIFE::Matrix< double >::cofactorm8(), FIFE::Matrix< double >::cofactorm9(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult4by4(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m2 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm11(), FIFE::Matrix< double >::cofactorm12(), FIFE::Matrix< double >::cofactorm13(), FIFE::Matrix< double >::cofactorm15(), FIFE::Matrix< double >::cofactorm4(), FIFE::Matrix< double >::cofactorm5(), FIFE::Matrix< double >::cofactorm7(), FIFE::Matrix< double >::cofactorm8(), FIFE::Matrix< double >::cofactorm9(), FIFE::Matrix< double >::inverse(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult3by3(), FIFE::Matrix< double >::mult4by4(), FIFE::Matrix< double >::operator*(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m3 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm10(), FIFE::Matrix< double >::cofactorm12(), FIFE::Matrix< double >::cofactorm13(), FIFE::Matrix< double >::cofactorm14(), FIFE::Matrix< double >::cofactorm4(), FIFE::Matrix< double >::cofactorm5(), FIFE::Matrix< double >::cofactorm6(), FIFE::Matrix< double >::cofactorm8(), FIFE::Matrix< double >::inverse(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult3by3(), FIFE::Matrix< double >::mult4by4(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m4 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm1(), FIFE::Matrix< double >::cofactorm10(), FIFE::Matrix< double >::cofactorm11(), FIFE::Matrix< double >::cofactorm13(), FIFE::Matrix< double >::cofactorm14(), FIFE::Matrix< double >::cofactorm15(), FIFE::Matrix< double >::cofactorm2(), FIFE::Matrix< double >::cofactorm3(), FIFE::Matrix< double >::cofactorm9(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult3by3(), FIFE::Matrix< double >::mult4by4(), FIFE::Matrix< double >::operator*(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m5 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm0(), FIFE::Matrix< double >::cofactorm10(), FIFE::Matrix< double >::cofactorm11(), FIFE::Matrix< double >::cofactorm12(), FIFE::Matrix< double >::cofactorm14(), FIFE::Matrix< double >::cofactorm15(), FIFE::Matrix< double >::cofactorm2(), FIFE::Matrix< double >::cofactorm3(), FIFE::Matrix< double >::cofactorm8(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult3by3(), FIFE::Matrix< double >::mult4by4(), FIFE::Matrix< double >::operator*(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m6 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm0(), FIFE::Matrix< double >::cofactorm1(), FIFE::Matrix< double >::cofactorm11(), FIFE::Matrix< double >::cofactorm12(), FIFE::Matrix< double >::cofactorm13(), FIFE::Matrix< double >::cofactorm15(), FIFE::Matrix< double >::cofactorm3(), FIFE::Matrix< double >::cofactorm8(), FIFE::Matrix< double >::cofactorm9(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult3by3(), FIFE::Matrix< double >::mult4by4(), FIFE::Matrix< double >::operator*(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m7 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm0(), FIFE::Matrix< double >::cofactorm1(), FIFE::Matrix< double >::cofactorm10(), FIFE::Matrix< double >::cofactorm12(), FIFE::Matrix< double >::cofactorm13(), FIFE::Matrix< double >::cofactorm14(), FIFE::Matrix< double >::cofactorm2(), FIFE::Matrix< double >::cofactorm8(), FIFE::Matrix< double >::cofactorm9(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult3by3(), FIFE::Matrix< double >::mult4by4(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m8 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm1(), FIFE::Matrix< double >::cofactorm13(), FIFE::Matrix< double >::cofactorm14(), FIFE::Matrix< double >::cofactorm15(), FIFE::Matrix< double >::cofactorm2(), FIFE::Matrix< double >::cofactorm3(), FIFE::Matrix< double >::cofactorm5(), FIFE::Matrix< double >::cofactorm6(), FIFE::Matrix< double >::cofactorm7(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult3by3(), FIFE::Matrix< double >::mult4by4(), FIFE::Matrix< double >::operator*(), and FIFE::Matrix< double >::Rmult4by4().
T FIFE::Matrix< T >::m9 |
Definition at line 371 of file matrix.h.
Referenced by FIFE::Matrix< double >::cofactorm0(), FIFE::Matrix< double >::cofactorm12(), FIFE::Matrix< double >::cofactorm14(), FIFE::Matrix< double >::cofactorm15(), FIFE::Matrix< double >::cofactorm2(), FIFE::Matrix< double >::cofactorm3(), FIFE::Matrix< double >::cofactorm4(), FIFE::Matrix< double >::cofactorm6(), FIFE::Matrix< double >::cofactorm7(), FIFE::Camera::getOriginalZToY(), FIFE::Matrix< double >::loadRotate(), FIFE::Matrix< double >::loadScale(), FIFE::Matrix< double >::loadTranslate(), FIFE::Matrix< double >::mult3by3(), FIFE::Matrix< double >::mult4by4(), FIFE::Matrix< double >::operator*(), FIFE::Matrix< double >::Rmult4by4(), and FIFE::Camera::updateMatrices().