Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
#include <Matrix4.hpp>
Public Member Functions | |
| template<typename T > | |
| Matrix4 (const T &m) | |
| Matrix4 () | |
| Matrix4 (scalar_type n) | |
| Matrix4 (scalar_type e00, scalar_type e01, scalar_type e02, scalar_type e03, scalar_type e10, scalar_type e11, scalar_type e12, scalar_type e13, scalar_type e20, scalar_type e21, scalar_type e22, scalar_type e23, scalar_type e30, scalar_type e31, scalar_type e32, scalar_type e33) | |
| const scalar_type & | e (unsigned i, unsigned j) const |
| scalar_type & | e (unsigned i, unsigned j) |
| const Vector4< scalar_type > & | operator[] (unsigned int i) const |
| Vector4< scalar_type > & | operator[] (unsigned int i) |
| Vector3< scalar_type > | getX () const |
| Vector3< scalar_type > | getY () const |
| Vector3< scalar_type > | getZ () const |
| Vector3< scalar_type > | getT () const |
| Matrix4 & | setX (const Vector3< scalar_type > &v) |
| Matrix4 & | setY (const Vector3< scalar_type > &v) |
| Matrix4 & | setZ (const Vector3< scalar_type > &v) |
| Matrix4 & | setT (const Vector3< scalar_type > &v) |
| bool | operator== (const Matrix4 &m) const |
| bool | operator!= (const Matrix4 &m) const |
| Matrix4 & | operator= (const Matrix4 &m) |
| Matrix4 | operator+ (const Matrix4 &m) const |
| Matrix4 & | operator+= (const Matrix4 &m) |
| Matrix4 | operator- (const Matrix4 &m) const |
| Matrix4 & | operator-= (const Matrix4 &m) |
| Matrix4 & | operator*= (const Matrix4 &m) |
| Matrix4 | operator- () const |
| Matrix4 | operator+ (scalar_type d) const |
| Matrix4 & | operator+= (scalar_type d) |
| Matrix4 | operator- (scalar_type d) const |
| Matrix4 & | operator-= (scalar_type d) |
| Matrix4 | operator* (scalar_type d) const |
| Matrix4 & | operator*= (scalar_type d) |
| Matrix4 | operator/ (scalar_type d) const |
| Matrix4 & | operator/= (scalar_type d) |
| bool | isIdentity () const |
| Matrix4 | as3x3 () const |
| Matrix3< scalar_type > | get3x3 () const |
| void | set3x3 (const Matrix3< scalar_type > &m) |
| This writes only on the upper 3x3 part of the matrix without touching the last row and column. | |
| scalar_type * | ptr () |
| const scalar_type * | ptr () const |
| Matrix4 & | transpose () |
| bool | isNull () const |
| void | setIdentity () |
| Matrix4 | inverse (bool *invertible=NULL) const |
| Matrix4 & | invert (bool *invertible=NULL) |
| const scalar_type & | e (int i, int j) const |
| scalar_type & | e (int i, int j) |
| void | getAsLookAt (Vector3< scalar_type > &eye, Vector3< scalar_type > &look, Vector3< scalar_type > &up, Vector3< scalar_type > &right) const |
| Matrix4 & | rotate (scalar_type degrees, const Vector3< scalar_type > &v) |
| Matrix4 & | rotate (scalar_type degrees, scalar_type x, scalar_type y, scalar_type z) |
| Matrix4 & | rotate (scalar_type degrees1, const Vector3< scalar_type > &v1, scalar_type degrees2, const Vector3< scalar_type > &v2) |
| void | getYXRotationAngles (scalar_type °rees_y, scalar_type °rees_x) const |
If this matrix can be represented as RY(degrees_y) * RX(degrees_x), where RX and RY are rotation matrices around the X and Y axis respectively, this function returns the rotation angles degrees_y and degrees_x. | |
| Matrix4 & | rotate (scalar_type degrees1, const Vector3< scalar_type > &v1, scalar_type degrees2, const Vector3< scalar_type > &v2, scalar_type degrees3, const Vector3< scalar_type > &v3) |
| Matrix4 & | rotateXYZ (scalar_type degX, scalar_type degY, scalar_type degZ) |
| Matrix4 & | rotateZYX (scalar_type degZ, scalar_type degY, scalar_type degX) |
| Matrix4 & | rotate (const Vector4< scalar_type > &from, const Vector4< scalar_type > &to) |
| Matrix4 & | rotate (const Vector3< scalar_type > &from, const Vector3< scalar_type > &to) |
| Matrix4 & | translate (scalar_type x, scalar_type y, scalar_type z) |
| Matrix4 & | translate (const Vector3< scalar_type > &v) |
| Matrix4 & | scale (scalar_type x, scalar_type y, scalar_type z) |
Static Public Member Functions | |
| static Matrix4 | perspective (scalar_type fovy, scalar_type aspect_ratio, scalar_type znear, scalar_type zfar) |
| static Matrix4 | frustum (scalar_type pleft, scalar_type pright, scalar_type pbottom, scalar_type ptop, scalar_type pnear, scalar_type pfar) |
| static Matrix4 | ortho (scalar_type pleft, scalar_type pright, scalar_type pbottom, scalar_type ptop, scalar_type pnear, scalar_type pfar) |
| static Matrix4 | ortho2D (scalar_type pleft, scalar_type pright, scalar_type pbottom, scalar_type ptop) |
| static Matrix4 | lookAt (const Vector3< scalar_type > &eye, const Vector3< scalar_type > &look, const Vector3< scalar_type > &up) |
| static Matrix4 | rotation (scalar_type degrees, scalar_type x, scalar_type y, scalar_type z) |
| static Matrix4 | rotation (scalar_type degrees, const Vector3< scalar_type > &v) |
| static Matrix4 | rotation (scalar_type degrees1, const Vector3< scalar_type > &v1, scalar_type degrees2, const Vector3< scalar_type > &v2) |
| static Matrix4 | rotation (scalar_type degrees1, const Vector3< scalar_type > &v1, scalar_type degrees2, const Vector3< scalar_type > &v2, scalar_type degrees3, const Vector3< scalar_type > &v3) |
| static Matrix4 | rotationXYZ (scalar_type degX, scalar_type degY, scalar_type degZ) |
| static Matrix4 | rotationZYX (scalar_type degZ, scalar_type degY, scalar_type degX) |
| static Matrix4 | rotation (const Vector4< scalar_type > &from, const Vector4< scalar_type > &to) |
| static Matrix4 | rotation (const Vector3< scalar_type > &from, const Vector3< scalar_type > &to) |
| static Matrix4 | translation (const Vector3< scalar_type > &v) |
| static Matrix4 | translation (scalar_type x, scalar_type y, scalar_type z) |
| static Matrix4 | scaling (const Vector3< scalar_type > &v) |
| static Matrix4 | scaling (scalar_type x, scalar_type y, scalar_type z) |
Protected Attributes | |
| Vector4< scalar_type > | mVec [4] |
| vl::Matrix4< scalar_type >::Matrix4 | ( | const T & | m | ) | [inline, explicit] |
| vl::Matrix4< scalar_type >::Matrix4 | ( | ) | [inline] |
| vl::Matrix4< scalar_type >::Matrix4 | ( | scalar_type | n | ) | [inline] |
| vl::Matrix4< scalar_type >::Matrix4 | ( | scalar_type | e00, | |
| scalar_type | e01, | |||
| scalar_type | e02, | |||
| scalar_type | e03, | |||
| scalar_type | e10, | |||
| scalar_type | e11, | |||
| scalar_type | e12, | |||
| scalar_type | e13, | |||
| scalar_type | e20, | |||
| scalar_type | e21, | |||
| scalar_type | e22, | |||
| scalar_type | e23, | |||
| scalar_type | e30, | |||
| scalar_type | e31, | |||
| scalar_type | e32, | |||
| scalar_type | e33 | |||
| ) | [inline, explicit] |
| const scalar_type& vl::Matrix4< scalar_type >::e | ( | unsigned | i, | |
| unsigned | j | |||
| ) | const [inline] |
| scalar_type& vl::Matrix4< scalar_type >::e | ( | unsigned | i, | |
| unsigned | j | |||
| ) | [inline] |
| const Vector4<scalar_type>& vl::Matrix4< scalar_type >::operator[] | ( | unsigned int | i | ) | const [inline] |
| Vector4<scalar_type>& vl::Matrix4< scalar_type >::operator[] | ( | unsigned int | i | ) | [inline] |
| Vector3<scalar_type> vl::Matrix4< scalar_type >::getX | ( | ) | const [inline] |
| Vector3<scalar_type> vl::Matrix4< scalar_type >::getY | ( | ) | const [inline] |
| Vector3<scalar_type> vl::Matrix4< scalar_type >::getZ | ( | ) | const [inline] |
| Vector3<scalar_type> vl::Matrix4< scalar_type >::getT | ( | ) | const [inline] |
| Matrix4& vl::Matrix4< scalar_type >::setX | ( | const Vector3< scalar_type > & | v | ) | [inline] |
| Matrix4& vl::Matrix4< scalar_type >::setY | ( | const Vector3< scalar_type > & | v | ) | [inline] |
| Matrix4& vl::Matrix4< scalar_type >::setZ | ( | const Vector3< scalar_type > & | v | ) | [inline] |
| Matrix4& vl::Matrix4< scalar_type >::setT | ( | const Vector3< scalar_type > & | v | ) | [inline] |
| bool vl::Matrix4< scalar_type >::operator== | ( | const Matrix4< scalar_type > & | m | ) | const [inline] |
| bool vl::Matrix4< scalar_type >::operator!= | ( | const Matrix4< scalar_type > & | m | ) | const [inline] |
| Matrix4& vl::Matrix4< scalar_type >::operator= | ( | const Matrix4< scalar_type > & | m | ) | [inline] |
| Matrix4 vl::Matrix4< scalar_type >::operator+ | ( | const Matrix4< scalar_type > & | m | ) | const [inline] |
| Matrix4& vl::Matrix4< scalar_type >::operator+= | ( | const Matrix4< scalar_type > & | m | ) | [inline] |
| Matrix4 vl::Matrix4< scalar_type >::operator- | ( | const Matrix4< scalar_type > & | m | ) | const [inline] |
| Matrix4& vl::Matrix4< scalar_type >::operator-= | ( | const Matrix4< scalar_type > & | m | ) | [inline] |
| Matrix4& vl::Matrix4< scalar_type >::operator*= | ( | const Matrix4< scalar_type > & | m | ) | [inline] |
| Matrix4 vl::Matrix4< scalar_type >::operator- | ( | ) | const [inline] |
| Matrix4 vl::Matrix4< scalar_type >::operator+ | ( | scalar_type | d | ) | const [inline] |
| Matrix4& vl::Matrix4< scalar_type >::operator+= | ( | scalar_type | d | ) | [inline] |
| Matrix4 vl::Matrix4< scalar_type >::operator- | ( | scalar_type | d | ) | const [inline] |
| Matrix4& vl::Matrix4< scalar_type >::operator-= | ( | scalar_type | d | ) | [inline] |
| Matrix4 vl::Matrix4< scalar_type >::operator* | ( | scalar_type | d | ) | const [inline] |
| Matrix4& vl::Matrix4< scalar_type >::operator*= | ( | scalar_type | d | ) | [inline] |
| Matrix4 vl::Matrix4< scalar_type >::operator/ | ( | scalar_type | d | ) | const [inline] |
| Matrix4& vl::Matrix4< scalar_type >::operator/= | ( | scalar_type | d | ) | [inline] |
| bool vl::Matrix4< scalar_type >::isIdentity | ( | ) | const [inline] |
| Matrix4 vl::Matrix4< scalar_type >::as3x3 | ( | ) | const [inline] |
| Matrix3<scalar_type> vl::Matrix4< scalar_type >::get3x3 | ( | ) | const [inline] |
| void vl::Matrix4< scalar_type >::set3x3 | ( | const Matrix3< scalar_type > & | m | ) | [inline] |
This writes only on the upper 3x3 part of the matrix without touching the last row and column.
| scalar_type* vl::Matrix4< scalar_type >::ptr | ( | ) | [inline] |
| const scalar_type* vl::Matrix4< scalar_type >::ptr | ( | ) | const [inline] |
| Matrix4& vl::Matrix4< scalar_type >::transpose | ( | ) | [inline] |
| bool vl::Matrix4< scalar_type >::isNull | ( | ) | const [inline] |
| void vl::Matrix4< scalar_type >::setIdentity | ( | ) | [inline] |
| Matrix4< scalar_type > vl::Matrix4< scalar_type >::inverse | ( | bool * | invertible = NULL |
) | const [inline] |
| Matrix4& vl::Matrix4< scalar_type >::invert | ( | bool * | invertible = NULL |
) | [inline] |
| const scalar_type& vl::Matrix4< scalar_type >::e | ( | int | i, | |
| int | j | |||
| ) | const [inline] |
| scalar_type& vl::Matrix4< scalar_type >::e | ( | int | i, | |
| int | j | |||
| ) | [inline] |
| Matrix4< scalar_type > vl::Matrix4< scalar_type >::perspective | ( | scalar_type | fovy, | |
| scalar_type | aspect_ratio, | |||
| scalar_type | znear, | |||
| scalar_type | zfar | |||
| ) | [inline, static] |
| Matrix4< scalar_type > vl::Matrix4< scalar_type >::frustum | ( | scalar_type | pleft, | |
| scalar_type | pright, | |||
| scalar_type | pbottom, | |||
| scalar_type | ptop, | |||
| scalar_type | pnear, | |||
| scalar_type | pfar | |||
| ) | [inline, static] |
| Matrix4< scalar_type > vl::Matrix4< scalar_type >::ortho | ( | scalar_type | pleft, | |
| scalar_type | pright, | |||
| scalar_type | pbottom, | |||
| scalar_type | ptop, | |||
| scalar_type | pnear, | |||
| scalar_type | pfar | |||
| ) | [inline, static] |
| Matrix4< scalar_type > vl::Matrix4< scalar_type >::ortho2D | ( | scalar_type | pleft, | |
| scalar_type | pright, | |||
| scalar_type | pbottom, | |||
| scalar_type | ptop | |||
| ) | [inline, static] |
| Matrix4< scalar_type > vl::Matrix4< scalar_type >::lookAt | ( | const Vector3< scalar_type > & | eye, | |
| const Vector3< scalar_type > & | look, | |||
| const Vector3< scalar_type > & | up | |||
| ) | [inline, static] |
| void vl::Matrix4< scalar_type >::getAsLookAt | ( | Vector3< scalar_type > & | eye, | |
| Vector3< scalar_type > & | look, | |||
| Vector3< scalar_type > & | up, | |||
| Vector3< scalar_type > & | right | |||
| ) | const [inline] |
| Matrix4< scalar_type > vl::Matrix4< scalar_type >::rotation | ( | scalar_type | degrees, | |
| scalar_type | x, | |||
| scalar_type | y, | |||
| scalar_type | z | |||
| ) | [inline, static] |
| static Matrix4 vl::Matrix4< scalar_type >::rotation | ( | scalar_type | degrees, | |
| const Vector3< scalar_type > & | v | |||
| ) | [inline, static] |
| static Matrix4 vl::Matrix4< scalar_type >::rotation | ( | scalar_type | degrees1, | |
| const Vector3< scalar_type > & | v1, | |||
| scalar_type | degrees2, | |||
| const Vector3< scalar_type > & | v2 | |||
| ) | [inline, static] |
| static Matrix4 vl::Matrix4< scalar_type >::rotation | ( | scalar_type | degrees1, | |
| const Vector3< scalar_type > & | v1, | |||
| scalar_type | degrees2, | |||
| const Vector3< scalar_type > & | v2, | |||
| scalar_type | degrees3, | |||
| const Vector3< scalar_type > & | v3 | |||
| ) | [inline, static] |
| Matrix4& vl::Matrix4< scalar_type >::rotate | ( | scalar_type | degrees, | |
| const Vector3< scalar_type > & | v | |||
| ) | [inline] |
| Matrix4& vl::Matrix4< scalar_type >::rotate | ( | scalar_type | degrees, | |
| scalar_type | x, | |||
| scalar_type | y, | |||
| scalar_type | z | |||
| ) | [inline] |
| Matrix4& vl::Matrix4< scalar_type >::rotate | ( | scalar_type | degrees1, | |
| const Vector3< scalar_type > & | v1, | |||
| scalar_type | degrees2, | |||
| const Vector3< scalar_type > & | v2 | |||
| ) | [inline] |
| void vl::Matrix4< scalar_type >::getYXRotationAngles | ( | scalar_type & | degrees_y, | |
| scalar_type & | degrees_x | |||
| ) | const [inline] |
If this matrix can be represented as RY(degrees_y) * RX(degrees_x), where RX and RY are rotation matrices around the X and Y axis respectively, this function returns the rotation angles degrees_y and degrees_x.
| Matrix4& vl::Matrix4< scalar_type >::rotate | ( | scalar_type | degrees1, | |
| const Vector3< scalar_type > & | v1, | |||
| scalar_type | degrees2, | |||
| const Vector3< scalar_type > & | v2, | |||
| scalar_type | degrees3, | |||
| const Vector3< scalar_type > & | v3 | |||
| ) | [inline] |
| static Matrix4 vl::Matrix4< scalar_type >::rotationXYZ | ( | scalar_type | degX, | |
| scalar_type | degY, | |||
| scalar_type | degZ | |||
| ) | [inline, static] |
| Matrix4& vl::Matrix4< scalar_type >::rotateXYZ | ( | scalar_type | degX, | |
| scalar_type | degY, | |||
| scalar_type | degZ | |||
| ) | [inline] |
| static Matrix4 vl::Matrix4< scalar_type >::rotationZYX | ( | scalar_type | degZ, | |
| scalar_type | degY, | |||
| scalar_type | degX | |||
| ) | [inline, static] |
| Matrix4& vl::Matrix4< scalar_type >::rotateZYX | ( | scalar_type | degZ, | |
| scalar_type | degY, | |||
| scalar_type | degX | |||
| ) | [inline] |
| static Matrix4 vl::Matrix4< scalar_type >::rotation | ( | const Vector4< scalar_type > & | from, | |
| const Vector4< scalar_type > & | to | |||
| ) | [inline, static] |
| Matrix4< scalar_type > vl::Matrix4< scalar_type >::rotation | ( | const Vector3< scalar_type > & | from, | |
| const Vector3< scalar_type > & | to | |||
| ) | [inline, static] |
| Matrix4& vl::Matrix4< scalar_type >::rotate | ( | const Vector4< scalar_type > & | from, | |
| const Vector4< scalar_type > & | to | |||
| ) | [inline] |
| Matrix4& vl::Matrix4< scalar_type >::rotate | ( | const Vector3< scalar_type > & | from, | |
| const Vector3< scalar_type > & | to | |||
| ) | [inline] |
| static Matrix4 vl::Matrix4< scalar_type >::translation | ( | const Vector3< scalar_type > & | v | ) | [inline, static] |
| static Matrix4 vl::Matrix4< scalar_type >::translation | ( | scalar_type | x, | |
| scalar_type | y, | |||
| scalar_type | z | |||
| ) | [inline, static] |
| Matrix4& vl::Matrix4< scalar_type >::translate | ( | scalar_type | x, | |
| scalar_type | y, | |||
| scalar_type | z | |||
| ) | [inline] |
| Matrix4& vl::Matrix4< scalar_type >::translate | ( | const Vector3< scalar_type > & | v | ) | [inline] |
| static Matrix4 vl::Matrix4< scalar_type >::scaling | ( | const Vector3< scalar_type > & | v | ) | [inline, static] |
| static Matrix4 vl::Matrix4< scalar_type >::scaling | ( | scalar_type | x, | |
| scalar_type | y, | |||
| scalar_type | z | |||
| ) | [inline, static] |
| Matrix4& vl::Matrix4< scalar_type >::scale | ( | scalar_type | x, | |
| scalar_type | y, | |||
| scalar_type | z | |||
| ) | [inline] |
Vector4<scalar_type> vl::Matrix4< scalar_type >::mVec[4] [protected] |