Go to the documentation of this file.
659 virtual void _update(
bool updateChildren,
bool parentHasChanged);
virtual void setPosition(const Vector3 &pos)
Sets the position of the node relative to it's parent.
Inner class for displaying debug renderable for Node.
virtual void _setDerivedPosition(const Vector3 &pos)
Sets the final world position of the node directly.
virtual const Vector3 & _getDerivedPosition(void) const
Gets the position of the node as derived from all parents.
virtual void pitch(const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
Rotate the node around the X-axis.
HashMap< String, Node * > ChildNodeMap
const String & getName(void) const
Returns the name of the node.
Quaternion mDerivedOrientation
Cached combined orientation.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
static const Vector3 ZERO
virtual void translate(const Vector3 &d, TransformSpace relativeTo=TS_PARENT)
Moves the node along the Cartesian axes.
virtual void resetToInitialState(void)
Resets the position / orientation / scale of this node to it's initial state, see setInitialState for...
virtual void setInheritOrientation(bool inherit)
Tells the node whether it should inherit orientation from it's parent node.
virtual Node * removeChild(unsigned short index)
Drops the specified child from this node.
A viewpoint from which the scene will be rendered.
@ TS_LOCAL
Transform is relative to the local space.
virtual void needUpdate(bool forceParentUpdate=false)
To be called in the event of transform changes to this node that require it's recalculation.
virtual ConstChildNodeIterator getChildIterator(void) const
Retrieves an iterator for efficiently looping through all children of this node.
String mName
Friendly name of this node, can be automatically generated if you don't care.
virtual const Quaternion & getInitialOrientation(void) const
Gets the initial orientation of this node, see setInitialState for more info.
MapIterator< ChildNodeMap > ChildNodeIterator
bool mNeedParentUpdate
Flag to indicate own transform from parent is out of date.
virtual Quaternion convertWorldToLocalOrientation(const Quaternion &worldOrientation)
Gets the local orientation, relative to this node, of the given world-space orientation.
virtual void scale(const Vector3 &scale)
Scales the node, combining it's current scale with the passed in scaling factor.
UserObjectBindings mUserObjectBindings
User objects binding.
A 3x3 matrix which can represent rotations around axes.
ChildUpdateSet mChildrenToUpdate
List of children which need updating, used if self is not out of date but children are.
Variant type that can hold Any other type.
virtual void setListener(Listener *listener)
Sets a listener for this Node.
virtual void setScale(const Vector3 &scale)
Sets the scaling factor applied to this node.
Vector3 mPosition
Stores the position/translation of the node relative to its parent.
virtual bool getInheritScale(void) const
Returns true if this node is affected by scaling factors applied to the parent node.
virtual Node * createChildImpl(const String &name)=0
Internal method for creating a new child node - must be overridden per subclass.
virtual Matrix3 getLocalAxes(void) const
Gets a matrix whose columns are the local axes based on the nodes orientation relative to it's parent...
virtual Vector3 convertLocalToWorldPosition(const Vector3 &localPos)
Gets the world position of a point in the node local space useful for simple transforms that don't re...
virtual void setInitialState(void)
Sets the current transform of this node to be the 'initial state' ie that position / orientation / sc...
virtual Node * createChild(const Vector3 &translate=Vector3::ZERO, const Quaternion &rotate=Quaternion::IDENTITY)
Creates an unnamed new Node as a child of this node.
virtual void removeAllChildren(void)
Removes all child Nodes attached to this node.
virtual const Vector3 & getPosition(void) const
Gets the position of the node relative to it's parent.
virtual OGRE_DEPRECATED void setUserAny(const Any &anything)
Matrix4 mCachedTransform
Cached derived transform as a 4x4 matrix.
void getWorldTransforms(Matrix4 *xform) const
Gets the world transform matrix / matrices for this renderable object.
Class that provides convenient interface to establish a linkage between custom user application objec...
virtual void translate(const Matrix3 &axes, const Vector3 &move, TransformSpace relativeTo=TS_PARENT)
Moves the node along arbitrary axes.
UserObjectBindings & getUserObjectBindings()
Return an instance of user objects binding associated with this class.
virtual Listener * getListener(void) const
Gets the current listener for this Node.
virtual DebugRenderable * getDebugRenderable(Real scaling)
Get a debug renderable for rendering the Node.
virtual void rotate(const Vector3 &axis, const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
Rotate the node around an arbitrary axis.
virtual const Quaternion & _getDerivedOrientation(void) const
Gets the orientation of the node as derived from all parents.
virtual void translate(const Matrix3 &axes, Real x, Real y, Real z, TransformSpace relativeTo=TS_PARENT)
Moves the node along arbitrary axes.
Implementation of a Quaternion, i.e.
virtual const Vector3 & getInitialScale(void) const
Gets the initial position of this node, see setInitialState for more info.
virtual const Matrix4 & _getFullTransform(void) const
Gets the full transformation matrix for this node.
vector< Node * >::type QueuedUpdates
virtual void addChild(Node *child)
Adds a (precreated) child scene node to this node.
Node * mParent
Pointer to parent node.
TransformSpace
Enumeration denoting the spaces which a transform can be relative to.
Listener which gets called back on Node events.
Class encapsulating a standard 4x4 homogeneous matrix.
Utility class to generate a sequentially numbered series of names.
virtual const Quaternion & getOrientation() const
Returns a quaternion representing the nodes orientation.
static void queueNeedUpdate(Node *n)
Queue a 'needUpdate' call to a node safely.
bool mInheritScale
Stores whether this node inherits scale from it's parent.
virtual void resetOrientation(void)
Resets the nodes orientation (local axes as world axes, no rotation).
virtual void scale(Real x, Real y, Real z)
Scales the node, combining it's current scale with the passed in scaling factor.
virtual void setOrientation(const Quaternion &q)
Sets the orientation of this node via a quaternion.
virtual bool getInheritOrientation(void) const
Returns true if this node is affected by orientation applied to the parent node.
virtual void nodeDestroyed(const Node *)
Node is being destroyed.
static QueuedUpdates msQueuedUpdates
Wrapper class which indicates a given angle value is in Radians.
virtual void _update(bool updateChildren, bool parentHasChanged)
Internal method to update the Node.
Real getSquaredViewDepth(const Camera *cam) const
Returns the camera-relative squared depth of this renderable.
virtual Node * createChildImpl(void)=0
Internal method for creating a new child node - must be overridden per subclass.
Vector3 mDerivedPosition
Cached combined position.
@ TS_PARENT
Transform is relative to the space of the parent node.
set< Node * >::type ChildUpdateSet
virtual const Vector3 & getScale(void) const
Gets the scaling factor of this node.
virtual Node * getParent(void) const
Gets this node's parent (NULL if this is the root).
const LightList & getLights(void) const
Gets a list of lights, ordered relative to how close they are to this renderable.
virtual void setParent(Node *parent)
Only available internally - notification of parent.
virtual void setScale(Real x, Real y, Real z)
Sets the scaling factor applied to this node.
Vector3 mScale
Stores the scaling factor applied to this node.
virtual Quaternion convertLocalToWorldOrientation(const Quaternion &localOrientation)
Gets the world orientation of an orientation in the node local space useful for simple transforms tha...
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
virtual Node * getChild(unsigned short index) const
Gets a pointer to a child node.
virtual OGRE_DEPRECATED const Any & getUserAny(void) const
bool mInheritOrientation
Stores whether this node inherits orientation from it's parent.
ConstMapIterator< ChildNodeMap > ConstChildNodeIterator
virtual void setInheritScale(bool inherit)
Tells the node whether it should inherit scaling factors from it's parent node.
virtual ChildNodeIterator getChildIterator(void)
Retrieves an iterator for efficiently looping through all children of this node.
DebugRenderable(Node *parent)
virtual Node * removeChild(Node *child)
Drops the specified child from this node.
virtual unsigned short numChildren(void) const
Reports the number of child nodes under this one.
bool mParentNotified
Flag indicating that parent has been notified about update request.
Vector3 mInitialPosition
The position to use as a base for keyframe animation.
const MaterialPtr & getMaterial(void) const
Retrieves a weak reference to the material this renderable object uses.
virtual void nodeDetached(const Node *)
Node has been detached from a parent.
virtual const Vector3 & _getDerivedScale(void) const
Gets the scaling factor of the node as derived from all parents.
virtual Node * 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.
virtual const Vector3 & getInitialPosition(void) const
Gets the initial position of this node, see setInitialState for more info.
virtual void translate(Real x, Real y, Real z, TransformSpace relativeTo=TS_PARENT)
Moves the node along the Cartesian axes.
Abstract class defining the interface all renderable objects must implement.
virtual void rotate(const Quaternion &q, TransformSpace relativeTo=TS_LOCAL)
Rotate the node around an aritrary axis using a Quarternion.
ChildNodeMap mChildren
Collection of pointers to direct children; hashmap for efficiency.
Quaternion mInitialOrientation
The orientation to use as a base for keyframe animation.
static const Quaternion IDENTITY
float Real
Software floating point type.
Node(const String &name)
Constructor, should only be called by parent, not directly.
Concrete IteratorWrapper for const access to the underlying key-value container.
static NameGenerator msNameGenerator
Incremented count for next name extension.
Vector3 mDerivedScale
Cached combined scale.
static void processQueuedUpdates(void)
Process queued 'needUpdate' calls.
virtual Real getSquaredViewDepth(const Camera *cam) const
Helper function, get the squared view depth.
Listener * mListener
Node listener - only one allowed (no list) for size & performance reasons.
Quaternion mOrientation
Stores the orientation of the node relative to it's parent.
virtual void nodeUpdated(const Node *)
Called when a node gets updated.
Class representing a general-purpose node an articulated scene graph.
virtual void yaw(const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
Rotate the node around the Y-axis.
virtual void _setDerivedOrientation(const Quaternion &q)
Sets the final world orientation of the node directly.
void getRenderOperation(RenderOperation &op)
Gets the render operation required to send this object to the frame buffer.
virtual void _updateFromParent(void) const
Triggers the node to update it's combined transforms.
virtual void setOrientation(Real w, Real x, Real y, Real z)
Sets the orientation of this node via quaternion parameters.
Vector3 mInitialScale
The scale to use as a base for keyframe animation.
bool mCachedTransformOutOfDate
virtual Node * removeChild(const String &name)
Drops the named child from this node.
virtual void setPosition(Real x, Real y, Real z)
Sets the position of the node relative to it's parent.
virtual void cancelUpdate(Node *child)
Called by children to notify their parent that they no longer need an update.
virtual Vector3 convertWorldToLocalPosition(const Vector3 &worldPos)
Gets the local position, relative to this node, of the given world-space position.
virtual Node * getChild(const String &name) const
Gets a pointer to a named child node.
bool mNeedChildUpdate
Flag indicating that all children need to be updated.
virtual void updateFromParentImpl(void) const
Class-specific implementation of _updateFromParent.
Standard 3-dimensional vector.
'New' rendering operation using vertex buffers.
bool mQueuedForUpdate
Flag indicating that the node has been queued for update.
virtual void nodeAttached(const Node *)
Node has been attached to a parent.
virtual void requestUpdate(Node *child, bool forceParentUpdate=false)
Called by children to notify their parent that they need an update.
Node()
Constructor, should only be called by parent, not directly.
virtual void roll(const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
Rotate the node around the Z-axis.
const UserObjectBindings & getUserObjectBindings() const
Return an instance of user objects binding associated with this class.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.