Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
Abstract interface for a generic transform. More...
#include <Transform.hpp>
Public Member Functions | |
| ITransform () | |
| virtual size_t | childrenCount () const =0 |
| virtual ITransform * | getChildren (size_t i)=0 |
| virtual const ITransform * | getChildren (size_t i) const =0 |
| virtual ITransform * | parent ()=0 |
| virtual const ITransform * | parent () const =0 |
| void | setLocalMatrix (const mat4 &m) |
| The matrix representing the transform's local space. | |
| const mat4 & | localMatrix () const |
| The matrix representing the transform's local space. | |
| virtual void | computeWorldMatrix (Camera *=NULL) |
| Computes the world matrix by concatenating the parent's world matrix with its own local matrix. | |
| void | computeWorldMatrixRecursive (Camera *camera=NULL) |
| Computes the world matrix by concatenating the parent's world matrix with its local matrix, recursively descending to the children. | |
| mat4 | getComputedWorldMatrix () |
| Returns the matrix computed concatenating this Transform's local matrix with the local matrices of all its parents. | |
| const mat4 & | worldMatrix () const |
| Returns the world matrix used for rendering. | |
| void | setWorldMatrix (const mat4 &matrix) |
| Normally you should not use directly this function, call it only if you are sure you cannot do otherwise. | |
| long long | worldMatrixUpdateTick () const |
| Returns the internal update tick used to avoid unnecessary computations. | |
| void | setAssumeIdentityWorldMatrix (bool assume_I) |
| If set to true the world matrix of this transform will always be considered and identity. | |
| bool | assumeIdentityWorldMatrix () |
| If set to true the world matrix of this transform will always be considered and identity. | |
| bool | hasDuplicatedChildren () const |
| Checks whether there are duplicated entries in the Transform's children list. | |
Protected Attributes | |
| mat4 | mLocalMatrix |
| mat4 | mWorldMatrix |
| long long | mWorldMatrixUpdateTick |
| bool | mAssumeIdentityWorldMatrix |
Abstract interface for a generic transform.
Definition at line 56 of file Transform.hpp.
| vl::ITransform::ITransform | ( | ) | [inline] |
Definition at line 59 of file Transform.hpp.
| virtual size_t vl::ITransform::childrenCount | ( | ) | const [pure virtual] |
Implemented in vl::TransformHierarchy< Ttype >, and vl::TransformHierarchy< Transform >.
| virtual ITransform* vl::ITransform::getChildren | ( | size_t | i ) | [pure virtual] |
Implemented in vl::TransformHierarchy< Ttype >, and vl::TransformHierarchy< Transform >.
| virtual const ITransform* vl::ITransform::getChildren | ( | size_t | i ) | const [pure virtual] |
Implemented in vl::TransformHierarchy< Ttype >, and vl::TransformHierarchy< Transform >.
| virtual ITransform* vl::ITransform::parent | ( | ) | [pure virtual] |
Implemented in vl::TransformHierarchy< Ttype >, and vl::TransformHierarchy< Transform >.
| virtual const ITransform* vl::ITransform::parent | ( | ) | const [pure virtual] |
Implemented in vl::TransformHierarchy< Ttype >, and vl::TransformHierarchy< Transform >.
| void vl::ITransform::setLocalMatrix | ( | const mat4 & | m ) | [inline] |
The matrix representing the transform's local space.
After calling this you might want to call computeWorldMatrix() or computeWorldMatrixRecursive().
Definition at line 78 of file Transform.hpp.
Referenced by vl::Transform::rotate(), vl::Transform::scale(), vl::Billboard::setPosition(), and vl::Transform::translate().
| const mat4& vl::ITransform::localMatrix | ( | ) | const [inline] |
The matrix representing the transform's local space.
Definition at line 84 of file Transform.hpp.
Referenced by vl::Billboard::position(), vl::Transform::rotate(), vl::Transform::scale(), and vl::Transform::translate().
| virtual void vl::ITransform::computeWorldMatrix | ( | Camera * | = NULL ) |
[inline, virtual] |
Computes the world matrix by concatenating the parent's world matrix with its own local matrix.
Reimplemented in vl::Billboard.
Definition at line 90 of file Transform.hpp.
Referenced by vl::TrackballManipulator::adjustView().
| void vl::ITransform::computeWorldMatrixRecursive | ( | Camera * | camera = NULL ) |
[inline] |
Computes the world matrix by concatenating the parent's world matrix with its local matrix, recursively descending to the children.
Definition at line 107 of file Transform.hpp.
Referenced by vl::Rendering::render().
| mat4 vl::ITransform::getComputedWorldMatrix | ( | ) | [inline] |
Returns the matrix computed concatenating this Transform's local matrix with the local matrices of all its parents.
Definition at line 115 of file Transform.hpp.
| const mat4& vl::ITransform::worldMatrix | ( | ) | const [inline] |
Returns the world matrix used for rendering.
Definition at line 128 of file Transform.hpp.
Referenced by vl::ClipPlane::apply(), vl::Text::boundingRectTransformed(), vl::Billboard::computeWorldMatrix(), vl::PixelLODEvaluator::evaluate(), vl::DistanceLODEvaluator::evaluate(), vl::RayIntersector::intersectGeometry(), vl::SlicedVolume::onActorRenderStarted(), vl::EdgeUpdateCallback::onActorRenderStarted(), vl::DepthSortCallback::onActorRenderStarted(), vl::DrawPixels::render_Implementation(), vl::EdgeRenderer::renderLines(), vl::EdgeRenderer::renderSolids(), vl::Text::renderText(), vl::RenderQueue::sort(), vl::ProjViewTransfCallback::updateMatrices(), vl::SlicedVolume::updateUniforms(), and vl::RaycastVolume::updateUniforms().
| void vl::ITransform::setWorldMatrix | ( | const mat4 & | matrix ) | [inline] |
Normally you should not use directly this function, call it only if you are sure you cannot do otherwise.
Usually you want to call computeWorldMatrix() or computeWorldMatrixRecursive(). Calling this function will also increment the worldMatrixUpdateTick().
Definition at line 136 of file Transform.hpp.
Referenced by vl::Billboard::computeWorldMatrix().
| long long vl::ITransform::worldMatrixUpdateTick | ( | ) | const [inline] |
Returns the internal update tick used to avoid unnecessary computations.
The world matrix thick gets incremented every time the setWorldMatrix() or setLocalAndWorldMatrix() functions are called.
Definition at line 144 of file Transform.hpp.
Referenced by vl::Actor::boundsDirty(), and vl::Actor::computeBounds().
| void vl::ITransform::setAssumeIdentityWorldMatrix | ( | 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.
Definition at line 148 of file Transform.hpp.
| bool vl::ITransform::assumeIdentityWorldMatrix | ( | ) | [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.
Definition at line 152 of file Transform.hpp.
Referenced by vl::Billboard::computeWorldMatrix().
| bool vl::ITransform::hasDuplicatedChildren | ( | ) | const [inline] |
Checks whether there are duplicated entries in the Transform's children list.
Definition at line 155 of file Transform.hpp.
mat4 vl::ITransform::mLocalMatrix [protected] |
Definition at line 174 of file Transform.hpp.
mat4 vl::ITransform::mWorldMatrix [protected] |
Definition at line 175 of file Transform.hpp.
long long vl::ITransform::mWorldMatrixUpdateTick [protected] |
Definition at line 176 of file Transform.hpp.
bool vl::ITransform::mAssumeIdentityWorldMatrix [protected] |
Definition at line 177 of file Transform.hpp.