Om
1.0.0
A universal framework for multimedia simulation
|
A base class for objects that have a 3D transformation from object to world space. More...
#include <omGraphicsTransformable.h>
Public Member Functions | |
Transformable () | |
Create a new transformable with the identity transformation. More... | |
Transformable (const Transform3 &newTransform) | |
Create a new transformable with the specified transformation. More... | |
virtual | ~Transformable () |
Destroy this transformable, releasing all associated resources. More... | |
const Vector3 & | getPosition () const |
Return the position of this transformable. More... | |
void | setPosition (const Vector3 &newPosition) |
Set the position of this transformable. More... | |
const Matrix3 & | getOrientation () const |
Return the orientation of this transformable. More... | |
void | setOrientation (const Matrix3 &newOrientation) |
Set the orientation of this transformable. More... | |
const Vector3 & | getScale () const |
Get the scale of the transformable. More... | |
void | setScale (Real newScale) |
Set the scale of the transformable uniformly for all dimensions. More... | |
void | setScale (const Vector3 &newScale) |
Set the scale of the transformable. More... | |
const Transform3 & | getTransform () const |
Return the transformation for this transformable between its local and parent coordinate frame. More... | |
void | setTransform (const Transform3 &newTransform) |
Set the transformation for this transformable between its local and parent coordinate frame. More... | |
Matrix4 | getTransformMatrix () const |
Return a 4x4 matrix representing the transformation from object to world space. More... | |
Matrix4 | getTransformMatrixInverse () const |
Return a 4x4 matrix which transforms points from world space to object space. More... | |
Sphere3 | getBoundingSphere () const |
Return a bounding sphere for this transformable in its parent coordinate space. More... | |
Sphere3 | getLocalBoundingSphere () const |
Return a bounding sphere for this transformable in its local coordinate space. More... | |
const AABB3 & | getBoundingBox () const |
Return an axis-aligned bounding box that encompases this entire transformable in its parent coordinate space. More... | |
const AABB3 & | getLocalBoundingBox () const |
Return an axis-aligned bounding box that encompases this entire transformable in its local coordinate space. More... | |
virtual void | updateBoundingBox () |
Update the transformable's bounding box based on its current geometric representation. More... | |
Protected Member Functions | |
void | setLocalBoundingBox (const AABB3 &newLocalBoundingBox) |
Set the local axis-aligned bounding box for this shape. More... | |
Protected Attributes | |
Transform3 | transform |
The transformation for this transformable between its local and parent coordinate frame. More... | |
A base class for objects that have a 3D transformation from object to world space.
This is the base class for other types that have a transformation, such as objects, shapes, and cameras. It gives them a common interface for graphics systems like animation.
om::graphics::base::Transformable::Transformable | ( | ) |
Create a new transformable with the identity transformation.
om::graphics::base::Transformable::Transformable | ( | const Transform3 & | newTransform | ) |
Create a new transformable with the specified transformation.
|
virtual |
Destroy this transformable, releasing all associated resources.
|
inline |
Return the position of this transformable.
This position is specifid relative to the origin of the enclosing coordinate space.
|
inline |
Set the position of this transformable.
This position is specifid relative to the origin of the enclosing coordinate space.
|
inline |
Return the orientation of this transformable.
void om::graphics::base::Transformable::setOrientation | ( | const Matrix3 & | newOrientation | ) |
Set the orientation of this transformable.
|
inline |
Get the scale of the transformable.
|
inline |
Set the scale of the transformable uniformly for all dimensions.
|
inline |
Set the scale of the transformable.
|
inline |
Return the transformation for this transformable between its local and parent coordinate frame.
void om::graphics::base::Transformable::setTransform | ( | const Transform3 & | newTransform | ) |
Set the transformation for this transformable between its local and parent coordinate frame.
This method ensures that the transformable's new orientation matrix is orthonormal.
Matrix4 om::graphics::base::Transformable::getTransformMatrix | ( | ) | const |
Return a 4x4 matrix representing the transformation from object to world space.
Matrix4 om::graphics::base::Transformable::getTransformMatrixInverse | ( | ) | const |
Return a 4x4 matrix which transforms points from world space to object space.
|
inline |
Return a bounding sphere for this transformable in its parent coordinate space.
|
inline |
Return a bounding sphere for this transformable in its local coordinate space.
|
inline |
Return an axis-aligned bounding box that encompases this entire transformable in its parent coordinate space.
|
inline |
Return an axis-aligned bounding box that encompases this entire transformable in its local coordinate space.
|
virtual |
Update the transformable's bounding box based on its current geometric representation.
Reimplemented in om::graphics::scenes::GraphicsObject.
|
inlineprotected |
Set the local axis-aligned bounding box for this shape.
Shape subclasses should call this method to set the bounding box of their geometry in their local coordinate frames (before applying the shape's own transformation).
|
protected |
The transformation for this transformable between its local and parent coordinate frame.