Transformable Class Reference
Represents a Shape which is defined in its own local "object space" and knows how to transform itself into the global "world space". More...
#include <Transformable.h>

Public Member Functions | |
Constructors | |
| Transformable (const Matrix4x4 &transToWorld, const Matrix4x4 &transToWorldInv, Material *material=NULL) | |
| Transformable (const Matrix4x4 &transToWorld, Material *material=NULL) | |
| Transformable (Material *material=NULL) | |
| virtual | ~Transformable () |
Initialization | |
| virtual void | init () |
| Initializes this Transformable's world-space AABB, assuming a derived class has already filled in m_objSpaceAABB. | |
Main usage interface | |
| virtual void | preview () |
Sampling functionality | |
| virtual Point3 | getPosition (const UV &uv) |
Accessors / Mutators | |
| const Matrix4x4 & | getTransToWorld () const |
| void | setTransToWorld (const Matrix4x4 &transToWorld) |
| const Matrix4x4 & | getTransToWorldInv () const |
| void | setTransToWorldInv (const Matrix4x4 &transToWorldInv) |
| const AABB & | getObjSpaceAABB () const |
| virtual bool | isTransformable () const |
Protected Member Functions | |
| void | _transformRayWorldToObj (const Ray &ray, Point3 &p, Vector3 &d) const |
| void | _transformPoint3WorldToObj (const Point3 &pWorld, Point3 &pObj) const |
| void | _transformVector3WorldToObj (const Vector3 &vWorld, Vector3 &vObj) const |
| void | _transformVector3ObjToWorld (const Vector3 &nObj, Vector3 &nWorld) const |
Protected Attributes | |
| Matrix4x4 | m_transToWorld |
| Matrix4x4 | m_transToWorldInv |
| AABB | m_objSpaceAABB |
Detailed Description
Represents a Shape which is defined in its own local "object space" and knows how to transform itself into the global "world space".
- Date:
- Fall 2008
Definition at line 18 of file Transformable.h.
Constructor & Destructor Documentation
| Transformable::Transformable | ( | const Matrix4x4 & | transToWorld, | |
| const Matrix4x4 & | transToWorldInv, | |||
| Material * | material = NULL | |||
| ) | [inline] |
Definition at line 23 of file Transformable.h.
| Transformable::Transformable | ( | const Matrix4x4 & | transToWorld, | |
| Material * | material = NULL | |||
| ) | [inline] |
Definition at line 31 of file Transformable.h.
| Transformable::Transformable | ( | Material * | material = NULL |
) | [inline] |
Definition at line 38 of file Transformable.h.
| virtual Transformable::~Transformable | ( | ) | [inline, virtual] |
Definition at line 44 of file Transformable.h.
Member Function Documentation
| void Transformable::init | ( | ) | [virtual] |
Initializes this Transformable's world-space AABB, assuming a derived class has already filled in m_objSpaceAABB.
Reimplemented from Shape.
Reimplemented in Blob, Implicit, InstancedShape, Mesh, Plane, PointShape, ShapeSet, and Triangle.
Definition at line 28 of file Transformable.cpp.
| void Transformable::preview | ( | ) | [virtual] |
Display a crude OpenGL preview of this shape
- Note:
- Default implementation sets the ModelView matrix appropriately with respect to this Transformable's transformation
Reimplemented from Shape.
Reimplemented in Blob, Cone, Cube, Cylinder, InstancedShape, Mesh, Plane, PointShape, ShapeSet, Sphere, and Triangle.
Definition at line 15 of file Transformable.cpp.
- Note:
- implementation returns the origin of this shape in world space because not all shapes support this functionality
Reimplemented from Shape.
Reimplemented in InstancedShape, Mesh, Plane, Sphere, and Triangle.
Definition at line 24 of file Transformable.cpp.
| const Matrix4x4& Transformable::getTransToWorld | ( | ) | const [inline] |
Definition at line 89 of file Transformable.h.
| void Transformable::setTransToWorld | ( | const Matrix4x4 & | transToWorld | ) | [inline] |
Definition at line 93 of file Transformable.h.
| const Matrix4x4& Transformable::getTransToWorldInv | ( | ) | const [inline] |
Definition at line 98 of file Transformable.h.
| void Transformable::setTransToWorldInv | ( | const Matrix4x4 & | transToWorldInv | ) | [inline] |
Definition at line 102 of file Transformable.h.
| const AABB& Transformable::getObjSpaceAABB | ( | ) | const [inline] |
Definition at line 106 of file Transformable.h.
| virtual bool Transformable::isTransformable | ( | ) | const [inline, virtual] |
- Returns:
- true iff this Shape subclasses Transformable
Reimplemented from Shape.
Definition at line 113 of file Transformable.h.
| void Transformable::_transformRayWorldToObj | ( | const Ray & | ray, | |
| Point3 & | p, | |||
| Vector3 & | d | |||
| ) | const [inline, protected] |
Definition at line 17 of file Transformable.inl.
| void Transformable::_transformPoint3WorldToObj | ( | const Point3 & | pWorld, | |
| Point3 & | pObj | |||
| ) | const [inline, protected] |
Definition at line 24 of file Transformable.inl.
| void Transformable::_transformVector3WorldToObj | ( | const Vector3 & | vWorld, | |
| Vector3 & | vObj | |||
| ) | const [inline, protected] |
Definition at line 30 of file Transformable.inl.
| void Transformable::_transformVector3ObjToWorld | ( | const Vector3 & | nObj, | |
| Vector3 & | nWorld | |||
| ) | const [inline, protected] |
Definition at line 36 of file Transformable.inl.
Member Data Documentation
Matrix4x4 Transformable::m_transToWorld [protected] |
Definition at line 134 of file Transformable.h.
Matrix4x4 Transformable::m_transToWorldInv [protected] |
Definition at line 135 of file Transformable.h.
AABB Transformable::m_objSpaceAABB [protected] |
Definition at line 137 of file Transformable.h.
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6