|
CG_Labs
2020.0
|
#include <TRSTransform.h>
Public Member Functions | |
| TRSTransform () | |
| ~TRSTransform () | |
| void | ResetTransform () |
| void | Translate (glm::tvec3< T, P > v) |
| void | Scale (glm::tvec3< T, P > v) |
| void | Scale (T uniform) |
| void | Rotate (T angle, glm::tvec3< T, P > v) |
| void | RotateX (T angle) |
| void | RotateY (T angle) |
| void | RotateZ (T angle) |
| void | PreRotate (T angle, glm::tvec3< T, P > v) |
| void | PreRotateX (T angle) |
| void | PreRotateY (T angle) |
| void | PreRotateZ (T angle) |
| void | SetTranslate (glm::tvec3< T, P > v) |
| void | SetScale (glm::tvec3< T, P > v) |
| void | SetScale (T uniform) |
| void | SetRotate (T angle, glm::tvec3< T, P > v) |
| void | SetRotateX (T angle) |
| void | SetRotateY (T angle) |
| void | SetRotateZ (T angle) |
| void | LookTowards (glm::tvec3< T, P > front_vec, glm::tvec3< T, P > up_vec) |
| void | LookTowards (glm::tvec3< T, P > front_vec) |
| void | LookAt (glm::tvec3< T, P > point, glm::tvec3< T, P > up_vec) |
| void | LookAt (glm::tvec3< T, P > point) |
| glm::tmat4x4< T, P > | GetMatrix () const |
| glm::tmat4x4< T, P > | GetMatrixInverse () const |
| glm::tmat3x3< T, P > | GetRotation () const |
| glm::tvec3< T, P > | GetTranslation () const |
| glm::tvec3< T, P > | GetScale () const |
| glm::tmat4x4< T, P > | GetTranslationMatrix () const |
| glm::tmat4x4< T, P > | GetRotationMatrix () const |
| glm::tmat4x4< T, P > | GetScaleMatrix () const |
| glm::tmat4x4< T, P > | GetTranslationMatrixInverse () const |
| glm::tmat4x4< T, P > | GetRotationMatrixInverse () const |
| glm::tmat4x4< T, P > | GetScaleMatrixInverse () const |
| glm::tmat4x4< T, P > | GetTranslationRotationMatrix () const |
| glm::tvec3< T, P > | GetUp () const |
| glm::tvec3< T, P > | GetDown () const |
| glm::tvec3< T, P > | GetLeft () const |
| glm::tvec3< T, P > | GetRight () const |
| glm::tvec3< T, P > | GetFront () const |
| glm::tvec3< T, P > | GetBack () const |
Protected Attributes | |
| glm::tmat3x3< T, P > | mR |
| glm::tvec3< T, P > | mT |
| glm::tvec3< T, P > | mS |
Friends | |
| std::ostream & | operator<< (std::ostream &os, TRSTransform< T, P > &v) |
| std::istream & | operator>> (std::istream &is, TRSTransform< T, P > &v) |
A TRS-transform M is composed of rotation, translation and scale. We define M as:
M = T * R * S
Transformations can be used hierarchically. This means that every transformable child node will inherit the transformations of its parent. Let's say for instance, that there are two nodes A and B. A is the parent of B and both are transformable. The local transformation of A is denoted Ma and for B its Ma. The matrix that brings nodes A and B to world space is denoted Wa and Wa. The resulting transformations for the nodes will then be:
Ma = Ta * Ra * Sa Mb = Tb * Rb * Sb
Wa = Ma = Ta * Ra * Sa Wb = Ma * Mb = (Ta * Ra * Sa) * (Ta * Rb * Sb)
The MB matrix will then, in turn, be recursively be applied to any children of node B to construct new model->world matrices, in the same manner as in the example above.
| TRSTransform< T, P >::TRSTransform |
| TRSTransform< T, P >::~TRSTransform |
| glm::tvec3< T, P > TRSTransform< T, P >::GetBack |
| glm::tvec3< T, P > TRSTransform< T, P >::GetDown |
| glm::tvec3< T, P > TRSTransform< T, P >::GetFront |
| glm::tvec3< T, P > TRSTransform< T, P >::GetLeft |
| glm::tmat4x4< T, P > TRSTransform< T, P >::GetMatrix |
| glm::tmat4x4< T, P > TRSTransform< T, P >::GetMatrixInverse |
| glm::tvec3< T, P > TRSTransform< T, P >::GetRight |
| glm::tmat3x3< T, P > TRSTransform< T, P >::GetRotation |
| glm::tmat4x4< T, P > TRSTransform< T, P >::GetRotationMatrix |
| glm::tmat4x4< T, P > TRSTransform< T, P >::GetRotationMatrixInverse |
| glm::tvec3< T, P > TRSTransform< T, P >::GetScale |
| glm::tmat4x4< T, P > TRSTransform< T, P >::GetScaleMatrix |
| glm::tmat4x4< T, P > TRSTransform< T, P >::GetScaleMatrixInverse |
| glm::tvec3< T, P > TRSTransform< T, P >::GetTranslation |
| glm::tmat4x4< T, P > TRSTransform< T, P >::GetTranslationMatrix |
| glm::tmat4x4< T, P > TRSTransform< T, P >::GetTranslationMatrixInverse |
| glm::tmat4x4< T, P > TRSTransform< T, P >::GetTranslationRotationMatrix |
| glm::tvec3< T, P > TRSTransform< T, P >::GetUp |
| void TRSTransform< T, P >::LookAt | ( | glm::tvec3< T, P > | point | ) |
| void TRSTransform< T, P >::LookAt | ( | glm::tvec3< T, P > | point, |
| glm::tvec3< T, P > | up_vec | ||
| ) |
| void TRSTransform< T, P >::LookTowards | ( | glm::tvec3< T, P > | front_vec | ) |
| void TRSTransform< T, P >::LookTowards | ( | glm::tvec3< T, P > | front_vec, |
| glm::tvec3< T, P > | up_vec | ||
| ) |
| void TRSTransform< T, P >::PreRotate | ( | T | angle, |
| glm::tvec3< T, P > | v | ||
| ) |
| void TRSTransform< T, P >::PreRotateX | ( | T | angle | ) |
| void TRSTransform< T, P >::PreRotateY | ( | T | angle | ) |
| void TRSTransform< T, P >::PreRotateZ | ( | T | angle | ) |
| void TRSTransform< T, P >::ResetTransform |
| void TRSTransform< T, P >::Rotate | ( | T | angle, |
| glm::tvec3< T, P > | v | ||
| ) |
| void TRSTransform< T, P >::RotateX | ( | T | angle | ) |
| void TRSTransform< T, P >::RotateY | ( | T | angle | ) |
| void TRSTransform< T, P >::RotateZ | ( | T | angle | ) |
| void TRSTransform< T, P >::Scale | ( | glm::tvec3< T, P > | v | ) |
| void TRSTransform< T, P >::Scale | ( | T | uniform | ) |
| void TRSTransform< T, P >::SetRotate | ( | T | angle, |
| glm::tvec3< T, P > | v | ||
| ) |
| void TRSTransform< T, P >::SetRotateX | ( | T | angle | ) |
| void TRSTransform< T, P >::SetRotateY | ( | T | angle | ) |
| void TRSTransform< T, P >::SetRotateZ | ( | T | angle | ) |
| void TRSTransform< T, P >::SetScale | ( | glm::tvec3< T, P > | v | ) |
| void TRSTransform< T, P >::SetScale | ( | T | uniform | ) |
| void TRSTransform< T, P >::SetTranslate | ( | glm::tvec3< T, P > | v | ) |
| void TRSTransform< T, P >::Translate | ( | glm::tvec3< T, P > | v | ) |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
1.8.18