omegalib  13.1
omega::Node Class Reference

Class representing a general-purpose node in an articulated scene graph. More...

#include <Node.h>

Public Types

enum  TransformSpace { TransformLocal, TransformParent, TransformWorld }
 Enumeration denoting the spaces which a transform can be relative to. More...
 
typedef Dictionary< String, Ref< Node > > ChildNodeMap
 

Public Member Functions

 Node ()
 Constructor, should only be called by parent, not directly. More...
 
 Node (const String &name)
 Constructor, should only be called by parent, not directly. More...
 
virtual ~Node ()
 
const StringgetName (void) const
 Returns the name of the node. More...
 
virtual NodegetParent (void) const
 Gets this node's parent (NULL if this is the root). More...
 
virtual const QuaterniongetOrientation () const
 Returns a quaternion representing the nodes orientation. More...
 
virtual void setOrientation (const Quaternion &q)
 Sets the orientation of this node via a quaternion. More...
 
virtual void setOrientation (float w, float x, float y, float z)
 Sets the orientation of this node via quaternion parameters. More...
 
virtual void resetOrientation (void)
 Resets the nodes orientation (local axes as world axes, no rotation). More...
 
virtual void setPosition (const Vector3f &pos)
 Sets the position of the node relative to it's parent. More...
 
virtual void setPosition (float x, float y, float z)
 Sets the position of the node relative to it's parent. More...
 
virtual const Vector3fgetPosition (void) const
 Gets the position of the node relative to it's parent. More...
 
virtual void setScale (const Vector3f &scale)
 Sets the scaling factor applied to this node. More...
 
virtual void setScale (float x, float y, float z)
 Sets the scaling factor applied to this node. More...
 
virtual const Vector3fgetScale (void) const
 Gets the scaling factor of this node. More...
 
virtual void setInheritOrientation (bool inherit)
 Tells the node whether it should inherit orientation from it's parent node. More...
 
virtual bool getInheritOrientation (void) const
 Returns true if this node is affected by orientation applied to the parent node. More...
 
virtual void setInheritScale (bool inherit)
 Tells the node whether it should inherit scaling factors from it's parent node. More...
 
virtual bool getInheritScale (void) const
 Returns true if this node is affected by scaling factors applied to the parent node. More...
 
virtual void scale (const Vector3f &scale)
 Scales the node, combining it's current scale with the passed in scaling factor. More...
 
virtual void scale (float x, float y, float z)
 Scales the node, combining it's current scale with the passed in scaling factor. More...
 
virtual void translate (const Vector3f &d, TransformSpace relativeTo=TransformParent)
 Moves the node along the Cartesian axes. More...
 
virtual void translate (float x, float y, float z, TransformSpace relativeTo=TransformParent)
 Moves the node along the Cartesian axes. More...
 
virtual void translate (const Matrix3f &axes, const Vector3f &move, TransformSpace relativeTo=TransformParent)
 Moves the node along arbitrary axes. More...
 
virtual void translate (const Matrix3f &axes, float x, float y, float z, TransformSpace relativeTo=TransformParent)
 Moves the node along arbitrary axes. More...
 
virtual void roll (const float &angle, TransformSpace relativeTo=TransformLocal)
 Rotate the node around the Z-axis. More...
 
void rollDeg (const float &angle, TransformSpace relativeTo=TransformLocal)
 Rotate the node around the Z-axis, The angle is specified in degrees. More...
 
virtual void pitch (const float &angle, TransformSpace relativeTo=TransformLocal)
 Rotate the node around the X-axis. More...
 
virtual void pitchDeg (const float &angle, TransformSpace relativeTo=TransformLocal)
 Rotate the node around the X-axis, The angle is specified in degrees. More...
 
virtual void yaw (const float &angle, TransformSpace relativeTo=TransformLocal)
 Rotate the node around the Y-axis. More...
 
virtual void yawDeg (const float &angle, TransformSpace relativeTo=TransformLocal)
 Rotate the node around the Y-axis, The angle is specified in degrees. More...
 
virtual void rotate (const Vector3f &axis, const float &angle, TransformSpace relativeTo=TransformLocal)
 Rotate the node around an arbitrary axis. More...
 
virtual void rotate (const Quaternion &q, TransformSpace relativeTo=TransformLocal)
 Rotate the node around an aritrary axis using a Quarternion. More...
 
virtual void lookAt (const Vector3f &position, const Vector3f &upVector)
 Rotate the node to make its positive Z axis point toward the specified position. More...
 
virtual Matrix3f getLocalAxes (void) const
 Gets a matrix whose columns are the local axes based on the nodes orientation relative to it's parent. More...
 
virtual void addChild (Node *child)
 Adds a (precreated) child scene node to this node. More...
 
virtual unsigned short numChildren (void) const
 Reports the number of child nodes under this one. More...
 
virtual NodegetChild (unsigned short index) const
 Gets a pointer to a child node. More...
 
virtual NodegetChild (const String &name) const
 Gets a pointer to a named child node. More...
 
virtual void removeChild (unsigned short index)
 Drops the specified child from this node. More...
 
virtual void removeChild (Node *child)
 Drops the specified child from this node. More...
 
virtual void removeChild (const String &name)
 Drops the named child from this node. More...
 
virtual void removeAllChildren (void)
 Removes all child Nodes attached to this node. More...
 
const List< Node * > & getChildren () const
 #PYPI Returns the list of children of this node More...
 
virtual void _setDerivedPosition (const Vector3f &pos)
 Sets the final world position of the node directly. More...
 
virtual void _setDerivedOrientation (const Quaternion &q)
 Sets the final world orientation of the node directly. More...
 
virtual const QuaterniongetDerivedOrientation (void) const
 Gets the orientation of the node as derived from all parents. More...
 
virtual const Vector3fgetDerivedPosition (void) const
 Gets the position of the node as derived from all parents. More...
 
virtual const Vector3fgetDerivedScale (void) const
 Gets the scaling factor of the node as derived from all parents. More...
 
virtual const AffineTransform3getFullTransform (void) const
 Gets the full transformation matrix for this node. More...
 
virtual void update (bool updateChildren, bool parentHasChanged)
 Internal method to update the Node. More...
 
virtual Vector3f convertWorldToLocalPosition (const Vector3f &worldPos)
 Gets the local position, relative to this node, of the given world-space position. More...
 
virtual Vector3f convertLocalToWorldPosition (const Vector3f &localPos)
 Gets the world position of a point in the node local space useful for simple transforms that don't require a child node. More...
 
virtual Quaternion convertWorldToLocalOrientation (const Quaternion &worldOrientation)
 Gets the local orientation, relative to this node, of the given world-space orientation. More...
 
virtual Quaternion convertLocalToWorldOrientation (const Quaternion &localOrientation)
 Gets the world orientation of an orientation in the node local space useful for simple transforms that don't require a child node. More...
 
virtual void needUpdate (bool forceParentUpdate=true)
 To be called in the event of transform changes to this node that require it's recalculation. More...
 
virtual void requestUpdate (Node *child, bool forceParentUpdate=false)
 Called by children to notify their parent that they need an update. More...
 
virtual void cancelUpdate (Node *child)
 Called by children to notify their parent that they no longer need an update. More...
 
void * getUserData ()
 
void setUserData (void *data)
 
void setName (const String &name)
 
bool isUpdateNeeded ()
 
virtual void update (const UpdateContext &context)
 Children begin iterator. More...
 
- Public Member Functions inherited from omicron::ReferenceType
 ReferenceType ()
 
virtual ~ReferenceType ()
 
void ref ()
 
void unref ()
 
long refCount ()
 

Protected Types

typedef std::set< Node * > ChildUpdateSet
 

Protected Member Functions

virtual void updateTraversal (const UpdateContext &context)
 
virtual void setParent (Node *parent)
 Only available internally - notification of parent. More...
 
virtual void updateFromParent (void) const
 Class-specific implementation of updateFromParent. More...
 

Protected Attributes

NodemParent
 Pointer to parent node. More...
 
ChildNodeMap mChildren
 Collection of pointers to direct children; hashmap for efficiency. More...
 
List< Node * > mChildrenList
 
ChildUpdateSet mChildrenToUpdate
 List of children which need updating, used if self is not out of date but children are. More...
 
bool mNeedParentUpdate
 Flag to indicate own transform from parent is out of date. More...
 
bool mNeedChildUpdate
 Flag indicating that all children need to be updated. More...
 
bool mParentNotified
 Flag indicating that parent has been notified about update request. More...
 
bool mQueuedForUpdate
 Flag indicating that the node has been queued for update. More...
 
String mName
 Friendly name of this node, can be automatically generated if you don't care. More...
 
Quaternion mOrientation
 Stores the orientation of the node relative to it's parent. More...
 
Vector3f mPosition
 Stores the position/translation of the node relative to its parent. More...
 
Vector3f mScale
 Stores the scaling factor applied to this node. More...
 
bool mInheritOrientation
 Stores whether this node inherits orientation from it's parent. More...
 
bool mInheritScale
 Stores whether this node inherits scale from it's parent. More...
 
void * myUserData
 
Quaternion mDerivedOrientation
 Cached combined orientation. More...
 
Vector3f mDerivedPosition
 Cached combined position. More...
 
Vector3f mDerivedScale
 Cached combined scale. More...
 
AffineTransform3 mCachedTransform
 Cached derived transform as a 4x4 matrix. More...
 
bool mCachedTransformOutOfDate
 

Static Protected Attributes

static NameGenerator msNameGenerator
 Incremented count for next name extension. More...
 
- Static Protected Attributes inherited from omicron::ReferenceType
static List< ReferenceType * > mysObjList
 

Additional Inherited Members

- Static Public Member Functions inherited from omicron::ReferenceType
static void printObjCounts ()
 

Detailed Description

Class representing a general-purpose node in an articulated scene graph.

Remarks
A node in the scene graph is a node in a structured tree. A node contains information about the transformation which will apply to it and all of it's children. Child nodes can have transforms of their own, which are combined with their parent's transformations.
+ Inheritance diagram for omega::Node:

Member Typedef Documentation

typedef std::set<Node*> omega::Node::ChildUpdateSet
protected

Member Enumeration Documentation

Enumeration denoting the spaces which a transform can be relative to.

Enumerator
TransformLocal 

Transform is relative to the local space.

TransformParent 

Transform is relative to the space of the parent node.

TransformWorld 

Transform is relative to world space.

Constructor & Destructor Documentation

omega::Node::Node ( )

Constructor, should only be called by parent, not directly.

Remarks
Generates a name.
omega::Node::Node ( const String name)

Constructor, should only be called by parent, not directly.

Remarks
Assigned a name.
virtual omega::Node::~Node ( )
virtual

Member Function Documentation

virtual void omega::Node::_setDerivedOrientation ( const Quaternion q)
virtual

Sets the final world orientation of the node directly.

Remarks
It's advisable to use the local setOrientation if possible, this simply does the conversion for you.
virtual void omega::Node::_setDerivedPosition ( const Vector3f pos)
virtual

Sets the final world position of the node directly.

Remarks
It's advisable to use the local setPosition if possible
virtual void omega::Node::addChild ( Node child)
virtual

Adds a (precreated) child scene node to this node.

If it is attached to another node, it must be detached first.

Parameters
childThe Node which is to become a child node of this one
virtual void omega::Node::cancelUpdate ( Node child)
virtual

Called by children to notify their parent that they no longer need an update.

virtual Quaternion omega::Node::convertLocalToWorldOrientation ( const Quaternion localOrientation)
virtual

Gets the world orientation of an orientation in the node local space useful for simple transforms that don't require a child node.

virtual Vector3f omega::Node::convertLocalToWorldPosition ( const Vector3f localPos)
virtual

Gets the world position of a point in the node local space useful for simple transforms that don't require a child node.

virtual Quaternion omega::Node::convertWorldToLocalOrientation ( const Quaternion worldOrientation)
virtual

Gets the local orientation, relative to this node, of the given world-space orientation.

virtual Vector3f omega::Node::convertWorldToLocalPosition ( const Vector3f worldPos)
virtual

Gets the local position, relative to this node, of the given world-space position.

virtual Node* omega::Node::getChild ( unsigned short  index) const
virtual

Gets a pointer to a child node.

Remarks
There is an alternate getChild method which returns a named child.
virtual Node* omega::Node::getChild ( const String name) const
virtual

Gets a pointer to a named child node.

const List<Node*>& omega::Node::getChildren ( ) const
inline

#PYPI Returns the list of children of this node

virtual const Quaternion& omega::Node::getDerivedOrientation ( void  ) const
virtual

Gets the orientation of the node as derived from all parents.

virtual const Vector3f& omega::Node::getDerivedPosition ( void  ) const
virtual

Gets the position of the node as derived from all parents.

virtual const Vector3f& omega::Node::getDerivedScale ( void  ) const
virtual

Gets the scaling factor of the node as derived from all parents.

virtual const AffineTransform3& omega::Node::getFullTransform ( void  ) const
virtual

Gets the full transformation matrix for this node.

Remarks
This method returns the full transformation matrix for this node, including the effect of any parent node transformations, provided they have been updated using the Node::_update method. This should only be called by a SceneManager which knows the derived transforms have been updated before calling this method. Applications using Ogre should just use the relative transforms.
virtual bool omega::Node::getInheritOrientation ( void  ) const
virtual

Returns true if this node is affected by orientation applied to the parent node.

Remarks
Orientations, unlike other transforms, are not always inherited by child nodes. Whether or not orientations affect the orientation of the child nodes depends on the setInheritOrientation option of the child. In some cases you want a orientating of a parent node to apply to a child node (e.g. where the child node is a part of the same object, so you want it to be the same relative orientation based on the parent's orientation), but not in other cases (e.g. where the child node is just for positioning another object, you want it to maintain it's own orientation). The default is to inherit as with other transforms.
See setInheritOrientation for more info.
virtual bool omega::Node::getInheritScale ( void  ) const
virtual

Returns true if this node is affected by scaling factors applied to the parent node.

Remarks
See setInheritScale for more info.
virtual Matrix3f omega::Node::getLocalAxes ( void  ) const
virtual

Gets a matrix whose columns are the local axes based on the nodes orientation relative to it's parent.

const String& omega::Node::getName ( void  ) const

Returns the name of the node.

virtual const Quaternion& omega::Node::getOrientation ( ) const
virtual

Returns a quaternion representing the nodes orientation.

virtual Node* omega::Node::getParent ( void  ) const
virtual

Gets this node's parent (NULL if this is the root).

virtual const Vector3f& omega::Node::getPosition ( void  ) const
virtual

Gets the position of the node relative to it's parent.

virtual const Vector3f& omega::Node::getScale ( void  ) const
virtual

Gets the scaling factor of this node.

void* omega::Node::getUserData ( )
inline
bool omega::Node::isUpdateNeeded ( )
inline
virtual void omega::Node::lookAt ( const Vector3f position,
const Vector3f upVector 
)
virtual

Rotate the node to make its positive Z axis point toward the specified position.

Reimplemented in omega::Camera.

virtual void omega::Node::needUpdate ( bool  forceParentUpdate = true)
virtual

To be called in the event of transform changes to this node that require it's recalculation.

Remarks
This not only tags the node state as being 'dirty', it also requests it's parent to know about it's dirtiness so it will get an update next time.
Parameters
forceParentUpdateEven if the node thinks it has already told it's parent, tell it anyway

Reimplemented in omega::SceneNode.

virtual unsigned short omega::Node::numChildren ( void  ) const
virtual

Reports the number of child nodes under this one.

virtual void omega::Node::pitch ( const float &  angle,
TransformSpace  relativeTo = TransformLocal 
)
virtual

Rotate the node around the X-axis.

virtual void omega::Node::pitchDeg ( const float &  angle,
TransformSpace  relativeTo = TransformLocal 
)
inlinevirtual

Rotate the node around the X-axis, The angle is specified in degrees.

virtual void omega::Node::removeAllChildren ( void  )
virtual

Removes all child Nodes attached to this node.

Does not delete the nodes, just detaches them from this parent, potentially to be reattached elsewhere.

virtual void omega::Node::removeChild ( unsigned short  index)
virtual

Drops the specified child from this node.

Remarks
Does not delete the node, just detaches it from this parent, potentially to be reattached elsewhere. There is also an alternate version which drops a named child from this node.
virtual void omega::Node::removeChild ( Node child)
virtual

Drops the specified child from this node.

Remarks
Does not delete the node, just detaches it from this parent, potentially to be reattached elsewhere. There is also an alternate version which drops a named child from this node.
virtual void omega::Node::removeChild ( const String name)
virtual

Drops the named child from this node.

Remarks
Does not delete the node, just detaches it from this parent, potentially to be reattached elsewhere.
virtual void omega::Node::requestUpdate ( Node child,
bool  forceParentUpdate = false 
)
virtual

Called by children to notify their parent that they need an update.

Parameters
forceParentUpdateEven if the node thinks it has already told it's parent, tell it anyway
virtual void omega::Node::resetOrientation ( void  )
virtual

Resets the nodes orientation (local axes as world axes, no rotation).

Remarks
Orientations, unlike other transforms, are not always inherited by child nodes. Whether or not orientations affect the orientation of the child nodes depends on the setInheritOrientation option of the child. In some cases you want a orientating of a parent node to apply to a child node (e.g. where the child node is a part of the same object, so you want it to be the same relative orientation based on the parent's orientation), but not in other cases (e.g. where the child node is just for positioning another object, you want it to maintain it's own orientation). The default is to inherit as with other transforms.
Note that rotations are oriented around the node's origin.
virtual void omega::Node::roll ( const float &  angle,
TransformSpace  relativeTo = TransformLocal 
)
virtual

Rotate the node around the Z-axis.

void omega::Node::rollDeg ( const float &  angle,
TransformSpace  relativeTo = TransformLocal 
)
inline

Rotate the node around the Z-axis, The angle is specified in degrees.

virtual void omega::Node::rotate ( const Vector3f axis,
const float &  angle,
TransformSpace  relativeTo = TransformLocal 
)
virtual

Rotate the node around an arbitrary axis.

virtual void omega::Node::rotate ( const Quaternion q,
TransformSpace  relativeTo = TransformLocal 
)
virtual

Rotate the node around an aritrary axis using a Quarternion.

virtual void omega::Node::scale ( const Vector3f scale)
virtual

Scales the node, combining it's current scale with the passed in scaling factor.

Remarks
This method applies an extra scaling factor to the node's existing scale, (unlike setScale which overwrites it) combining it's current scale with the new one. E.g. calling this method twice with Vector3f(2,2,2) would have the same effect as setScale(Vector3f(4,4,4)) if the existing scale was 1.
Note that like rotations, scalings are oriented around the node's origin.
virtual void omega::Node::scale ( float  x,
float  y,
float  z 
)
virtual

Scales the node, combining it's current scale with the passed in scaling factor.

Remarks
This method applies an extra scaling factor to the node's existing scale, (unlike setScale which overwrites it) combining it's current scale with the new one. E.g. calling this method twice with Vector3f(2,2,2) would have the same effect as setScale(Vector3f(4,4,4)) if the existing scale was 1.
Note that like rotations, scalings are oriented around the node's origin.
virtual void omega::Node::setInheritOrientation ( bool  inherit)
virtual

Tells the node whether it should inherit orientation from it's parent node.

Remarks
Orientations, unlike other transforms, are not always inherited by child nodes. Whether or not orientations affect the orientation of the child nodes depends on the setInheritOrientation option of the child. In some cases you want a orientating of a parent node to apply to a child node (e.g. where the child node is a part of the same object, so you want it to be the same relative orientation based on the parent's orientation), but not in other cases (e.g. where the child node is just for positioning another object, you want it to maintain it's own orientation). The default is to inherit as with other transforms.
Parameters
inheritIf true, this node's orientation will be affected by its parent's orientation. If false, it will not be affected.
virtual void omega::Node::setInheritScale ( bool  inherit)
virtual

Tells the node whether it should inherit scaling factors from it's parent node.

Remarks
Scaling factors, unlike other transforms, are not always inherited by child nodes. Whether or not scalings affect the size of the child nodes depends on the setInheritScale option of the child. In some cases you want a scaling factor of a parent node to apply to a child node (e.g. where the child node is a part of the same object, so you want it to be the same relative size based on the parent's size), but not in other cases (e.g. where the child node is just for positioning another object, you want it to maintain it's own size). The default is to inherit as with other transforms.
Parameters
inheritIf true, this node's scale will be affected by its parent's scale. If false, it will not be affected.
void omega::Node::setName ( const String name)
virtual void omega::Node::setOrientation ( const Quaternion q)
virtual

Sets the orientation of this node via a quaternion.

Remarks
Orientations, unlike other transforms, are not always inherited by child nodes. Whether or not orientations affect the orientation of the child nodes depends on the setInheritOrientation option of the child. In some cases you want a orientating of a parent node to apply to a child node (e.g. where the child node is a part of the same object, so you want it to be the same relative orientation based on the parent's orientation), but not in other cases (e.g. where the child node is just for positioning another object, you want it to maintain it's own orientation). The default is to inherit as with other transforms.
Note that rotations are oriented around the node's origin.
virtual void omega::Node::setOrientation ( float  w,
float  x,
float  y,
float  z 
)
virtual

Sets the orientation of this node via quaternion parameters.

Remarks
Orientations, unlike other transforms, are not always inherited by child nodes. Whether or not orientations affect the orientation of the child nodes depends on the setInheritOrientation option of the child. In some cases you want a orientating of a parent node to apply to a child node (e.g. where the child node is a part of the same object, so you want it to be the same relative orientation based on the parent's orientation), but not in other cases (e.g. where the child node is just for positioning another object, you want it to maintain it's own orientation). The default is to inherit as with other transforms.
Note that rotations are oriented around the node's origin.
virtual void omega::Node::setParent ( Node parent)
protectedvirtual

Only available internally - notification of parent.

Reimplemented in omega::SceneNode.

virtual void omega::Node::setPosition ( const Vector3f pos)
virtual

Sets the position of the node relative to it's parent.

virtual void omega::Node::setPosition ( float  x,
float  y,
float  z 
)
virtual

Sets the position of the node relative to it's parent.

virtual void omega::Node::setScale ( const Vector3f scale)
virtual

Sets the scaling factor applied to this node.

Remarks
Scaling factors, unlike other transforms, are not always inherited by child nodes. Whether or not scalings affect the size of the child nodes depends on the setInheritScale option of the child. In some cases you want a scaling factor of a parent node to apply to a child node (e.g. where the child node is a part of the same object, so you want it to be the same relative size based on the parent's size), but not in other cases (e.g. where the child node is just for positioning another object, you want it to maintain it's own size). The default is to inherit as with other transforms.
Note that like rotations, scalings are oriented around the node's origin.
virtual void omega::Node::setScale ( float  x,
float  y,
float  z 
)
virtual

Sets the scaling factor applied to this node.

Remarks
Scaling factors, unlike other transforms, are not always inherited by child nodes. Whether or not scalings affect the size of the child nodes depends on the setInheritScale option of the child. In some cases you want a scaling factor of a parent node to apply to a child node (e.g. where the child node is a part of the same object, so you want it to be the same relative size based on the parent's size), but not in other cases (e.g. where the child node is just for positioning another object, you want it to maintain it's own size). The default is to inherit as with other transforms.
Note that like rotations, scalings are oriented around the node's origin.
void omega::Node::setUserData ( void *  data)
inline
virtual void omega::Node::translate ( const Vector3f d,
TransformSpace  relativeTo = TransformParent 
)
virtual

Moves the node along the Cartesian axes.

This method moves the node by the supplied vector along the world Cartesian axes, i.e. along world x,y,z
Parameters
dVector with x,y,z values representing the translation.
relativeToThe space which this transform is relative to.
virtual void omega::Node::translate ( float  x,
float  y,
float  z,
TransformSpace  relativeTo = TransformParent 
)
virtual

Moves the node along the Cartesian axes.

This method moves the node by the supplied vector along the world Cartesian axes, i.e. along world x,y,z
Parameters
x
y
zfloat x, y and z values representing the translation.
relativeToThe space which this transform is relative to.
virtual void omega::Node::translate ( const Matrix3f axes,
const Vector3f move,
TransformSpace  relativeTo = TransformParent 
)
virtual

Moves the node along arbitrary axes.

Remarks
This method translates the node by a vector which is relative to a custom set of axes.
Parameters
axesA 3x3 Matrix containg 3 column vectors each representing the axes X, Y and Z respectively. In this format the standard cartesian axes would be expressed as:
    1 0 0
    0 1 0
    0 0 1
    
i.e. the identity matrix.
moveVector relative to the axes above.
relativeToThe space which this transform is relative to.
virtual void omega::Node::translate ( const Matrix3f axes,
float  x,
float  y,
float  z,
TransformSpace  relativeTo = TransformParent 
)
virtual

Moves the node along arbitrary axes.

Remarks
This method translates the node by a vector which is relative to a custom set of axes.
Parameters
axesA 3x3 Matrix containg 3 column vectors each representing the axes X, Y and Z respectively. In this format the standard cartesian axes would be expressed as
    1 0 0
    0 1 0
    0 0 1
    
i.e. the identity matrix.
x,y,zTranslation components relative to the axes above.
relativeToThe space which this transform is relative to.
virtual void omega::Node::update ( bool  updateChildren,
bool  parentHasChanged 
)
virtual

Internal method to update the Node.

Note
Updates this node and any relevant children to incorporate transforms etc. Don't call this yourself unless you are writing a SceneManager implementation.
Parameters
updateChildrenIf true, the update cascades down to all children. Specify false if you wish to update children separately, e.g. because of a more selective SceneManager implementation.
parentHasChangedThis flag indicates that the parent xform has changed, so the child should retrieve the parent's xform and combine it with its own even if it hasn't changed itself.

Reimplemented in omega::SceneNode.

virtual void omega::Node::update ( const UpdateContext context)
virtual

Children begin iterator.

Traversal functions

Reimplemented in omega::SceneNode.

virtual void omega::Node::updateFromParent ( void  ) const
protectedvirtual

Class-specific implementation of updateFromParent.

Remarks
Splitting the implementation of the update away from the update call itself allows the detail to be overridden without disrupting the general sequence of updateFromParent (e.g. raising events)

Reimplemented in omega::Camera.

virtual void omega::Node::updateTraversal ( const UpdateContext context)
protectedvirtual

Reimplemented in omega::Camera, and omega::SceneNode.

virtual void omega::Node::yaw ( const float &  angle,
TransformSpace  relativeTo = TransformLocal 
)
virtual

Rotate the node around the Y-axis.

virtual void omega::Node::yawDeg ( const float &  angle,
TransformSpace  relativeTo = TransformLocal 
)
inlinevirtual

Rotate the node around the Y-axis, The angle is specified in degrees.

Member Data Documentation

AffineTransform3 omega::Node::mCachedTransform
mutableprotected

Cached derived transform as a 4x4 matrix.

bool omega::Node::mCachedTransformOutOfDate
mutableprotected
ChildNodeMap omega::Node::mChildren
protected

Collection of pointers to direct children; hashmap for efficiency.

List<Node*> omega::Node::mChildrenList
protected
ChildUpdateSet omega::Node::mChildrenToUpdate
mutableprotected

List of children which need updating, used if self is not out of date but children are.

Quaternion omega::Node::mDerivedOrientation
mutableprotected

Cached combined orientation.

This member is the orientation derived by combining the local transformations and those of it's parents. This is updated when updateFromParent is called by the SceneManager or the nodes parent.
Vector3f omega::Node::mDerivedPosition
mutableprotected

Cached combined position.

This member is the position derived by combining the local transformations and those of it's parents. This is updated when updateFromParent is called by the SceneManager or the nodes parent.
Vector3f omega::Node::mDerivedScale
mutableprotected

Cached combined scale.

This member is the position derived by combining the local transformations and those of it's parents. This is updated when updateFromParent is called by the SceneManager or the nodes parent.
bool omega::Node::mInheritOrientation
protected

Stores whether this node inherits orientation from it's parent.

bool omega::Node::mInheritScale
protected

Stores whether this node inherits scale from it's parent.

String omega::Node::mName
protected

Friendly name of this node, can be automatically generated if you don't care.

bool omega::Node::mNeedChildUpdate
mutableprotected

Flag indicating that all children need to be updated.

bool omega::Node::mNeedParentUpdate
mutableprotected

Flag to indicate own transform from parent is out of date.

Quaternion omega::Node::mOrientation
protected

Stores the orientation of the node relative to it's parent.

Node* omega::Node::mParent
protected

Pointer to parent node.

bool omega::Node::mParentNotified
mutableprotected

Flag indicating that parent has been notified about update request.

Vector3f omega::Node::mPosition
protected

Stores the position/translation of the node relative to its parent.

bool omega::Node::mQueuedForUpdate
mutableprotected

Flag indicating that the node has been queued for update.

Vector3f omega::Node::mScale
protected

Stores the scaling factor applied to this node.

NameGenerator omega::Node::msNameGenerator
staticprotected

Incremented count for next name extension.

void* omega::Node::myUserData
protected

The documentation for this class was generated from the following file: