OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::Node Class Referenceabstract

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

#include <OgreNode.h>

+ Inheritance diagram for Ogre::Node:
+ Collaboration diagram for Ogre::Node:

Classes

class  DebugRenderable
 Inner class for displaying debug renderable for Node. More...
 
class  Listener
 Listener which gets called back on Node events. More...
 

Public Types

typedef ConstVectorIterator
< NodeVec
ConstNodeVecIterator
 
typedef vector< Node * >::type NodeVec
 
typedef VectorIterator< NodeVecNodeVecIterator
 
enum  TransformSpace { TS_LOCAL, TS_PARENT, TS_WORLD }
 Enumeration denoting the spaces which a transform can be relative to. More...
 

Public Member Functions

 Node (IdType id, NodeMemoryManager *nodeMemoryManager, Node *parent)
 Constructor, should only be called by parent, not directly. More...
 
 Node (const Transform &transformPtrs)
 Don't use this constructor unless you know what you're doing. More...
 
virtual ~Node ()
 
virtual void _callMemoryChangeListeners (void)=0
 Internal use, notifies all attached objects that our memory pointers (i.e. More...
 
virtual_l2 Quaternion _getDerivedOrientation (void) const
 Gets the orientation of the node as derived from all parents. More...
 
virtual_l2 Quaternion _getDerivedOrientationUpdated (void)
 Gets the orientation of the node as derived from all parents. More...
 
virtual_l2 Vector3 _getDerivedPosition (void) const
 Gets the position of the node as derived from all parents. More...
 
virtual_l2 Vector3 _getDerivedPositionUpdated (void)
 Gets the position of the node as derived from all parents. More...
 
virtual_l2 Vector3 _getDerivedScale (void) const
 Gets the scaling factor of the node as derived from all parents. More...
 
virtual_l2 Vector3 _getDerivedScaleUpdated (void)
 Gets the scalling factor of the node as derived from all parents. More...
 
virtual_l2 FORCEINLINE const
Matrix4
_getFullTransform (void) const
 Gets the full transformation matrix for this node. More...
 
virtual_l2 const Matrix4_getFullTransformUpdated (void)
 _getDerivedScaleUpdated remarks. More...
 
Transform_getTransform ()
 Returns a direct access to the Transform state. More...
 
virtual void _notifyStaticDirty (void) const
 Called by SceneManager when it is telling we're a static node being dirty Don't call this directly. More...
 
virtual void _setCachedTransformOutOfDate (void)
 
virtual_l2 void _setDerivedOrientation (const Quaternion &q)
 Sets the final world orientation of the node directly. More...
 
virtual_l2 void _setDerivedPosition (const Vector3 &pos)
 Sets the final world position of the node directly. More...
 
void _setNullNodeMemoryManager (void)
 Manually set the mNodeMemoryManager to a null ptr. More...
 
void addChild (Node *child)
 Adds a (precreated) child scene node to this node. More...
 
virtual_l2 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_l2 Vector3 convertLocalToWorldPosition (const Vector3 &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_l2 Quaternion convertWorldToLocalOrientation (const Quaternion &worldOrientation)
 Gets the local orientation, relative to this node, of the given world-space orientation. More...
 
virtual_l2 Vector3 convertWorldToLocalPosition (const Vector3 &worldPos)
 Gets the local position, relative to this node, of the given world-space position. More...
 
virtual NodecreateChild (SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC, const Vector3 &translate=Vector3::ZERO, const Quaternion &rotate=Quaternion::IDENTITY)
 Creates an unnamed new Node as a child of this node. More...
 
NodegetChild (size_t index)
 Gets a pointer to a child node. More...
 
const NodegetChild (size_t index) const
 
NodeVecIterator getChildIterator (void)
 Retrieves an iterator for efficiently looping through all children of this node. More...
 
ConstNodeVecIterator getChildIterator (void) const
 Retrieves an iterator for efficiently looping through all children of this node. More...
 
virtual DebugRenderablegetDebugRenderable (Real scaling)
 Get a debug renderable for rendering the Node. More...
 
uint16 getDepthLevel () const
 Returns how deep in the hierarchy we are (eg. 0 -> root node, 1 -> child of root) More...
 
IdType getId () const
 Get the unique id of this object. More...
 
virtual_l2 bool getInheritOrientation (void) const
 Returns true if this node is affected by orientation applied to the parent node. More...
 
virtual_l2 bool getInheritScale (void) const
 Returns true if this node is affected by scaling factors applied to the parent node. More...
 
ListenergetListener (void) const
 Gets the current listener for this Node. More...
 
virtual_l2 Matrix3 getLocalAxes (void) const
 Gets a matrix whose columns are the local axes based on the nodes orientation relative to it's parent. More...
 
const StringgetName (void) const
 Returns the name of the node. More...
 
virtual_l2 Quaternion getOrientation () const
 Returns a quaternion representing the nodes orientation. More...
 
NodegetParent (void) const
 Gets this node's parent (NULL if this is the root). More...
 
virtual_l2 Vector3 getPosition (void) const
 Gets the position of the node relative to it's parent. More...
 
virtual_l2 Vector3 getScale (void) const
 Gets the scaling factor of this node. More...
 
virtual Real getSquaredViewDepth (const Camera *cam) const
 Helper function, get the squared view depth. More...
 
virtual OGRE_DEPRECATED const AnygetUserAny (void) const
 
UserObjectBindingsgetUserObjectBindings ()
 Return an instance of user objects binding associated with this class. More...
 
const UserObjectBindingsgetUserObjectBindings () const
 Return an instance of user objects binding associated with this class. More...
 
bool isCachedTransformOutOfDate (void) const
 
bool isStatic () const
 Checks whether this node is static. setStatic. More...
 
size_t numChildren (void) const
 Reports the number of child nodes under this one. More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 
bool operator() (const IdObject *left, const IdObject *right)
 
bool operator() (const IdObject &left, const IdObject &right)
 
virtual_l2 void pitch (const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
 Rotate the node around the X-axis. More...
 
virtual void removeAllChildren (void)
 Removes all child Nodes attached to this node. More...
 
virtual void removeChild (Node *child)
 Drops the specified child from this node. More...
 
virtual_l1 void resetOrientation (void)
 Resets the nodes orientation (local axes as world axes, no rotation). More...
 
virtual_l2 void roll (const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
 Rotate the node around the Z-axis. More...
 
virtual_l2 void rotate (const Vector3 &axis, const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
 Rotate the node around an arbitrary axis. More...
 
virtual_l2 void rotate (const Quaternion &q, TransformSpace relativeTo=TS_LOCAL)
 Rotate the node around an aritrary axis using a Quarternion. More...
 
virtual_l2 void scale (const Vector3 &scale)
 Scales the node, combining it's current scale with the passed in scaling factor. More...
 
virtual_l2 void scale (Real x, Real y, Real z)
 Scales the node, combining it's current scale with the passed in scaling factor. More...
 
virtual_l2 void setInheritOrientation (bool inherit)
 Tells the node whether it should inherit orientation from it's parent node. More...
 
virtual_l2 void setInheritScale (bool inherit)
 Tells the node whether it should inherit scaling factors from it's parent node. More...
 
virtual void setListener (Listener *listener)
 Sets a listener for this Node. More...
 
void setName (const String &name)
 Sets a custom name for this node. More...
 
virtual_l1 void setOrientation (Quaternion q)
 Sets the orientation of this node via a quaternion. More...
 
virtual_l1 void setOrientation (Real w, Real x, Real y, Real z)
 Sets the orientation of this node via quaternion parameters. More...
 
virtual_l1 void setPosition (const Vector3 &pos)
 Sets the position of the node relative to it's parent. More...
 
virtual_l1 void setPosition (Real x, Real y, Real z)
 Sets the position of the node relative to it's parent. More...
 
virtual_l1 void setScale (const Vector3 &scale)
 Sets the scaling factor applied to this node. More...
 
virtual_l1 void setScale (Real x, Real y, Real z)
 Sets the scaling factor applied to this node. More...
 
virtual bool setStatic (bool bStatic)
 Turns this Node into static or dynamic. More...
 
virtual OGRE_DEPRECATED void setUserAny (const Any &anything)
 
virtual_l2 void translate (const Vector3 &d, TransformSpace relativeTo=TS_PARENT)
 Moves the node along the Cartesian axes. More...
 
virtual_l2 void translate (Real x, Real y, Real z, TransformSpace relativeTo=TS_PARENT)
 Moves the node along the Cartesian axes. More...
 
virtual_l2 void translate (const Matrix3 &axes, const Vector3 &move, TransformSpace relativeTo=TS_PARENT)
 Moves the node along arbitrary axes. More...
 
virtual_l2 void translate (const Matrix3 &axes, Real x, Real y, Real z, TransformSpace relativeTo=TS_PARENT)
 Moves the node along arbitrary axes. More...
 
virtual_l2 void yaw (const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
 Rotate the node around the Y-axis. More...
 

Static Public Member Functions

static void updateAllTransforms (const size_t numNodes, Transform t)
 SceneManager::updateAllTransforms() More...
 

Public Attributes

size_t mGlobalIndex
 Index in the vector holding this node reference (could be our parent node, or a global array tracking all created nodes to avoid memory leaks). More...
 
size_t mParentIndex
 Index in the vector holding this node reference (could be our parent node, or a global array tracking all created nodes to avoid memory leaks). More...
 

Protected Member Functions

void _setId (IdType newId)
 In the rare case our derived class wants to override our Id (normally we don't want that, that's why it's private). More...
 
void _updateFromParent (void)
 Triggers the node to update it's combined transforms. More...
 
virtual NodecreateChildImpl (SceneMemoryMgrTypes sceneType)=0
 Internal method for creating a new child node - must be overridden per subclass. More...
 
void parentDepthLevelChanged (void)
 Notification from parent that we need to migrate to a different depth level. More...
 
void setParent (Node *parent)
 Only available internally - notification of parent. Can't be null. More...
 
void unsetParent (void)
 
virtual void updateFromParentImpl (void)
 Class-specific implementation of _updateFromParent. More...
 

Protected Attributes

bool mCachedTransformOutOfDate
 
NodeVec mChildren
 Collection of pointers to direct children; hashmap for efficiency. More...
 
DebugRenderablemDebug
 
uint16 mDepthLevel
 Depth level in the hierarchy tree (0: Root node, 1: Child of root, etc) More...
 
ListenermListener
 Node listener - only one allowed (no list) for size & performance reasons. More...
 
String mName
 Friendly name of this node, can be empty. More...
 
NodeMemoryManagermNodeMemoryManager
 The memory manager used to allocate the Transform. More...
 
NodemParent
 Pointer to parent node. More...
 
Transform mTransform
 All the transform data needed in SoA form. More...
 
UserObjectBindings mUserObjectBindings
 User objects binding. More...
 

Detailed Description

Class representing a general-purpose node 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.
This is an abstract class - concrete classes are based on this for specific purposes, e.g. SceneNode, Bone

Definition at line 58 of file OgreNode.h.

Member Typedef Documentation

typedef vector<Node*>::type Ogre::Node::NodeVec

Definition at line 72 of file OgreNode.h.

Definition at line 73 of file OgreNode.h.

Member Enumeration Documentation

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

Enumerator
TS_LOCAL 

Transform is relative to the local space.

TS_PARENT 

Transform is relative to the space of the parent node.

TS_WORLD 

Transform is relative to world space.

Definition at line 63 of file OgreNode.h.

Constructor & Destructor Documentation

Ogre::Node::Node ( IdType  id,
NodeMemoryManager nodeMemoryManager,
Node parent 
)

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

Remarks
Parent pointer can be null.
Ogre::Node::Node ( const Transform transformPtrs)

Don't use this constructor unless you know what you're doing.

NodeMemoryManager::mDummyNode

virtual Ogre::Node::~Node ( )
virtual

Member Function Documentation

virtual void Ogre::Node::_callMemoryChangeListeners ( void  )
pure virtual

Internal use, notifies all attached objects that our memory pointers (i.e.

Transform) may have changed (e.g. during cleanups, change of parent, etc)

Implemented in Ogre::SceneNode.

virtual_l2 Quaternion Ogre::Node::_getDerivedOrientation ( void  ) const

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

Remarks
Assumes the caches are already updated. Will trigger an assert otherwise. _getDerivedOrientationUpdated if you need the update process to be guaranteed
virtual_l2 Quaternion Ogre::Node::_getDerivedOrientationUpdated ( void  )

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

Remarks
Unlike _getDerivedOrientation, this function guarantees the cache stays up to date. It is strongly advised against calling this function for a large number of nodes. Refactor your queries so that they happen after SceneManager::UpdateAllTransforms() has been called
virtual_l2 Vector3 Ogre::Node::_getDerivedPosition ( void  ) const

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

Remarks
Assumes the caches are already updated. Will trigger an assert otherwise. _getDerivedPositionUpdated if you need the update process to be guaranteed
virtual_l2 Vector3 Ogre::Node::_getDerivedPositionUpdated ( void  )

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

Remarks
Unlike _getDerivedPosition, this function guarantees the cache stays up to date. It is strongly advised against calling this function for a large number of nodes. Refactor your queries so that they happen after SceneManager::UpdateAllTransforms() has been called
virtual_l2 Vector3 Ogre::Node::_getDerivedScale ( void  ) const

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

Remarks
Assumes the caches are already updated. Will trigger an assert otherwise. _getDerivedScaleUpdated if you need the update process to be guaranteed
virtual_l2 Vector3 Ogre::Node::_getDerivedScaleUpdated ( void  )

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

Remarks
Unlike _getDerivedScale, this function guarantees the cache stays up to date. It is STRONGLY advised against calling this function for a large number of nodes. Refactor your queries so that they happen after SceneManager::UpdateAllTransforms() has been called
virtual_l2 FORCEINLINE const Matrix4& Ogre::Node::_getFullTransform ( void  ) const
inline

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. Assumes the caches are already updated

Definition at line 651 of file OgreNode.h.

virtual_l2 const Matrix4& Ogre::Node::_getFullTransformUpdated ( void  )

_getDerivedScaleUpdated remarks.

_getFullTransform

Transform& Ogre::Node::_getTransform ( )
inline

Returns a direct access to the Transform state.

Definition at line 230 of file OgreNode.h.

virtual void Ogre::Node::_notifyStaticDirty ( void  ) const
virtual

Called by SceneManager when it is telling we're a static node being dirty Don't call this directly.

See also
SceneManager::notifyStaticDirty

Reimplemented in Ogre::SceneNode.

virtual void Ogre::Node::_setCachedTransformOutOfDate ( void  )
virtual

Reimplemented in Ogre::SceneNode.

virtual_l2 void Ogre::Node::_setDerivedOrientation ( const Quaternion q)

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_l2 void Ogre::Node::_setDerivedPosition ( const Vector3 pos)

Sets the final world position of the node directly.

Remarks
It's advisable to use the local setPosition if possible
void Ogre::IdObject::_setId ( IdType  newId)
inlineprotectedinherited

In the rare case our derived class wants to override our Id (normally we don't want that, that's why it's private).

Definition at line 63 of file OgreId.h.

void Ogre::Node::_setNullNodeMemoryManager ( void  )
inline

Manually set the mNodeMemoryManager to a null ptr.

Remarks
Node doesn't follow the rule of three. This function is useful when you make multiple hard copies but only the destructor must release the mTransform only slots once.

Definition at line 728 of file OgreNode.h.

void Ogre::Node::_updateFromParent ( void  )
protected

Triggers the node to update it's combined transforms.

This method is called internally by Ogre to ask the node to update it's complete transformation based on it's parents derived transform.
void Ogre::Node::addChild ( Node child)

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_l2 Quaternion Ogre::Node::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.

virtual_l2 Vector3 Ogre::Node::convertLocalToWorldPosition ( const Vector3 localPos)

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

virtual_l2 Quaternion Ogre::Node::convertWorldToLocalOrientation ( const Quaternion worldOrientation)

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

virtual_l2 Vector3 Ogre::Node::convertWorldToLocalPosition ( const Vector3 worldPos)

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

virtual Node* Ogre::Node::createChild ( SceneMemoryMgrTypes  sceneType = SCENE_DYNAMIC,
const Vector3 translate = Vector3::ZERO,
const Quaternion rotate = Quaternion::IDENTITY 
)
virtual

Creates an unnamed new Node as a child of this node.

Parameters
translateInitial translation offset of child relative to parent
rotateInitial rotation relative to parent
virtual Node* Ogre::Node::createChildImpl ( SceneMemoryMgrTypes  sceneType)
protectedpure virtual

Internal method for creating a new child node - must be overridden per subclass.

Implemented in Ogre::SceneNode.

Node* Ogre::Node::getChild ( size_t  index)
inline

Gets a pointer to a child node.

Definition at line 530 of file OgreNode.h.

const Node* Ogre::Node::getChild ( size_t  index) const
inline

Definition at line 531 of file OgreNode.h.

NodeVecIterator Ogre::Node::getChildIterator ( void  )

Retrieves an iterator for efficiently looping through all children of this node.

Remarks
Using this is faster than repeatedly calling getChild if you want to go through all (or most of) the children of this node. Note that the returned iterator is only valid whilst no children are added or removed from this node. Thus you should not store this returned iterator for later use, nor should you add / remove children whilst iterating through it; store up changes for later. Note that calling methods on returned items in the iterator IS allowed and does not invalidate the iterator.
ConstNodeVecIterator Ogre::Node::getChildIterator ( void  ) const

Retrieves an iterator for efficiently looping through all children of this node.

Remarks
Using this is faster than repeatedly calling getChild if you want to go through all (or most of) the children of this node. Note that the returned iterator is only valid whilst no children are added or removed from this node. Thus you should not store this returned iterator for later use, nor should you add / remove children whilst iterating through it; store up changes for later. Note that calling methods on returned items in the iterator IS allowed and does not invalidate the iterator.
virtual DebugRenderable* Ogre::Node::getDebugRenderable ( Real  scaling)
virtual

Get a debug renderable for rendering the Node.

uint16 Ogre::Node::getDepthLevel ( ) const
inline

Returns how deep in the hierarchy we are (eg. 0 -> root node, 1 -> child of root)

Definition at line 227 of file OgreNode.h.

IdType Ogre::IdObject::getId ( ) const
inlineinherited

Get the unique id of this object.

Definition at line 74 of file OgreId.h.

virtual_l2 bool Ogre::Node::getInheritOrientation ( void  ) const

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_l2 bool Ogre::Node::getInheritScale ( void  ) const

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

Remarks
See setInheritScale for more info.
Listener* Ogre::Node::getListener ( void  ) const
inline

Gets the current listener for this Node.

Definition at line 669 of file OgreNode.h.

virtual_l2 Matrix3 Ogre::Node::getLocalAxes ( void  ) const

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

const String& Ogre::Node::getName ( void  ) const
inline

Returns the name of the node.

Definition at line 201 of file OgreNode.h.

virtual_l2 Quaternion Ogre::Node::getOrientation ( ) const

Returns a quaternion representing the nodes orientation.

Remarks
Don't call this function too often, as we need to convert from SoA
Node* Ogre::Node::getParent ( void  ) const

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

virtual_l2 Vector3 Ogre::Node::getPosition ( void  ) const

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

Remarks
Don't call this function too often, as we need to convert from SoA
virtual_l2 Vector3 Ogre::Node::getScale ( void  ) const

Gets the scaling factor of this node.

Remarks
Don't call this function too often, as we need to convert from SoA
virtual Real Ogre::Node::getSquaredViewDepth ( const Camera cam) const
virtual

Helper function, get the squared view depth.

virtual OGRE_DEPRECATED const Any& Ogre::Node::getUserAny ( void  ) const
inlinevirtual
Deprecated:
use UserObjectBindings::getUserAny via getUserObjectBindings() instead. Retrieves the custom user value associated with this object.

Definition at line 709 of file OgreNode.h.

UserObjectBindings& Ogre::Node::getUserObjectBindings ( )
inline

Return an instance of user objects binding associated with this class.

You can use it to associate one or more custom objects with this class instance.

See also
UserObjectBindings::setUserAny.

Definition at line 715 of file OgreNode.h.

const UserObjectBindings& Ogre::Node::getUserObjectBindings ( ) const
inline

Return an instance of user objects binding associated with this class.

You can use it to associate one or more custom objects with this class instance.

See also
UserObjectBindings::setUserAny.

Definition at line 721 of file OgreNode.h.

bool Ogre::Node::isCachedTransformOutOfDate ( void  ) const
inline

Definition at line 737 of file OgreNode.h.

bool Ogre::Node::isStatic ( ) const

Checks whether this node is static. setStatic.

size_t Ogre::Node::numChildren ( void  ) const
inline

Reports the number of child nodes under this one.

Definition at line 527 of file OgreNode.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

bool Ogre::IdObject::operator() ( const IdObject left,
const IdObject right 
)
inlineinherited

Definition at line 76 of file OgreId.h.

References Ogre::IdObject::mId.

bool Ogre::IdObject::operator() ( const IdObject left,
const IdObject right 
)
inlineinherited

Definition at line 81 of file OgreId.h.

References Ogre::IdObject::mId.

void Ogre::Node::parentDepthLevelChanged ( void  )
protected

Notification from parent that we need to migrate to a different depth level.

virtual_l2 void Ogre::Node::pitch ( const Radian angle,
TransformSpace  relativeTo = TS_LOCAL 
)

Rotate the node around the X-axis.

virtual void Ogre::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.

Reimplemented in Ogre::OctreeNode.

virtual void Ogre::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.
Asserts if child is not one of our children.

Reimplemented in Ogre::OctreeNode.

virtual_l1 void Ogre::Node::resetOrientation ( void  )

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_l2 void Ogre::Node::roll ( const Radian angle,
TransformSpace  relativeTo = TS_LOCAL 
)

Rotate the node around the Z-axis.

virtual_l2 void Ogre::Node::rotate ( const Vector3 axis,
const Radian angle,
TransformSpace  relativeTo = TS_LOCAL 
)

Rotate the node around an arbitrary axis.

virtual_l2 void Ogre::Node::rotate ( const Quaternion q,
TransformSpace  relativeTo = TS_LOCAL 
)

Rotate the node around an aritrary axis using a Quarternion.

virtual_l2 void Ogre::Node::scale ( const Vector3 scale)

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 Vector3(2,2,2) would have the same effect as setScale(Vector3(4,4,4)) if the existing scale was 1.
Note that like rotations, scalings are oriented around the node's origin.
virtual_l2 void Ogre::Node::scale ( Real  x,
Real  y,
Real  z 
)

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 Vector3(2,2,2) would have the same effect as setScale(Vector3(4,4,4)) if the existing scale was 1.
Note that like rotations, scalings are oriented around the node's origin.
virtual_l2 void Ogre::Node::setInheritOrientation ( bool  inherit)

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_l2 void Ogre::Node::setInheritScale ( bool  inherit)

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.
virtual void Ogre::Node::setListener ( Listener listener)
inlinevirtual

Sets a listener for this Node.

Remarks
Note for size and performance reasons only one listener per node is allowed.

Reimplemented in Ogre::SceneNode.

Definition at line 665 of file OgreNode.h.

void Ogre::Node::setName ( const String name)
inline

Sets a custom name for this node.

Doesn't have to be unique

Definition at line 198 of file OgreNode.h.

virtual_l1 void Ogre::Node::setOrientation ( Quaternion  q)

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. Don't call this function too often, as we need to convert to SoA
Note that rotations are oriented around the node's origin.
virtual_l1 void Ogre::Node::setOrientation ( Real  w,
Real  x,
Real  y,
Real  z 
)

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. Don't call this function too often, as we need to convert to SoA
Note that rotations are oriented around the node's origin.
void Ogre::Node::setParent ( Node parent)
protected

Only available internally - notification of parent. Can't be null.

virtual_l1 void Ogre::Node::setPosition ( const Vector3 pos)

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

Remarks
Don't call this function too often, as we need to convert to SoA
virtual_l1 void Ogre::Node::setPosition ( Real  x,
Real  y,
Real  z 
)

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

Remarks
Don't call this function too often, as we need to convert to SoA
virtual_l1 void Ogre::Node::setScale ( const Vector3 scale)

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. Don't call this function too often, as we need to convert to SoA
Note that like rotations, scalings are oriented around the node's origin.
virtual_l1 void Ogre::Node::setScale ( Real  x,
Real  y,
Real  z 
)

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. Don't call this function too often, as we need to convert to SoA
Note that like rotations, scalings are oriented around the node's origin.
virtual bool Ogre::Node::setStatic ( bool  bStatic)
virtual

Turns this Node into static or dynamic.

Remarks
Switching between dynamic and static has some overhead and forces to update all static scene when converted to static. So don't do it frequently. Static objects are not updated every frame, only when requested explicitly. Use this feature if you plan to have this object unaltered for a very long times
Changing this attribute to a node will cause to switch the attribute to all attached entities (but not children or parent nodes; it's perfectly valid and useful to have dynamic children of a static parent; although the opposite (static children, dynamic parent) is probably a bug.
Returns
True if setStatic made an actual change. False otherwise. Can fail because the object was already static/dynamic, or because switching is not supported

Reimplemented in Ogre::SceneNode.

virtual OGRE_DEPRECATED void Ogre::Node::setUserAny ( const Any anything)
inlinevirtual
Deprecated:
use UserObjectBindings::setUserAny via getUserObjectBindings() instead.

Sets any kind of user value on this object.

Remarks
This method allows you to associate any user value you like with this Node. This can be a pointer back to one of your own classes for instance.

Definition at line 704 of file OgreNode.h.

virtual_l2 void Ogre::Node::translate ( const Vector3 d,
TransformSpace  relativeTo = TS_PARENT 
)

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_l2 void Ogre::Node::translate ( Real  x,
Real  y,
Real  z,
TransformSpace  relativeTo = TS_PARENT 
)

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
xReal x value representing the translation.
yReal y value representing the translation.
zReal z value representing the translation.
relativeToThe space which this transform is relative to.
virtual_l2 void Ogre::Node::translate ( const Matrix3 axes,
const Vector3 move,
TransformSpace  relativeTo = TS_PARENT 
)

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 containing 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_l2 void Ogre::Node::translate ( const Matrix3 axes,
Real  x,
Real  y,
Real  z,
TransformSpace  relativeTo = TS_PARENT 
)

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 containing 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.
xThe x translation component relative to the axes above.
yThe y translation component relative to the axes above.
zThe z translation component relative to the axes above.
relativeToThe space which this transform is relative to.
void Ogre::Node::unsetParent ( void  )
protected
static void Ogre::Node::updateAllTransforms ( const size_t  numNodes,
Transform  t 
)
static

SceneManager::updateAllTransforms()

Remarks
We don't pass by reference on purpose (avoid implicit aliasing)
virtual void Ogre::Node::updateFromParentImpl ( void  )
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 Ogre::PCZSceneNode.

virtual_l2 void Ogre::Node::yaw ( const Radian angle,
TransformSpace  relativeTo = TS_LOCAL 
)

Rotate the node around the Y-axis.

Member Data Documentation

bool Ogre::Node::mCachedTransformOutOfDate
mutableprotected

Definition at line 159 of file OgreNode.h.

NodeVec Ogre::Node::mChildren
protected

Collection of pointers to direct children; hashmap for efficiency.

Definition at line 125 of file OgreNode.h.

DebugRenderable* Ogre::Node::mDebug
protected

Definition at line 168 of file OgreNode.h.

uint16 Ogre::Node::mDepthLevel
protected

Depth level in the hierarchy tree (0: Root node, 1: Child of root, etc)

Definition at line 121 of file OgreNode.h.

size_t Ogre::Node::mGlobalIndex

Index in the vector holding this node reference (could be our parent node, or a global array tracking all created nodes to avoid memory leaks).

Used for O(1) removals.

Remarks
It is the parent (or our creator) the one that sets this value, not ourselves. Do NOT modify it manually.

Definition at line 180 of file OgreNode.h.

Listener* Ogre::Node::mListener
protected

Node listener - only one allowed (no list) for size & performance reasons.

Definition at line 163 of file OgreNode.h.

String Ogre::Node::mName
protected

Friendly name of this node, can be empty.

Definition at line 130 of file OgreNode.h.

NodeMemoryManager* Ogre::Node::mNodeMemoryManager
protected

The memory manager used to allocate the Transform.

Definition at line 166 of file OgreNode.h.

Node* Ogre::Node::mParent
protected

Pointer to parent node.

Definition at line 123 of file OgreNode.h.

size_t Ogre::Node::mParentIndex

Index in the vector holding this node reference (could be our parent node, or a global array tracking all created nodes to avoid memory leaks).

Used for O(1) removals.

Remarks
It is the parent (or our creator) the one that sets this value, not ourselves. Do NOT modify it manually.

Definition at line 182 of file OgreNode.h.

Transform Ogre::Node::mTransform
protected

All the transform data needed in SoA form.

Definition at line 127 of file OgreNode.h.

UserObjectBindings Ogre::Node::mUserObjectBindings
protected

User objects binding.

Definition at line 171 of file OgreNode.h.


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