Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

SRTNode Class Reference

#include <node.h>

Inheritance diagram for SRTNode:

Inheritance graph
[legend]
Collaboration diagram for SRTNode:

Collaboration graph
[legend]
List of all members.

Detailed Description

Base class for hierarchy objects A SRT node contains data for scaling, rotation and translation, and core methods for modification and queries. Derived classes can implement hierarchies by overloading the SetScaling, SetRotation and SetTranslation methods and calculate world cache data.

Author:
Mattias Jansson (mattias@realityrift.com)


Public Member Functions

 SRTNode ()
 SRTNode (float fScaling, const Quaternion &rkRotation, const Vector3d &rkTranslation)
 SRTNode (const SRTNode &rkNode)
const Vector3dGetTranslation () const
const QuaternionGetRotation () const
float GetScaling () const
void Translate (const Vector3d &rkTranslation, bool bNotifyUpdate=true)
void TranslateWorld (const Vector3d &rkTranslation, bool bNotifyUpdate=true)
void Rotate (const Quaternion &rkRotation, bool bNotifyUpdate=true)
void RotateWorld (const Quaternion &rkRotation, bool bNotifyUpdate=true)
void Scale (float fScaling, bool bNotifyUpdate=true)
virtual void SetTranslation (const Vector3d &rkTranslation, bool bNotifyUpdate=true)
virtual void SetRotation (const Quaternion &rkRotation, bool bNotifyUpdate=true)
virtual void SetScaling (float fScaling, bool bNotifyUpdate=true)

Protected Attributes

float m_fScaling
Quaternion m_kRotation
Vector3d m_kTranslation


Constructor & Destructor Documentation

SRTNode  )  [inline]
 

SRTNode float  fScaling,
const Quaternion rkRotation,
const Vector3d rkTranslation
[inline]
 

Parameters:
fScaling Scaling
rkRotation Rotation
rkTranslation Translation

SRTNode const SRTNode rkNode  )  [inline]
 

Parameters:
rkNode Reference node objec to copy data from


Member Function Documentation

const Vector3d& GetTranslation  )  const [inline]
 

Returns:
Translation of this node

const Quaternion& GetRotation  )  const [inline]
 

Returns:
Rotation of this node

float GetScaling  )  const [inline]
 

Returns:
Uniform scaling factor

void Translate const Vector3d rkTranslation,
bool  bNotifyUpdate = true
[inline]
 

Translate node from current position, in local (along current rotated axes) coordinate system. Will call SetTranslation() for setting new translation of node, derived classes do not need to overload this method directly. Not affected by current scaling.

Parameters:
rkTranslation Translation offset vector
bNotifyUpdate Used by derived classes to indicate if to set update flag to child tree (true default, use false with caution)

void TranslateWorld const Vector3d rkTranslation,
bool  bNotifyUpdate = true
[inline]
 

Translate node from current position, in world (along unrotated axes) coordinate system. Will call SetTranslation() for setting new translation of node, derived classes do not need to overload this method directly. Not affected by current scaling.

Parameters:
rkTranslation Translation offset vector
bNotifyUpdate Used by derived classes to indicate if to set update flag to child tree (true default, use false with caution)

void Rotate const Quaternion rkRotation,
bool  bNotifyUpdate = true
[inline]
 

Rotate node in local (current rotation) coordinate system. Will call SetRotation() for setting new rotation of node, derived classes do not need to overload this method directly. Not affected by current scaling.

Parameters:
rkRotation Rotation quaternion
bNotifyUpdate Used by derived classes to indicate if to set update flag to child tree (true default, use false with caution)

void RotateWorld const Quaternion rkRotation,
bool  bNotifyUpdate = true
[inline]
 

Rotate node in world (unrotated) coordinate system. Will call SetRotation() for setting new rotation of node, derived classes do not need to overload this method directly. Not affected by current scaling.

Parameters:
rkRotation Rotation quaternion
bNotifyUpdate Used by derived classes to indicate if to set update flag to child tree (true default, use false with caution)

void Scale float  fScaling,
bool  bNotifyUpdate = true
[inline]
 

Scale node by uniform factor. Will use SetScaling for setting new scaling of node, derived classes do not need to overload this method directly. Must be >0, where a value of 1.0f indicates no scaling

Parameters:
fScaling Uniform scaling factor
bNotifyUpdate Used by derived classes to indicate if to set update flag to child tree (true default, use false with caution)

virtual void SetTranslation const Vector3d rkTranslation,
bool  bNotifyUpdate = true
[inline, virtual]
 

Set translation for node. Derived classes used in hierarchy trees can overload this method and implement caching of world data, or use flag to indicate update needed later.

Parameters:
rkTranslation New translation for node
bNotifyUpdate Used by derived classes to indicate if to set update flag to child tree

Reimplemented in HierarchyNode, HierarchyNode< Bone >, and HierarchyNode< SceneNode >.

virtual void SetRotation const Quaternion rkRotation,
bool  bNotifyUpdate = true
[inline, virtual]
 

Set rotation for node. Derived classes used in hierarchy trees can overload this method and implement caching of world data, or use flag to indicate update needed later.

Parameters:
rkRotation New rotation for node
bNotifyUpdate Used by derived classes to indicate if to set update flag to child tree (true default, use false with caution)

Reimplemented in AABB, HierarchyNode, HierarchyNode< Bone >, and HierarchyNode< SceneNode >.

virtual void SetScaling float  fScaling,
bool  bNotifyUpdate = true
[inline, virtual]
 

Set uniform scaling for node. Derived classes used in hierarchy trees can overload this method and implement caching of world data, or use flag to indicate update needed later. A value of 1.0f indicates no scaling.

Parameters:
fScaling New uniform scaling factor
bNotifyUpdate Used by derived classes to indicate if to set update flag to child tree (true default, use false with caution)

Reimplemented in HierarchyNode, HierarchyNode< Bone >, and HierarchyNode< SceneNode >.


Member Data Documentation

float m_fScaling [protected]
 

Uniform scaling factor (must be >0, default 1)

Quaternion m_kRotation [protected]
 

Rotation

Vector3d m_kTranslation [protected]
 

Translation


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:12 2004 for NeoEngine by doxygen 1.3.5