Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

oxygen::Transform Class Reference

Transform is used to do local transforms relative to a parent node. More...

#include <transform.h>

Inheritance diagram for oxygen::Transform:

Inheritance graph
[legend]
Collaboration diagram for oxygen::Transform:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Transform ()
virtual ~Transform ()
const salt::MatrixGetOldLocalTransform () const
 returns the old local transform of this node
virtual const salt::MatrixGetLocalTransform () const
 returns the local transform of this node
virtual const salt::MatrixGetWorldTransform () const
 returns the world transform of this node
virtual void SetLocalTransform (const salt::Matrix &transform)
 sets the local transform of this node
virtual void SetWorldTransform (const salt::Matrix &transform)
 sets the world transform of this node
void SetLocalPos (const salt::Vector3f &pos)
 sets the local position of this node
void SetLocalRotation (const salt::Vector3f &rot)
 sets the local rotation of this node in degrees
int GetChangedMark () const
 returns the current transform mark

Protected Member Functions

virtual void OnLink ()
 upon linkage, we have to update our world transform

Private Member Functions

virtual void UpdateHierarchyInternal ()
 updates hierarchical date (position, bounding volumes, etc.

Private Attributes

salt::Matrix mLocalTransform
 local transformation relative to parent
salt::Matrix mWorldTransform
 world transform generated by multiplying the parent's world transform with the local transform
int mChangedMark
 Transform mark from the SceneServer; this value is updated with the the current value if the local transform matrix is modified.
salt::Matrix mOldLocalTransform
 the previous transformation relative to the parent

Detailed Description

Transform is used to do local transforms relative to a parent node.

Definition at line 44 of file transform.h.


Constructor & Destructor Documentation

Transform::Transform  ) 
 

Definition at line 31 of file transform.cpp.

References salt::Matrix::Identity(), mChangedMark, mLocalTransform, mOldLocalTransform, mWorldTransform, and zeitgeist::Leaf::SetName().

Here is the call graph for this function:

Transform::~Transform  )  [virtual]
 

Definition at line 42 of file transform.cpp.


Member Function Documentation

int Transform::GetChangedMark  )  const
 

returns the current transform mark

Definition at line 46 of file transform.cpp.

References mChangedMark.

const salt::Matrix & Transform::GetLocalTransform  )  const [virtual]
 

returns the local transform of this node

Reimplemented from oxygen::BaseNode.

Definition at line 51 of file transform.cpp.

References mLocalTransform.

const salt::Matrix & Transform::GetOldLocalTransform  )  const
 

returns the old local transform of this node

Definition at line 56 of file transform.cpp.

References mOldLocalTransform.

const salt::Matrix & Transform::GetWorldTransform  )  const [virtual]
 

returns the world transform of this node

Reimplemented from oxygen::BaseNode.

Definition at line 61 of file transform.cpp.

References mWorldTransform.

void Transform::OnLink  )  [protected, virtual]
 

upon linkage, we have to update our world transform

Reimplemented from zeitgeist::Leaf.

Definition at line 114 of file transform.cpp.

References UpdateHierarchyInternal().

Here is the call graph for this function:

void Transform::SetLocalPos const salt::Vector3f pos  ) 
 

sets the local position of this node

Definition at line 91 of file transform.cpp.

References oxygen::SceneServer::GetTransformMark(), mChangedMark, mLocalTransform, mOldLocalTransform, salt::Matrix::Pos(), and UpdateHierarchyInternal().

Here is the call graph for this function:

void Transform::SetLocalRotation const salt::Vector3f rot  ) 
 

sets the local rotation of this node in degrees

Definition at line 100 of file transform.cpp.

References salt::gDegToRad(), oxygen::SceneServer::GetTransformMark(), mChangedMark, mLocalTransform, mOldLocalTransform, salt::Matrix::Pos(), salt::Matrix::RotateY(), salt::Matrix::RotateZ(), salt::Matrix::RotationX(), and UpdateHierarchyInternal().

Here is the call graph for this function:

void Transform::SetLocalTransform const salt::Matrix transform  )  [virtual]
 

sets the local transform of this node

Reimplemented from oxygen::BaseNode.

Definition at line 66 of file transform.cpp.

References oxygen::SceneServer::GetTransformMark(), mChangedMark, mLocalTransform, and mOldLocalTransform.

Here is the call graph for this function:

void Transform::SetWorldTransform const salt::Matrix transform  )  [virtual]
 

sets the world transform of this node

Reimplemented from oxygen::BaseNode.

Definition at line 74 of file transform.cpp.

References oxygen::SceneServer::GetTransformMark(), mChangedMark, oxygen::BaseNode::mIdentityMatrix, mLocalTransform, mOldLocalTransform, and zeitgeist::Leaf::mParent.

Here is the call graph for this function:

void Transform::UpdateHierarchyInternal  )  [private, virtual]
 

updates hierarchical date (position, bounding volumes, etc.

.)

Reimplemented from oxygen::BaseNode.

Definition at line 119 of file transform.cpp.

References mLocalTransform, zeitgeist::Leaf::mParent, and mWorldTransform.

Referenced by OnLink(), SetLocalPos(), and SetLocalRotation().


Member Data Documentation

int oxygen::Transform::mChangedMark [private]
 

Transform mark from the SceneServer; this value is updated with the the current value if the local transform matrix is modified.

Definition at line 97 of file transform.h.

Referenced by GetChangedMark(), SetLocalPos(), SetLocalRotation(), SetLocalTransform(), SetWorldTransform(), and Transform().

salt::Matrix oxygen::Transform::mLocalTransform [private]
 

local transformation relative to parent

Definition at line 89 of file transform.h.

Referenced by GetLocalTransform(), SetLocalPos(), SetLocalRotation(), SetLocalTransform(), SetWorldTransform(), Transform(), and UpdateHierarchyInternal().

salt::Matrix oxygen::Transform::mOldLocalTransform [private]
 

the previous transformation relative to the parent

Definition at line 100 of file transform.h.

Referenced by GetOldLocalTransform(), SetLocalPos(), SetLocalRotation(), SetLocalTransform(), SetWorldTransform(), and Transform().

salt::Matrix oxygen::Transform::mWorldTransform [private]
 

world transform generated by multiplying the parent's world transform with the local transform

Definition at line 92 of file transform.h.

Referenced by GetWorldTransform(), Transform(), and UpdateHierarchyInternal().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:47:20 2006 for rcssserver3d by  doxygen 1.4.4