Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
#include <Transform.hpp>

Public Member Functions | |
| virtual const char * | className () |
| Returns the name of the class. | |
| Transform () | |
| Transform (const mat4 &matrix) | |
| virtual | ~Transform () |
| void | addChild (Transform *child) |
| void | setChild (int index, Transform *child) |
| int | childCount () const |
| Transform * | child (int i) |
| Transform * | lastChild () |
| void | eraseChild (Transform *child) |
| void | eraseChildren (int index, int count) |
| void | eraseAllChildren () |
| void | eraseAllChildrenRecursive () |
| const Transform * | parent () const |
| Transform * | parent () |
| mat4 | getComputedWorldMatrix () |
| Returns the matrix computed concatenating this transform's matrix with its parents'. | |
| void | setLocalMatrix (const mat4 &matrix) |
| Sets the local matrix. After calling this you might want to call computeWorldMatrix() or computeWorldMatrixRecursive(). | |
| const mat4 & | localMatrix () const |
| Returns the local matrix. | |
| void | translate (Real x, Real y, Real z) |
Utility function equivalent to setLocalMatrix( mat4::translation(x,y,z)*localMatrix() ). | |
| void | translate (const vec3 &t) |
Utility function equivalent to setLocalMatrix( mat4::translation(t)*localMatrix() ). | |
| void | scale (Real x, Real y, Real z) |
Utility function equivalent to setLocalMatrix( mat4::scaling(x,y,z)*localMatrix() ). | |
| void | rotate (Real degrees, Real x, Real y, Real z) |
Utility function equivalent to setLocalMatrix( mat4::rotation(degrees,x,y,z)*localMatrix() ). | |
| void | rotate (const vec3 &from, const vec3 &to) |
Utility function equivalent to setLocalMatrix( mat4::rotation(from,to)*localMatrix() ). | |
| virtual void | computeWorldMatrix (Camera *camera=NULL) |
| void | computeWorldMatrixRecursive (Camera *camera=NULL) |
| const mat4 & | worldMatrix () const |
| long long | worldMatrixUpdateTick () const |
| void | setAlwaysIdentityWorldMatrix (bool assume_I) |
| If set to true the world matrix of this transform will always be considered and identity. | |
| bool | alwaysIdentityWorldMatrix () |
| If set to true the world matrix of this transform will always be considered and identity. | |
Protected Member Functions | |
| void | setWorldMatrix (const mat4 &matrix) |
Protected Attributes | |
| mat4 | mWorldMatrix |
| mat4 | mLocalMatrix |
| std::vector< ref< Transform > > | mChildren |
| Transform * | mParent |
| long long | mWorldMatrixUpdateTick |
| bool | mAssumeIdentityWorldMatrix |
Transforms can be linked together to create a tree-like hierarchy.
| vl::Transform::Transform | ( | ) | [inline] |
| vl::Transform::Transform | ( | const mat4 & | matrix | ) | [inline] |
| Transform::~Transform | ( | ) | [virtual] |
| virtual const char* vl::Transform::className | ( | ) | [inline, virtual] |
| void Transform::addChild | ( | Transform * | child | ) |
| void Transform::setChild | ( | int | index, | |
| Transform * | child | |||
| ) |
| int Transform::childCount | ( | ) | const |
| Transform * Transform::child | ( | int | i | ) |
| Transform * Transform::lastChild | ( | ) |
| void Transform::eraseChild | ( | Transform * | child | ) |
| void Transform::eraseChildren | ( | int | index, | |
| int | count | |||
| ) |
| void Transform::eraseAllChildren | ( | ) |
| void Transform::eraseAllChildrenRecursive | ( | ) |
| const Transform* vl::Transform::parent | ( | ) | const [inline] |
| Transform* vl::Transform::parent | ( | ) | [inline] |
| mat4 Transform::getComputedWorldMatrix | ( | ) |
Returns the matrix computed concatenating this transform's matrix with its parents'.
| void Transform::setLocalMatrix | ( | const mat4 & | matrix | ) |
Sets the local matrix. After calling this you might want to call computeWorldMatrix() or computeWorldMatrixRecursive().
| const mat4 & Transform::localMatrix | ( | ) | const |
Returns the local matrix.
Utility function equivalent to setLocalMatrix( mat4::translation(x,y,z)*localMatrix() ).
| void Transform::translate | ( | const vec3 & | t | ) |
Utility function equivalent to setLocalMatrix( mat4::translation(t)*localMatrix() ).
Utility function equivalent to setLocalMatrix( mat4::scaling(x,y,z)*localMatrix() ).
Utility function equivalent to setLocalMatrix( mat4::rotation(degrees,x,y,z)*localMatrix() ).
Utility function equivalent to setLocalMatrix( mat4::rotation(from,to)*localMatrix() ).
| void Transform::computeWorldMatrix | ( | Camera * | camera = NULL |
) | [virtual] |
Reimplemented in vl::Billboard.
| void Transform::computeWorldMatrixRecursive | ( | Camera * | camera = NULL |
) |
| const mat4 & Transform::worldMatrix | ( | ) | const |
| long long vl::Transform::worldMatrixUpdateTick | ( | ) | const [inline] |
| void vl::Transform::setAlwaysIdentityWorldMatrix | ( | bool | assume_I | ) | [inline] |
If set to true the world matrix of this transform will always be considered and identity.
Is usually used to save calculations for top Transforms with many sub-Transforms.
| bool vl::Transform::alwaysIdentityWorldMatrix | ( | ) | [inline] |
If set to true the world matrix of this transform will always be considered and identity.
Is usually used to save calculations for top Transforms with many sub-Transforms.
| void Transform::setWorldMatrix | ( | const mat4 & | matrix | ) | [protected] |
mat4 vl::Transform::mWorldMatrix [protected] |
mat4 vl::Transform::mLocalMatrix [protected] |
std::vector< ref<Transform> > vl::Transform::mChildren [protected] |
Transform* vl::Transform::mParent [protected] |
long long vl::Transform::mWorldMatrixUpdateTick [protected] |
bool vl::Transform::mAssumeIdentityWorldMatrix [protected] |