#include <OgreSceneNode.h>
Inheritance diagram for Ogre::SceneNode:
Public Types | |
typedef HashMap< String, MovableObject *, _StringHash > | ObjectMap |
typedef MapIterator< ObjectMap > | ObjectIterator |
typedef HashMap< String, Node *, _StringHash > | ChildNodeMap |
typedef MapIterator< ChildNodeMap > | ChildNodeIterator |
Public Methods | |
SceneNode (SceneManager *creator) | |
Constructor, only to be called by the creator SceneManager. More... | |
SceneNode (SceneManager *creator, const String &name) | |
Constructor, only to be called by the creator SceneManager. More... | |
~SceneNode () | |
SceneNode * | createChild (const Vector3 &translate=Vector3::ZERO, const Quaternion &rotate=Quaternion::IDENTITY) |
Creates a new unnamed Node as a child of this node. More... | |
SceneNode * | createChild (const String &name, const Vector3 &translate=Vector3::ZERO, const Quaternion &rotate=Quaternion::IDENTITY) |
Creates a new named Node as a child of this node. More... | |
SceneNode * | getChild (unsigned short index) const |
Gets a pointer to a child node. More... | |
SceneNode * | getChild (const String &name) const |
Gets a named child node. More... | |
SceneNode * | removeChild (unsigned short index) |
Drops the specified child from this node. More... | |
SceneNode * | removeChild (const String &name) |
Drops the named child from this node. More... | |
void | attachObject (MovableObject *obj) |
Adds an instance of a scene object to this node. More... | |
unsigned short | numAttachedObjects (void) |
Reports the number of objects attached to this node. More... | |
MovableObject * | getAttachedObject (unsigned short index) |
Retrieves a pointer to an attached object. More... | |
MovableObject * | getAttachedObject (const String &name) |
Retrieves a pointer to an attached object. More... | |
MovableObject * | detachObject (unsigned short index) |
Detaches the indexed object from this scene node. More... | |
MovableObject * | detachObject (const String &name) |
Detaches the named object from this node and returns a pointer to it. More... | |
void | detachAllObjects (void) |
Detaches all objects attached to this node. More... | |
void | attachLight (Light *l) |
Adds a light to this node. More... | |
void | attachCamera (Camera *ent) |
Adds a Camera to this node. More... | |
virtual void | _update (bool updateChildren, bool parentHasChanged) |
Internal method to update the Node. More... | |
void | _findVisibleObjects (Camera *cam, RenderQueue *queue, bool includeChildren=true, bool displayNodes=false) |
Internal method which locates any visible objects attached to this node and adds them to the passed in queue. More... | |
AxisAlignedBox | _getWorldAABB (void) const |
Gets the axis-aligned bounding box of this node (and hence all subnodes). More... | |
ObjectIterator | getAttachedObjectIterator (void) |
Retrieves an iterator which can be used to efficiently step through the objects attached to this node. More... | |
SceneManager * | getCreator (void) |
Gets the creator of this scene node. More... | |
void | removeAndDestroyChild (const String &name) |
This method removes and destroys the named child and all of its children. More... | |
void | removeAndDestroyChild (unsigned short index) |
This method removes and destroys the child and all of its children. More... | |
void | removeAndDestroyAllChildren (void) |
Removes and destroys all children of this node. More... | |
void | showBoundingBox (bool bShow) |
Allows the showing of the node's bounding box. More... | |
void | _addBoundingBoxToQueue (RenderQueue *queue) |
Add the bounding box to the rendering queue. More... | |
bool | getShowBoundingBox () |
This allows scene managers to determine if the node's bounding box should be added to the rendering queue. More... | |
const String & | getName (void) const |
Returns the name of the node. More... | |
virtual Node * | getParent (void) const |
Gets this node's parent (NULL if this is the root). More... | |
virtual const Quaternion & | getOrientation () 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 | resetOrientation (void) |
Resets the nodes orientation (local axes as world axes, no rotation). More... | |
virtual void | setPosition (const Vector3 &pos) |
Sets the position of the node relative to it's parent. More... | |
virtual void | setPosition (Real x, Real y, Real z) |
Sets the position of the node relative to it's parent. More... | |
virtual const Vector3 & | getPosition (void) const |
Gets the position of the node relative to it's parent. More... | |
virtual void | setScale (const Vector3 &scale) |
Sets the scaling factor applied to this node. More... | |
virtual void | setScale (Real x, Real y, Real z) |
Sets the scaling factor applied to this node. More... | |
virtual const Vector3 & | getScale (void) const |
Gets the scaling factor of this 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 Vector3 &scale) |
Scales the node, combining it's current scale with the passed in scaling factor. More... | |
virtual void | scale (Real x, Real y, Real z) |
Scales the node, combining it's current scale with the passed in scaling factor. More... | |
virtual void | translate (const Vector3 &d) |
Moves the node along the cartesian axes. More... | |
virtual void | translate (Real x, Real y, Real z) |
Moves the node along the cartesian axes. More... | |
virtual void | translate (const Matrix3 &axes, const Vector3 &move) |
Moves the node along arbitrary axes. More... | |
virtual void | translate (const Matrix3 &axes, Real x, Real y, Real z) |
Moves the node along arbitrary axes. More... | |
virtual void | roll (Real degrees) |
Rotate the node around the Z-axis. More... | |
virtual void | pitch (Real degrees) |
Rotate the node around the X-axis. More... | |
virtual void | yaw (Real degrees) |
Rotate the node around the Y-axis. More... | |
virtual void | rotate (const Vector3 &axis, Real degrees) |
Rotate the node around an arbitrary axis. More... | |
virtual void | rotate (const Quaternion &q) |
Rotate the node around an aritrary axis using a Quarternion. More... | |
virtual Matrix3 | getLocalAxes (void) |
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... | |
ChildNodeIterator | getChildIterator (void) |
Retrieves an iterator for efficiently looping through all children of this node. More... | |
virtual void | removeAllChildren (void) |
Removes all child Nodes attached to this node. More... | |
virtual const Quaternion & | _getDerivedOrientation (void) const |
Gets the orientation of the node as derived from all parents. More... | |
virtual const Vector3 & | _getDerivedPosition (void) const |
Gets the position of the node as derived from all parents. More... | |
virtual const Vector3 & | _getDerivedScale (void) const |
Gets the scaling factor of the node as derived from all parents. More... | |
virtual Matrix4 | _getFullTransform (void) |
Gets the full transformation matrix for this node. More... | |
Material * | getMaterial (void) const |
Overridden from Renderable. More... | |
void | getRenderOperation (RenderOperation &rend) |
Overridden from Renderable. More... | |
void | getWorldTransforms (Matrix4 *xform) |
Overridden from Renderable. More... | |
virtual void | setInitialState (void) |
Sets the current transform of this node to be the 'initial state' ie that position / orientation / scale to be used as a basis for delta values used in keyframe animation. More... | |
virtual void | resetToInitialState (void) |
Resets the position / orientation / scale of this node to it's initial state, see setInitialState for more info. More... | |
virtual const Vector3 & | getInitialPosition (void) const |
Gets the initial position of this node, see setInitialState for more info. More... | |
virtual const Quaternion & | getInitialOrientation (void) const |
Gets the initial orientation of this node, see setInitialState for more info. More... | |
virtual const Vector3 & | getInitialScale (void) const |
Gets the initial position of this node, see setInitialState for more info. More... | |
virtual void | _weightedTransform (Real weight, const Vector3 &translate, const Quaternion &rotate, const Vector3 &scale) |
Internal weighted transform method. More... | |
Real | getSquaredViewDepth (const Camera *cam) const |
Overridden, see Renderable. More... | |
virtual void | needUpdate () |
To be called in the event of transform changes to this node that require it's recalculation. More... | |
virtual void | requestUpdate (Node *child) |
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... | |
virtual unsigned short | getNumWorldTransforms (void) |
Returns the number of world transform matrices this renderable requires. More... | |
virtual bool | useIdentityProjection (void) |
Returns whether or not to use an 'identity' projection. More... | |
virtual bool | useIdentityView (void) |
Returns whether or not to use an 'identity' projection. More... | |
virtual SceneDetailLevel | getRenderDetail () |
Returns the preferred rasterisation mode of this renderable. More... | |
Protected Methods | |
virtual void | _updateBounds (void) |
Tells the SceneNode to update the world bound info it stores. More... | |
Node * | createChildImpl (void) |
See Node. More... | |
Node * | createChildImpl (const String &name) |
See Node. More... | |
void | setParent (Node *parent) |
Only available internally - notification of parent. More... | |
virtual void | _updateFromParent (void) const |
Triggers the node to update it's combined transforms. More... | |
void | makeTransform (const Vector3 &position, const Vector3 &scale, const Quaternion &orientation, Matrix4 &destMatrix) |
Internal method for building a Matrix4 from orientation / scale / position. More... | |
void | makeInverseTransform (const Vector3 &position, const Vector3 &scale, const Quaternion &orientation, Matrix4 &destMatrix) |
Internal method for building an inverse Matrix4 from orientation / scale / position. More... | |
Protected Attributes | |
ObjectMap | mObjectsByName |
WireBoundingBox * | mWireBoundingBox |
Pointer to a Wire Bounding Box for this Node. More... | |
bool | mShowBoundingBox |
Flag that determines if the bounding box of the node should be displayed. More... | |
SceneManager * | mCreator |
SceneManager which created this node. More... | |
AxisAlignedBox | mWorldAABB |
World-Axis aligned bounding box, updated only through _update. More... | |
Node * | mParent |
Pointer to parent node. More... | |
ChildNodeMap | mChildren |
Collection of pointers to direct children; hashmap for efficiency. More... | |
std::list< Node * > | mChildrenToUpdate |
List of children which need updating, used if self is not out of date but children are. More... | |
bool | mNeedUpdate |
Flag to indicate own transform is out of date. 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... | |
Vector3 | mPosition |
Stores the position/translation of the node relative to its parent. More... | |
Vector3 | mScale |
Stores the scaling factor applied to this node. More... | |
bool | mInheritScale |
Stores whether this node inherits scale from it's parent. More... | |
Quaternion | mDerivedOrientation |
Cached combined orientation. More... | |
Vector3 | mDerivedPosition |
Cached combined position. More... | |
Vector3 | mDerivedScale |
Cached combined scale. More... | |
Vector3 | mInitialPosition |
The position to use as a base for keyframe animation. More... | |
Quaternion | mInitialOrientation |
The orientation to use as a base for keyframe animation. More... | |
Vector3 | mInitialScale |
The scale to use as a base for keyframe animation. More... | |
Real | mAccumAnimWeight |
Vector3 | mTransFromInitial |
Quaternion | mRotFromInitial |
Vector3 | mScaleFromInitial |
Static Protected Attributes | |
unsigned long | msNextGeneratedNameExt = 1 |
Incremented count for next name extension. More... |
|
|
|
|
|
|
|
|
|
Constructor, only to be called by the creator SceneManager.
|
|
Constructor, only to be called by the creator SceneManager.
|
|
|
|
Add the bounding box to the rendering queue.
|
|
Internal method which locates any visible objects attached to this node and adds them to the passed in queue.
|
|
Gets the orientation of the node as derived from all parents.
|
|
Gets the position of the node as derived from all parents.
|
|
Gets the scaling factor of the node as derived from all parents.
|
|
Gets the full transformation matrix for this node.
|
|
Gets the axis-aligned bounding box of this node (and hence all subnodes).
|
|
Internal method to update the Node.
Reimplemented from Ogre::Node. |
|
Tells the SceneNode to update the world bound info it stores.
Reimplemented in Ogre::OctreeNode. |
|
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. |
|
Internal weighted transform method.
|
|
Adds a (precreated) child scene node to this node.
|
|
Adds a Camera to this node.
|
|
Adds a light to this node.
|
|
Adds an instance of a scene object to this node.
|
|
Called by children to notify their parent that they no longer need an update.
|
|
Creates a new named Node as a child of this node.
Reimplemented from Ogre::Node. |
|
Creates a new unnamed Node as a child of this node.
Reimplemented from Ogre::Node. |
|
See Node.
Implements Ogre::Node. |
|
See Node.
Implements Ogre::Node. |
|
Detaches all objects attached to this node.
|
|
Detaches the named object from this node and returns a pointer to it.
|
|
Detaches the indexed object from this scene node.
|
|
Retrieves a pointer to an attached object.
|
|
Retrieves a pointer to an attached object.
|
|
Retrieves an iterator which can be used to efficiently step through the objects attached to this node.
|
|
Gets a named child node.
Reimplemented from Ogre::Node. |
|
Gets a pointer to a child node.
Reimplemented from Ogre::Node. |
|
Retrieves an iterator for efficiently looping through all children of this node.
|
|
Gets the creator of this scene node.
|
|
Returns true if this node is affected by scaling factors applied to the parent node.
|
|
Gets the initial orientation of this node, see setInitialState for more info.
|
|
Gets the initial position of this node, see setInitialState for more info.
|
|
Gets the initial position of this node, see setInitialState for more info.
|
|
Gets a matrix whose columns are the local axes based on the nodes orientation relative to it's parent.
|
|
Overridden from Renderable.
Implements Ogre::Renderable. |
|
Returns the name of the node.
|
|
Returns the number of world transform matrices this renderable requires.
Reimplemented in Ogre::SubEntity. |
|
Returns a quaternion representing the nodes orientation.
|
|
Gets this node's parent (NULL if this is the root).
|
|
Gets the position of the node relative to it's parent.
|
|
Returns the preferred rasterisation mode of this renderable.
Reimplemented in Ogre::SubEntity. |
|
Overridden from Renderable.
Implements Ogre::Renderable. Reimplemented in Ogre::OctreeNode. |
|
Gets the scaling factor of this node.
|
|
This allows scene managers to determine if the node's bounding box should be added to the rendering queue.
|
|
Overridden, see Renderable.
Implements Ogre::Renderable. |
|
Overridden from Renderable.
Implements Ogre::Renderable. |
|
Internal method for building an inverse Matrix4 from orientation / scale / position.
|
|
Internal method for building a Matrix4 from orientation / scale / position.
|
|
To be called in the event of transform changes to this node that require it's recalculation.
|
|
Reports the number of objects attached to this node.
|
|
Reports the number of child nodes under this one.
|
|
Rotate the node around the X-axis.
|
|
Removes all child Nodes attached to this node. Does not delete the nodes, just detaches them from this parent, potentially to be reattached elsewhere. |
|
Removes and destroys all children of this node.
|
|
This method removes and destroys the child and all of its children.
|
|
This method removes and destroys the named child and all of its children.
|
|
Drops the named child from this node. Does not delete the node, just detaches it from this parent, potentially to be reattached elsewhere. Reimplemented from Ogre::Node. |
|
Drops the specified child from this node. Does not delete the node, just detaches it from this parent, potentially to be reattached elsewhere.
Reimplemented from Ogre::Node. |
|
Called by children to notify their parent that they need an update.
|
|
Resets the nodes orientation (local axes as world axes, no rotation).
|
|
Resets the position / orientation / scale of this node to it's initial state, see setInitialState for more info.
|
|
Rotate the node around the Z-axis.
|
|
Rotate the node around an aritrary axis using a Quarternion.
|
|
Rotate the node around an arbitrary axis.
|
|
Scales the node, combining it's current scale with the passed in scaling factor.
|
|
Scales the node, combining it's current scale with the passed in scaling factor.
|
|
Tells the node whether it should inherit scaling factors from it's parent node.
|
|
Sets the current transform of this node to be the 'initial state' ie that position / orientation / scale to be used as a basis for delta values used in keyframe animation.
|
|
Sets the orientation of this node via a quaternion.
|
|
Only available internally - notification of parent.
|
|
Sets the position of the node relative to it's parent.
|
|
Sets the position of the node relative to it's parent.
|
|
Sets the scaling factor applied to this node.
|
|
Sets the scaling factor applied to this node.
|
|
Allows the showing of the node's bounding box.
|
|
Moves the node along arbitrary axes.
|
|
Moves the node along arbitrary axes.
|
|
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
|
|
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
|
|
Returns whether or not to use an 'identity' projection.
Reimplemented in Ogre::GuiElement. |
|
Returns whether or not to use an 'identity' projection.
Reimplemented in Ogre::GuiElement. |
|
Rotate the node around the Y-axis.
|
|
|
|
Collection of pointers to direct children; hashmap for efficiency.
|
|
List of children which need updating, used if self is not out of date but children are.
|
|
SceneManager which created this node.
|
|
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. |
|
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. |
|
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. |
|
Stores whether this node inherits scale from it's parent.
|
|
The orientation to use as a base for keyframe animation.
|
|
The position to use as a base for keyframe animation.
|
|
The scale to use as a base for keyframe animation.
|
|
Friendly name of this node, can be automatically generated if you don't care.
|
|
Flag to indicate own transform is out of date.
|
|
|
|
Stores the orientation of the node relative to it's parent.
|
|
Pointer to parent node.
|
|
Stores the position/translation of the node relative to its parent.
|
|
|
|
Stores the scaling factor applied to this node.
|
|
|
|
Flag that determines if the bounding box of the node should be displayed.
|
|
Incremented count for next name extension.
|
|
|
|
Pointer to a Wire Bounding Box for this Node.
|
|
World-Axis aligned bounding box, updated only through _update.
|
Copyright © 2002 by The OGRE Team