Class hierarchy Compound list File list Compound Members File Members
Transformable Class Reference
A Base class for all 3D World entities having an orientation. More...
Inherited by Mesh.
List of all members.
Public Members
- const Matrix3D& getTransform () const
- Fetches a reference to the transformation matrix.
- void setPosition (const Vector3D& v)
- sets _41, _42 and _43 to v.x, v.y, v.z respectively.
- Vector3D getPosition () const
- returns _41, _42, and _43 as a Vector3D.
- void setDirection (const Vector3D& dir, const Vector3D& up)
- sets the orientation portion of the matrix such that forward() will move toward dir and that the up vector points toward up.
- Vector3D getDirection (const float Size=1.0f) const
- fetch the forward direction of the orientation as a vector scaled by Size.
- Vector3D getDirectionUp (const float Size=1.0f) const
- fetch the up direction of the orientation scaled by Size.
- Vector3D getDirectionRight (const float Size=1.0f) const
- fetch the "right" direction of the orientation as a vector scaled by Size.
- void forward (const float d)
- relocate the position d units along the forward vector.
- void relocate (const Vector3D& v)
- translate the position by v.
- void rotate (const Vector3D& v)
- rotate the matrix by the euler angles given in v.
- void scale (const float s)
- scale the matrix by s.
- float getScale () const
- retrieve m_Scale.
- void align (const Transformable* t)
- align this matrix with the matrix within t.
Detailed Description
A Base class for all 3D World entities having an orientation.
Member Function Documentation
const Matrix3D& Transformable::getTransform() const
Fetches a reference to the transformation matrix.
void Transformable::setPosition(const Vector3D& v)
sets _41, _42 and _43 to v.x, v.y, v.z respectively.
Vector3D Transformable::getPosition() const
returns _41, _42, and _43 as a Vector3D.
void Transformable::setDirection(const Vector3D& dir, const Vector3D& up)
sets the orientation portion of the matrix such that forward() will move toward dir and that the up vector points toward up.
Neither dir nor up must be normalized.
Vector3D Transformable::getDirection(const float Size=1.0f) const
fetch the forward direction of the orientation as a vector scaled by Size.
Vector3D Transformable::getDirectionUp(const float Size=1.0f) const
fetch the up direction of the orientation scaled by Size.
Vector3D Transformable::getDirectionRight(const float Size=1.0f) const
fetch the "right" direction of the orientation as a vector scaled by Size.
void Transformable::forward(const float d)
relocate the position d units along the forward vector.
void Transformable::relocate(const Vector3D& v)
translate the position by v.
void Transformable::rotate(const Vector3D& v)
rotate the matrix by the euler angles given in v.
void Transformable::scale(const float s)
float Transformable::getScale() const
void Transformable::align(const Transformable* t)
align this matrix with the matrix within t.
(simply assigns t.m to this->m).
The documentation for this class was generated from the following file: