#include <KeosMatrix4.h>
Public Member Functions | |
| CMatrix4 (Real m11=1.0f, Real m12=0.0f, Real m13=0.0f, Real m14=0.0f, Real m21=0.0f, Real m22=1.0f, Real m23=0.0f, Real m24=0.0f, Real m31=0.0f, Real m32=0.0f, Real m33=1.0f, Real m34=0.0f, Real m41=0.0f, Real m42=0.0f, Real m43=0.0f, Real m44=1.0f) | |
| Default constructor. | |
| void | Identity () |
| Identity matrix. | |
| Real | Determinant () const |
| Return the determinant. | |
| CMatrix4 | Transpose () const |
| Transpose the matrix. | |
| CMatrix4 | Inverse () const |
| Inverse the matrix. | |
| void | SetTranslation (Real x, Real y, Real z) |
| Build a translation matrix. | |
| void | SetTranslation (const TVector3F &Trans) |
| Build a translation matrix. | |
| void | SetScaling (Real x, Real y, Real z) |
| Build a scaling matrix. | |
| void | SetRotationX (Real Angle) |
| Build a rotation X matrix. | |
| void | SetRotationY (Real Angle) |
| Build a rotation Y matrix. | |
| void | SetRotationZ (Real Angle) |
| Build a rotation Z matrix. | |
| void | SetRotationX (Real Angle, const TVector3F &Center) |
| Built a rotation X matrix by specifying the center. | |
| void | SetRotationY (Real Angle, const TVector3F &Center) |
| Built a rotation Y matrix by specifying the center. | |
| void | SetRotationZ (Real Angle, const TVector3F &Center) |
| Built a rotation Z matrix by specifying the center. | |
| TVector3F | GetTranslation () const |
| Get the translation transformation part of the matrix. | |
| TVector3F | Transform (const TVector3F &v, Real w=1.0f) const |
| Transform a vector (3 reals). | |
| TVector4F | Transform (const TVector4F &v) const |
| Transform a vector (4 reals). | |
| void | OrthoOffCenter (Real Left, Real Top, Real Right, Real Bottom) |
| Build a ortho off center matrix. | |
| void | PerspectiveFOV (Real Fov, Real Ratio, Real Near, Real Far) |
| Build a perspective projection matrix. | |
| void | LookAt (const TVector3F &From, const TVector3F &To, const TVector3F &Up=TVector3F(0, 1, 0)) |
| Build a view matrix. | |
| CMatrix4 | operator+ () const |
| CMatrix4 | operator- () const |
| CMatrix4 | operator+ (const CMatrix4 &m) const |
| CMatrix4 | operator- (const CMatrix4 &m) const |
| const CMatrix4 & | operator+= (const CMatrix4 &m) |
| const CMatrix4 & | operator-= (const CMatrix4 &m) |
| CMatrix4 | operator * (const CMatrix4 &m) const |
| const CMatrix4 & | operator *= (const CMatrix4 &m) |
| const CMatrix4 & | operator *= (Real t) |
| const CMatrix4 & | operator/= (Real t) |
| bool | operator== (const CMatrix4 &m) const |
| bool | operator!= (const CMatrix4 &m) const |
| Real & | operator() (size_t i, size_t j) |
| Indexed access operator. | |
| const Real & | operator() (size_t i, size_t j) const |
| Indexed access operator. | |
| operator Real * () | |
| Cast in Real* operator. | |
| operator const Real * () const | |
| Cast in Real* operator. | |
Public Attributes | |
| Real | a11 |
| Real | a21 |
| Real | a31 |
| Real | a41 |
| Real | a12 |
| Real | a22 |
| Real | a32 |
| Real | a42 |
| Real | a13 |
| Real | a23 |
| Real | a33 |
| Real | a43 |
| Real | a14 |
| Real | a24 |
| Real | a34 |
| Real | a44 |
Definition at line 33 of file KeosMatrix4.h.
| Keos::CMatrix4::CMatrix4 | ( | Real | m11 = 1.0f, |
|
| Real | m12 = 0.0f, |
|||
| Real | m13 = 0.0f, |
|||
| Real | m14 = 0.0f, |
|||
| Real | m21 = 0.0f, |
|||
| Real | m22 = 1.0f, |
|||
| Real | m23 = 0.0f, |
|||
| Real | m24 = 0.0f, |
|||
| Real | m31 = 0.0f, |
|||
| Real | m32 = 0.0f, |
|||
| Real | m33 = 1.0f, |
|||
| Real | m34 = 0.0f, |
|||
| Real | m41 = 0.0f, |
|||
| Real | m42 = 0.0f, |
|||
| Real | m43 = 0.0f, |
|||
| Real | m44 = 1.0f | |||
| ) | [inline] |
Default constructor.
Definition at line 212 of file KeosMatrix4.h.
Referenced by operator *(), operator+(), operator-(), and Transpose().
| void Keos::CMatrix4::Identity | ( | ) | [inline] |
| Real Keos::CMatrix4::Determinant | ( | ) | const [inline] |
| CMatrix4 Keos::CMatrix4::Transpose | ( | ) | const [inline] |
| CMatrix4 Keos::CMatrix4::Inverse | ( | ) | const [inline] |
Build a translation matrix.
| x | X Translation. | |
| y | Y Translation. | |
| z | Z Translation. |
Definition at line 296 of file KeosMatrix4.h.
References a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43, and a44.
Referenced by SetRotationX(), SetRotationY(), SetRotationZ(), and SetTranslation().
| void Keos::CMatrix4::SetTranslation | ( | const TVector3F & | Trans | ) | [inline] |
Build a translation matrix.
| Trans | Translation vector. |
Definition at line 317 of file KeosMatrix4.h.
References SetTranslation(), Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.
Build a scaling matrix.
| x | X Scaling. | |
| y | Y Scaling. | |
| z | Z Scaling. |
Definition at line 323 of file KeosMatrix4.h.
References a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43, and a44.
Referenced by Keos::Console::CLookDefault::CLookDefault(), and Keos::Console::CLookDefault::Update().
| void Keos::CMatrix4::SetRotationX | ( | Real | Angle | ) | [inline] |
| void Keos::CMatrix4::SetRotationY | ( | Real | Angle | ) | [inline] |
| void Keos::CMatrix4::SetRotationZ | ( | Real | Angle | ) | [inline] |
Built a rotation X matrix by specifying the center.
| Angle | Rotation angle in radians. | |
| Center | Rotation center. |
Definition at line 416 of file KeosMatrix4.h.
References SetRotationX(), SetTranslation(), Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.
Built a rotation Y matrix by specifying the center.
| Angle | Rotation angle in radians. | |
| Center | Rotation center. |
Definition at line 428 of file KeosMatrix4.h.
References SetRotationY(), SetTranslation(), Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.
Built a rotation Z matrix by specifying the center.
| Angle | Rotation angle in radians. | |
| Center | Rotation center. |
Definition at line 440 of file KeosMatrix4.h.
References SetRotationZ(), SetTranslation(), Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.
| TVector3F Keos::CMatrix4::GetTranslation | ( | ) | const [inline] |
Get the translation transformation part of the matrix.
Definition at line 452 of file KeosMatrix4.h.
| void Keos::CMatrix4::LookAt | ( | const TVector3F & | From, | |
| const TVector3F & | To, | |||
| const TVector3F & | Up = TVector3F(0, 1, 0) | |||
| ) | [inline] |
Build a view matrix.
| From | Camera position. | |
| To | Camera target. | |
| Up | Up vector ((0, 1, 0) by default). |
Definition at line 534 of file KeosMatrix4.h.
References a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43, a44, Keos::CVector3< T >::Normalize(), Keos::VectorCross(), Keos::VectorDot(), Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.
| CMatrix4 Keos::CMatrix4::operator+ | ( | ) | const [inline] |
Definition at line 563 of file KeosMatrix4.h.
| CMatrix4 Keos::CMatrix4::operator- | ( | ) | const [inline] |
Definition at line 666 of file KeosMatrix4.h.
| bool Keos::CMatrix4::operator== | ( | const CMatrix4 & | m | ) | const [inline] |
| bool Keos::CMatrix4::operator!= | ( | const CMatrix4 & | m | ) | const [inline] |
Definition at line 733 of file KeosMatrix4.h.
| Real & Keos::CMatrix4::operator() | ( | size_t | i, | |
| size_t | j | |||
| ) | [inline] |
Indexed access operator.
| i | Line | |
| j | column |
Definition at line 739 of file KeosMatrix4.h.
References operator Real *().
Referenced by operator()().
| const Real & Keos::CMatrix4::operator() | ( | size_t | i, | |
| size_t | j | |||
| ) | const [inline] |
Indexed access operator.
| i | Line | |
| j | column |
Definition at line 745 of file KeosMatrix4.h.
References operator()().
| Keos::CMatrix4::operator Real * | ( | ) | [inline] |
Cast in Real* operator.
Definition at line 757 of file KeosMatrix4.h.
References a11.
Referenced by operator()().
| Keos::CMatrix4::operator const Real * | ( | ) | const [inline] |
Definition at line 193 of file KeosMatrix4.h.
Referenced by Determinant(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator const Real *(), operator Real *(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 193 of file KeosMatrix4.h.
Referenced by Determinant(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 193 of file KeosMatrix4.h.
Referenced by Determinant(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 193 of file KeosMatrix4.h.
Referenced by Determinant(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 194 of file KeosMatrix4.h.
Referenced by Determinant(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 194 of file KeosMatrix4.h.
Referenced by Determinant(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 194 of file KeosMatrix4.h.
Referenced by Determinant(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 194 of file KeosMatrix4.h.
Referenced by Determinant(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 195 of file KeosMatrix4.h.
Referenced by Determinant(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 195 of file KeosMatrix4.h.
Referenced by Determinant(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 195 of file KeosMatrix4.h.
Referenced by Determinant(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 195 of file KeosMatrix4.h.
Referenced by Determinant(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 196 of file KeosMatrix4.h.
Referenced by Determinant(), GetTranslation(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 196 of file KeosMatrix4.h.
Referenced by Determinant(), GetTranslation(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 196 of file KeosMatrix4.h.
Referenced by Determinant(), GetTranslation(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
Definition at line 196 of file KeosMatrix4.h.
Referenced by Determinant(), Identity(), Inverse(), LookAt(), Keos::operator *(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), Keos::operator/(), operator/=(), Keos::operator<<(), operator==(), Keos::operator>>(), OrthoOffCenter(), PerspectiveFOV(), SetRotationX(), SetRotationY(), SetRotationZ(), SetScaling(), SetTranslation(), Transform(), and Transpose().
1.5.1-p1