|
0.45.0
|
#include <iaMatrix.h>
Public Member Functions | |
| bool | operator== (const iaMatrix< T > &other) const |
| bool | operator!= (const iaMatrix< T > &other) const |
| iaVector3< T > | operator* (const iaVector3< T > &vec) const |
| iaVector4< T > | operator* (const iaVector4< T > &vec) const |
| iaMatrix | operator* (const iaMatrix &other) |
| void | operator*= (const iaMatrix &other) |
| T & | operator[] (int i) |
| T | operator[] (int i) const |
| void | identity () |
| T | determinant () |
| T | determinant3x3 () |
| bool | invert () |
| void | transpose () |
| void | lookAt (const iaVector3< T > &eye, const iaVector3< T > &coi, const iaVector3< T > &top) |
| void | frustum (T left, T right, T bottom, T top, T nearPlain, T farPlain) |
| void | perspective (T fov, T aspect, T nearPlain, T farPlain) |
| void | ortho (T left, T right, T bottom, T top, T nearPlain, T farPlain) |
| void | grammSchmidt (iaVector3< T > &depth) |
| void | grammSchmidt (iaVector3< T > &depth, iaVector3< T > &top) |
| void | translate (const iaVector3< T > &a) |
| void | translate (T x, T y, T z) |
| void | scale (const iaVector3< T > &s) |
| void | scale (T x, T y, T z) |
| void | move (T distance, iaAxis axis) |
| void | move (const iaVector3< T > &v) |
| void | rotate (T angle, iaAxis axis) |
| void | rotate (const iaVector3< T > &vec) |
| void | rotate (T x, T y, T z) |
| void | shear (const iaVector3< T > &vec) |
| void | shear (T xy, T xz, T yz) |
| const T * | getData () const |
| T * | getData () |
| void | setData (const T *data) |
| template<class T2 > | |
| iaMatrix< T2 > | convert () |
| iaMatrix () | |
| ~iaMatrix () | |
| template<class T2 > | |
| iaMatrix< T2 > | convert () |
Public Attributes | |
| iaVector3< T > | _right |
| T | _w0 = static_cast<T>(0) |
| iaVector3< T > | _top |
| T | _w1 = static_cast<T>(0) |
| iaVector3< T > | _depth |
| T | _w2 = static_cast<T>(0) |
| iaVector3< T > | _pos |
| T | _w3 = static_cast<T>(0) |
right handed 4x4 Matrix
data by name
_right._x | _top._x | _depth._x | _pos.x _right._y | _top._y | _depth._y | _pos.y _right._z | _top._z | _depth._z | _pos.z _w0 | _w1 | _w2 | _w3
data by index (index equals to position in memory)
0 | 4 | 8 | 12 1 | 5 | 9 | 13 2 | 6 | 10 | 14 3 | 7 | 11 | 15
corresponds to
0,0 | 1,0 | 2,0 | 3,0 0,1 | 1,1 | 2,1 | 3,1 0,2 | 1,2 | 2,2 | 3,2 0,3 | 1,3 | 2,3 | 3,3
shear
1 | 0 | 0 | 0 z (xy) | 1 | 0 | 0 y (xz) | x (yz) | 1 | 0 0 | 0 | 0 | 1
translate
1 | 0 | 0 | x 0 | 1 | 0 | y 0 | 0 | 1 | z 0 | 0 | 0 | 1
scale
x | 0 | 0 | 0 0 | y | 0 | 0 0 | 0 | z | 0 0 | 0 | 0 | 1
rotate X
1 | 0 | 0 | 0 0 | cos(a) | -sin(a) | 0 0 | sin(a) | cos(a) | 0 0 | 0 | 0 | 1
rotate Y
cos(a) | 0 | sin(a) | 0 0 | 1 | 0 | 0 -sin(a) | 0 | cos(a) | 0 0 | 0 | | 1
rotate Z
cos(a) | -sin(a) | 0 | 0 sin(a) | cos(a) | 0 | 0 0 | 0 | 1 | 0 0 | 0 | 0 | 1
| iaMatrix::iaMatrix | ( | ) |
initializes the matrix with the id matrix
| iaMatrix::~iaMatrix | ( | ) |
does nothing
converts the vector in to given type of vector
| IGOR_INLINE T iaMatrix::determinant | ( | ) |
returns the determinant of the matrix
| IGOR_INLINE T iaMatrix::determinant3x3 | ( | ) |
returns the determinant of the 3x3 part of the matrix
| IGOR_INLINE void iaMatrix::frustum | ( | T | left, |
| T | right, | ||
| T | bottom, | ||
| T | top, | ||
| T | nearPlain, | ||
| T | farPlain | ||
| ) |
calculates a frustum matrix
| left | the left value |
| right | the right value |
| bottom | the bottom value |
| top | the top value |
| nearPlain | the near plain distance |
| farPlain | the far plain distance |
| IGOR_INLINE T * iaMatrix::getData | ( | ) |
| IGOR_INLINE const T * iaMatrix::getData | ( | ) | const |
| IGOR_INLINE void iaMatrix::grammSchmidt | ( | iaVector3< T > & | depth | ) |
calculates a orthogonal matrix based on one direction
does only change the orientation of this matrix the vector does not have top be normalized
| depth | the direction the matrix bases on |
| IGOR_INLINE void iaMatrix::grammSchmidt | ( | iaVector3< T > & | depth, |
| iaVector3< T > & | top | ||
| ) |
calculates a orthogonal matrix based on a plane with primary direction depth
does only change the orientation of this matrix the vectors do not have to be perpendicular the vectors do not have to be normalized
| depth | the direction the matrix bases on |
| top | the second vector to define the plane |
| IGOR_INLINE void iaMatrix::identity | ( | ) |
initializes matrix with id matrix
| IGOR_INLINE bool iaMatrix::invert | ( | ) |
calculates the inverse of the matrix and overwrites the original value
| IGOR_INLINE void iaMatrix::lookAt | ( | const iaVector3< T > & | eye, |
| const iaVector3< T > & | coi, | ||
| const iaVector3< T > & | top | ||
| ) |
calculates a view matrix
| eye | eye point of the camera |
| coi | center of interesst |
| top | the ipvector of the camera |
| IGOR_INLINE void iaMatrix::move | ( | const iaVector3< T > & | v | ) |
translate the matrix along it's own orientation vectors by given vector
| v | the given vector |
| IGOR_INLINE void iaMatrix::move | ( | T | distance, |
| iaAxis | axis | ||
| ) |
translate the matrix along it's own orientation vectors
| distance | distance to translate the matrix |
| axis | axis to translate along |
| IGOR_INLINE bool iaMatrix::operator!= | ( | const iaMatrix< T > & | other | ) | const |
negated comparison of two matrices
| other | the second matrix to compare this matrix with |
| iaMatrix iaux::iaMatrix< T >::operator* | ( | const iaMatrix< T > & | other | ) |
matrix multiplication
| iaVector3< T > iaux::iaMatrix< T >::operator* | ( | const iaVector3< T > & | vec | ) | const |
matrix vector3 multiplication
| iaVector4< T > iaux::iaMatrix< T >::operator* | ( | const iaVector4< T > & | vec | ) | const |
matrix vector4 multiplication
| IGOR_INLINE void iaMatrix::operator*= | ( | const iaMatrix< T > & | other | ) |
matrix multiplication
| IGOR_INLINE bool iaMatrix::operator== | ( | const iaMatrix< T > & | other | ) | const |
comparison of two matrices
| other | the second matrix to compare this matrix with |
| IGOR_INLINE T & iaMatrix::operator[] | ( | int | i | ) |
matrix component by index
| i | only indexes from 0 to 15 are allowed |
| IGOR_INLINE T iaMatrix::operator[] | ( | int | i | ) | const |
matrix component by index
| i | only indexes from 0 to 15 are allowed |
| IGOR_INLINE void iaMatrix::ortho | ( | T | left, |
| T | right, | ||
| T | bottom, | ||
| T | top, | ||
| T | nearPlain, | ||
| T | farPlain | ||
| ) |
calculates a othogonal projection matrix
| left | the left value |
| right | the right value |
| bottom | the bottom value |
| top | the top value |
| nearPlain | the near plain distance |
| farPlain | the far plain distance |
| IGOR_INLINE void iaMatrix::perspective | ( | T | fov, |
| T | aspect, | ||
| T | nearPlain, | ||
| T | farPlain | ||
| ) |
calculates a perspective projection matrix
| fov | field of view in degrees |
| aspect | aspect ratio |
| nearPlain | near clipping plane distance |
| farPlain | far clipping plane distance |
| IGOR_INLINE void iaMatrix::rotate | ( | const iaVector3< T > & | vec | ) |
rotates matrix in three axis
| vec | the rotation vector |
| IGOR_INLINE void iaMatrix::rotate | ( | T | angle, |
| iaAxis | axis | ||
| ) |
rotates the matrix around a specified orientation vector of the matrix
| angle | angle to rotate in radians |
| axis | axis to rotate around |
| IGOR_INLINE void iaMatrix::rotate | ( | T | x, |
| T | y, | ||
| T | z | ||
| ) |
rotates matrix in three axis
| x | x axis |
| y | y axis |
| z | z axis |
| IGOR_INLINE void iaMatrix::scale | ( | const iaVector3< T > & | s | ) |
scale matrix by vector
| s | scale vector |
| IGOR_INLINE void iaMatrix::scale | ( | T | x, |
| T | y, | ||
| T | z | ||
| ) |
scales the matrix
| x | scale in x axis |
| y | scale in y axis |
| z | scale in z axis |
| IGOR_INLINE void iaMatrix::setData | ( | const T * | data | ) |
set data
| IGOR_INLINE void iaMatrix::shear | ( | const iaVector3< T > & | vec | ) |
shears matrix in three axis
| vec | the shear vector |
| IGOR_INLINE void iaMatrix::shear | ( | T | xy, |
| T | xz, | ||
| T | yz | ||
| ) |
shears matrix in three axis
| xy | shear in xy plane |
| xz | shear in yz plane |
| yz | shear in yz plane |
| IGOR_INLINE void iaMatrix::translate | ( | const iaVector3< T > & | a | ) |
translate the matrix by vector 3d
| a | translation vector |
| IGOR_INLINE void iaMatrix::translate | ( | T | x, |
| T | y, | ||
| T | z | ||
| ) |
translate the matrix by vector 3d
| x | x component |
| y | y component |
| z | z component |
| IGOR_INLINE void iaMatrix::transpose | ( | ) |
transposes the matrix
| iaVector3<T> iaux::iaMatrix< T >::_depth |
| iaVector3<T> iaux::iaMatrix< T >::_pos |
| iaVector3<T> iaux::iaMatrix< T >::_right |
internal data
| iaVector3<T> iaux::iaMatrix< T >::_top |
| T iaux::iaMatrix< T >::_w0 = static_cast<T>(0) |
| T iaux::iaMatrix< T >::_w1 = static_cast<T>(0) |
| T iaux::iaMatrix< T >::_w2 = static_cast<T>(0) |
| T iaux::iaMatrix< T >::_w3 = static_cast<T>(0) |