|
Developer Documentation
|
#include <OpenFlipper/libs_required/ACG/Math/Matrix4x4T.hh>
Public Types | |
| using | value_type = Scalar |
Public Member Functions | |
| Matrix4x4T () | |
| constructor: uninitialized values | |
| template<class OtherScalar > | |
| Matrix4x4T (const Matrix4x4T< OtherScalar > &_rhs) | |
| construct from other matrix type | |
| Matrix4x4T (const Scalar _array[16]) | |
| ~Matrix4x4T () | |
| destructor | |
| template<typename otherScalar > | |
| Matrix4x4T< Scalar > & | operator= (const Matrix4x4T< otherScalar > &_rhs) |
| assignment from other matrix type | |
| Scalar & | operator() (unsigned int row, unsigned int col) |
| access operator (read and write) | |
| const Scalar & | operator() (unsigned int row, unsigned int col) const |
| access operator (read only) | |
| bool | operator== (const Matrix4x4T< Scalar > &_rhs) const |
| compare two matrices (up to some epsilon) | |
| bool | operator!= (const Matrix4x4T< Scalar > &_rhs) const |
| compare two matrices | |
| Matrix4x4T | operator+ (Matrix4x4T< Scalar > _rhs) const |
| self + _rhs | |
| Matrix4x4T | operator- (Matrix4x4T< Scalar > _rhs) const |
| self - _rhs | |
| Matrix4x4T | operator* (const Matrix4x4T< Scalar > &inst) const |
| self * _rhs | |
| Matrix4x4T | operator* (const Scalar &scalar) |
| self * scalar | |
| Matrix4x4T & | operator+= (const Matrix4x4T< Scalar > &_rhs) |
| self += _rhs | |
| Matrix4x4T & | operator-= (const Matrix4x4T< Scalar > &_rhs) |
| self -= _rhs | |
| Matrix4x4T & | operator*= (const Matrix4x4T< Scalar > &_rhs) |
| self *= _rhs | |
| Matrix4x4T & | leftMult (const Matrix4x4T< Scalar > &_rhs) |
| multiply from left: self = _rhs * self | |
| template<typename T > | |
| VectorT< T, 4 > | operator* (const VectorT< T, 4 > &_v) const |
| matrix by vector multiplication | |
| template<typename T > | |
| VectorT< T, 3 > | transform_point (const VectorT< T, 3 > &_v) const |
| transform point (x',y',z',1) = M * (x,y,z,1) | |
| template<typename T > | |
| VectorT< T, 3 > | transform_vector (const VectorT< T, 3 > &_v) const |
| transform vector (x',y',z',0) = A * (x,y,z,0) | |
| void | clear () |
| sets all elements to zero | |
| void | identity () |
| setup an identity matrix | |
| bool | is_identity () const |
| check if the matrix is the identity ( up to an epsilon ) | |
| void | transpose () |
| transpose matrix | |
| bool | invert () |
| matrix inversion (returns true on success) | |
| Scalar | determinant () const |
| const Scalar * | get_raw_data () const |
| const Scalar * | raw () const |
| const Scalar * | data () const |
Protected Attributes | |
| Scalar | mat_ [16] |
Simple 4x4 Matrix. Inherited by GLMatrix.
Definition at line 92 of file Matrix4x4T.hh.
| using ACG::Matrix4x4T< Scalar >::value_type = Scalar |
Definition at line 95 of file Matrix4x4T.hh.
|
inline |
constructor: uninitialized values
Definition at line 98 of file Matrix4x4T.hh.
|
inline |
construct from other matrix type
Definition at line 102 of file Matrix4x4T.hh.
|
inline |
setup matrix using an array of N*N scalar values. elements are ordered 'column first' (like OpenGL)
Definition at line 108 of file Matrix4x4T.hh.
|
inline |
destructor
Definition at line 113 of file Matrix4x4T.hh.
|
inline |
sets all elements to zero
Definition at line 233 of file Matrix4x4T_impl.hh.
|
inline |
Definition at line 259 of file Matrix4x4T.hh.
|
inline |
Definition at line 238 of file Matrix4x4T.hh.
|
inline |
access to data array. not very nice, but in case of 4x4 matrices this member can be used to pass matrices to OpenGL e.g. glLoadMatrixf(m.get_raw_data());
Definition at line 257 of file Matrix4x4T.hh.
|
inline |
setup an identity matrix
Definition at line 249 of file Matrix4x4T_impl.hh.
| bool ACG::Matrix4x4T< Scalar >::invert | ( | ) |
matrix inversion (returns true on success)
Definition at line 290 of file Matrix4x4T_impl.hh.
|
inline |
check if the matrix is the identity ( up to an epsilon )
Definition at line 215 of file Matrix4x4T.hh.
| Matrix4x4T< Scalar > & ACG::Matrix4x4T< Scalar >::leftMult | ( | const Matrix4x4T< Scalar > & | _rhs | ) |
multiply from left: self = _rhs * self
Definition at line 136 of file Matrix4x4T_impl.hh.
|
inline |
compare two matrices
Definition at line 152 of file Matrix4x4T.hh.
|
inline |
access operator (read and write)
Definition at line 130 of file Matrix4x4T.hh.
|
inline |
access operator (read only)
Definition at line 135 of file Matrix4x4T.hh.
| Matrix4x4T< Scalar > ACG::Matrix4x4T< Scalar >::operator* | ( | const Matrix4x4T< Scalar > & | inst | ) | const |
self * _rhs
Definition at line 78 of file Matrix4x4T_impl.hh.
| Matrix4x4T< Scalar > ACG::Matrix4x4T< Scalar >::operator* | ( | const Scalar & | scalar | ) |
self * scalar
Definition at line 177 of file Matrix4x4T_impl.hh.
|
inline |
matrix by vector multiplication
Definition at line 161 of file Matrix4x4T_impl.hh.
| Matrix4x4T< Scalar > & ACG::Matrix4x4T< Scalar >::operator*= | ( | const Matrix4x4T< Scalar > & | _rhs | ) |
self *= _rhs
Definition at line 108 of file Matrix4x4T_impl.hh.
|
inline |
self + _rhs
Definition at line 158 of file Matrix4x4T.hh.
|
inline |
self += _rhs
Definition at line 177 of file Matrix4x4T.hh.
|
inline |
self - _rhs
Definition at line 164 of file Matrix4x4T.hh.
|
inline |
self -= _rhs
Definition at line 183 of file Matrix4x4T.hh.
|
inline |
assignment from other matrix type
Definition at line 118 of file Matrix4x4T.hh.
|
inline |
compare two matrices (up to some epsilon)
Definition at line 141 of file Matrix4x4T.hh.
|
inline |
Definition at line 258 of file Matrix4x4T.hh.
|
inline |
transform point (x',y',z',1) = M * (x,y,z,1)
Definition at line 195 of file Matrix4x4T_impl.hh.
|
inline |
transform vector (x',y',z',0) = A * (x,y,z,0)
Definition at line 218 of file Matrix4x4T_impl.hh.
|
inline |
transpose matrix
Definition at line 265 of file Matrix4x4T_impl.hh.
|
protected |
Definition at line 263 of file Matrix4x4T.hh.