Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Friends

Transform Class Reference

Inheritance diagram for Transform:
Object

List of all members.

Public Types

typedef std::vector< Transform * >
::const_iterator 
ChildrenIterator

Public Member Functions

virtual const RTTIgetType () const
 Transform (Vec3f const &pos)
 Transform (const Transform &transform)
void setGameObject (GameObject *object)
GameObjectgetGameObject () const
void addChild (Transform *child)
void attachChild (Transform *child)
void removeChild (Transform *child)
void removeChild (int index)
ChildrenIterator getChildrenIteratorBegin () const
ChildrenIterator getChildrenIteratorEnd () const
int getChildCount () const
TransformgetChild (int index)
int getChildIndex (Transform *child) const
TransformgetParent ()
void setParent (Transform *par)
void setPosition (const Vec3f &pos)
void setWorldPosition (const Vec3f &pos)
void setScale (const Vec3f &scal)
void setWorldScale (const Vec3f &scal)
void setRotation (const Vec3f &rot)
void translate (float x, float y, float z)
void translate (const Vec3f &translation)
void scale (float x, float y, float z)
void scale (const Vec3f &scaling)
void rotate (float rx, float ry, float rz, SpaceOfReferenceEnum reference=PARENT)
void rotate (const Vec3f &euler_angles, SpaceOfReferenceEnum reference=PARENT)
void rotate (const Vec3f &axis, float angle)
void lookAt (const Vec3f &targetPoint)
Vec3f getPosition () const
Vec3f getWorldPosition () const
Vec3f getScale () const
Vec3f getWorldScale () const
Vec3f getRotation () const
Vec3f getForward () const
Vec3f getUp () const
Vec3f getRight () const
Mat3x3f getRotationMatrix () const
Mat3x3f getWorldRotationMatrix () const
Mat4x4f getTransformMatrix () const
Mat4x4f getInverseTransformMatrix () const
Mat4x4f getWorldTransformMatrix () const
Mat4x4f getWorldInverseTransformMatrix () const
Mat4x4f getWorldViewMatrix () const
Mat4x4f getWorldInverseViewMatrix () const
void applyTransform () const
void applyWorldTransform () const
void applyViewTransform () const
void applyWorldViewTransform () const
void _updateWorldPosition ()
void _updateTransformMatrix ()
void _updateWorldTransformMatrix ()
void _updateWorldRotationMatrix ()

Static Public Attributes

static const RTTI TYPE

Protected Attributes

GameObjectgameObject
Transformparent
std::vector< Transform * > children
Vec3f position
Vec3f worldPosition
Vec3f scaling
Vec3f worldScaling
Vec3f eulerAngles
Vec3f worldEulerAngles
Mat3x3f rotationMatrix
Mat3x3f worldRotationMatrix
Mat4x4f transformMatrix
Mat4x4f worldTransformMatrix
bool _hasMoved

Friends

class boost::serialization::access

Member Function Documentation

void Transform::_updateTransformMatrix (  ) 

Called internally, updates and caches the local transform matrix from position rotation and scaling, calls _updateWorldPosition()

void Transform::_updateWorldPosition (  ) 

Called internally, updates and caches the world position given the one of the parent, propagates to childrens

void Transform::_updateWorldRotationMatrix (  ) 

Called internally, updates and caches the worl rotation matrix (R) from the parent, propagates to childrens

void Transform::_updateWorldTransformMatrix (  ) 

Called internally, updates and caches the worl transform (SRT) matrix from the parent, propagates to childrens

Vec3f Transform::getForward (  )  const

Returns the forward vector of the frame in world space

Mat4x4f Transform::getInverseTransformMatrix (  )  const

Returns the inverse of the transform matrix (used?) not taking into account the scaling

Vec3f Transform::getRight (  )  const

Returns the right vector of the frame in world space

Vec3f Transform::getUp (  )  const

Returns the up vector of the frame in world space

void Transform::lookAt ( const Vec3f &  targetPoint  ) 

Sets the orientation of the transform so that it points to targetPoint with up vector being z world

void Transform::rotate ( float  rx,
float  ry,
float  rz,
SpaceOfReferenceEnum  reference = PARENT 
)

set the rotation of the transform, bad interface since rot are done xyz

void Transform::rotate ( const Vec3f &  euler_angles,
SpaceOfReferenceEnum  reference = PARENT 
)

set the rotation of the transform, bad interface since rot are done xyz

void Transform::rotate ( const Vec3f &  axis,
float  angle 
)

Rotates the transform around an arbitrary axe in world space

void Transform::setPosition ( const Vec3f &  pos  ) 

Unused, unmaintained

void Transform::setRotation ( const Vec3f &  rot  ) 

Unused, unmaintained

void Transform::setScale ( const Vec3f &  scal  ) 

Unused, unmaintained

void Transform::setWorldPosition ( const Vec3f &  pos  ) 

Unused, unimplemented

void Transform::setWorldScale ( const Vec3f &  scal  ) 

Unused, unimplemented


The documentation for this class was generated from the following files:
 All Classes Functions Variables