OgreNode.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef _Node_H__
29 #define _Node_H__
30 
31 #include "OgrePrerequisites.h"
32 
33 #include "OgreCommon.h"
34 #include "OgreMatrix3.h"
35 #include "OgreMatrix4.h"
36 #include "OgreQuaternion.h"
37 #include "OgreString.h"
38 #include "OgreRenderable.h"
39 #include "OgreIteratorWrappers.h"
40 #include "OgreMesh.h"
41 #include "OgreUserObjectBindings.h"
42 #include "OgreHeaderPrefix.h"
43 
44 namespace Ogre {
45 
46  class NameGenerator;
47 
64  class _OgreExport Node : public NodeAlloc
65  {
66  public:
70  {
76  TS_WORLD
77  };
78  typedef HashMap<String, Node*> ChildNodeMap;
81 
85  {
86  public:
87  Listener() {}
88  virtual ~Listener() {}
96  virtual void nodeUpdated(const Node*) {}
98  virtual void nodeDestroyed(const Node*) {}
100  virtual void nodeAttached(const Node*) {}
102  virtual void nodeDetached(const Node*) {}
103  };
104 
106  class DebugRenderable : public Renderable, public NodeAlloc
107  {
108  protected:
113  public:
116  const MaterialPtr& getMaterial(void) const;
118  void getWorldTransforms(Matrix4* xform) const;
119  Real getSquaredViewDepth(const Camera* cam) const;
120  const LightList& getLights(void) const;
121  void setScaling(Real s) { mScaling = s; }
122 
123  };
124 
125  protected:
130 
135  mutable bool mNeedParentUpdate;
137  mutable bool mNeedChildUpdate;
139  mutable bool mParentNotified ;
141  mutable bool mQueuedForUpdate;
142 
145 
148 
151 
154 
157 
160 
163 
165  virtual void setParent(Node* parent);
166 
175 
184 
193 
200  virtual void _updateFromParent(void) const;
201 
208  virtual void updateFromParentImpl(void) const;
209 
210 
212  virtual Node* createChildImpl(void) = 0;
213 
215  virtual Node* createChildImpl(const String& name) = 0;
216 
223 
227 
230 
233 
235 
238 
239  public:
244  Node();
249  Node(const String& name);
250 
251  virtual ~Node();
252 
254  const String& getName(void) const;
255 
258  virtual Node* getParent(void) const;
259 
262  virtual const Quaternion & getOrientation() const;
263 
277  virtual void setOrientation( const Quaternion& q );
278 
292  virtual void setOrientation( Real w, Real x, Real y, Real z);
293 
307  virtual void resetOrientation(void);
308 
311  virtual void setPosition(const Vector3& pos);
312 
315  virtual void setPosition(Real x, Real y, Real z);
316 
319  virtual const Vector3 & getPosition(void) const;
320 
333  virtual void setScale(const Vector3& scale);
334 
347  virtual void setScale(Real x, Real y, Real z);
348 
351  virtual const Vector3 & getScale(void) const;
352 
366  virtual void setInheritOrientation(bool inherit);
367 
381  virtual bool getInheritOrientation(void) const;
382 
395  virtual void setInheritScale(bool inherit);
396 
401  virtual bool getInheritScale(void) const;
402 
412  virtual void scale(const Vector3& scale);
413 
423  virtual void scale(Real x, Real y, Real z);
424 
434  virtual void translate(const Vector3& d, TransformSpace relativeTo = TS_PARENT);
448  virtual void translate(Real x, Real y, Real z, TransformSpace relativeTo = TS_PARENT);
468  virtual void translate(const Matrix3& axes, const Vector3& move, TransformSpace relativeTo = TS_PARENT);
492  virtual void translate(const Matrix3& axes, Real x, Real y, Real z, TransformSpace relativeTo = TS_PARENT);
493 
496  virtual void roll(const Radian& angle, TransformSpace relativeTo = TS_LOCAL);
497 
500  virtual void pitch(const Radian& angle, TransformSpace relativeTo = TS_LOCAL);
501 
504  virtual void yaw(const Radian& angle, TransformSpace relativeTo = TS_LOCAL);
505 
508  virtual void rotate(const Vector3& axis, const Radian& angle, TransformSpace relativeTo = TS_LOCAL);
509 
512  virtual void rotate(const Quaternion& q, TransformSpace relativeTo = TS_LOCAL);
513 
516  virtual Matrix3 getLocalAxes(void) const;
517 
524  virtual Node* createChild(
525  const Vector3& translate = Vector3::ZERO,
526  const Quaternion& rotate = Quaternion::IDENTITY );
527 
537  virtual Node* createChild(const String& name, const Vector3& translate = Vector3::ZERO, const Quaternion& rotate = Quaternion::IDENTITY);
538 
543  virtual void addChild(Node* child);
544 
547  virtual unsigned short numChildren(void) const;
548 
553  virtual Node* getChild(unsigned short index) const;
554 
557  virtual Node* getChild(const String& name) const;
558 
570 
582 
590  virtual Node* removeChild(unsigned short index);
598  virtual Node* removeChild(Node* child);
599 
605  virtual Node* removeChild(const String& name);
609  virtual void removeAllChildren(void);
610 
615  virtual void _setDerivedPosition(const Vector3& pos);
616 
622  virtual void _setDerivedOrientation(const Quaternion& q);
623 
626  virtual const Quaternion & _getDerivedOrientation(void) const;
627 
630  virtual const Vector3 & _getDerivedPosition(void) const;
631 
634  virtual const Vector3 & _getDerivedScale(void) const;
635 
645  virtual const Matrix4& _getFullTransform(void) const;
646 
659  virtual void _update(bool updateChildren, bool parentHasChanged);
660 
666  virtual void setListener(Listener* listener) { mListener = listener; }
667 
670  virtual Listener* getListener(void) const { return mListener; }
671 
672 
683  virtual void setInitialState(void);
684 
686  virtual void resetToInitialState(void);
687 
692  virtual const Vector3& getInitialPosition(void) const;
693 
695  virtual Vector3 convertWorldToLocalPosition( const Vector3 &worldPos );
696 
699  virtual Vector3 convertLocalToWorldPosition( const Vector3 &localPos );
700 
702  virtual Quaternion convertWorldToLocalOrientation( const Quaternion &worldOrientation );
703 
706  virtual Quaternion convertLocalToWorldOrientation( const Quaternion &localOrientation );
707 
709  virtual const Quaternion& getInitialOrientation(void) const;
710 
712  virtual const Vector3& getInitialScale(void) const;
713 
715  virtual Real getSquaredViewDepth(const Camera* cam) const;
716 
724  virtual void needUpdate(bool forceParentUpdate = false);
729  virtual void requestUpdate(Node* child, bool forceParentUpdate = false);
731  virtual void cancelUpdate(Node* child);
732 
735 
743  static void queueNeedUpdate(Node* n);
745  static void processQueuedUpdates(void);
746 
747 
755  OGRE_DEPRECATED virtual void setUserAny(const Any& anything) { getUserObjectBindings().setUserAny(anything); }
756 
760  OGRE_DEPRECATED virtual const Any& getUserAny(void) const { return getUserObjectBindings().getUserAny(); }
761 
766  UserObjectBindings& getUserObjectBindings() { return mUserObjectBindings; }
767 
772  const UserObjectBindings& getUserObjectBindings() const { return mUserObjectBindings; }
773 
774  };
778 } // namespace Ogre
779 
780 #include "OgreHeaderSuffix.h"
781 
782 #endif // _Node_H__
OgreHeaderSuffix.h
Ogre::HashedVector< Light * >
Ogre::Node::setPosition
virtual void setPosition(const Vector3 &pos)
Sets the position of the node relative to it's parent.
Ogre::Node::DebugRenderable
Inner class for displaying debug renderable for Node.
Definition: OgreNode.h:107
Ogre::Node::_setDerivedPosition
virtual void _setDerivedPosition(const Vector3 &pos)
Sets the final world position of the node directly.
Ogre::Node::_getDerivedPosition
virtual const Vector3 & _getDerivedPosition(void) const
Gets the position of the node as derived from all parents.
Ogre::Node::pitch
virtual void pitch(const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
Rotate the node around the X-axis.
Ogre::Node::ChildNodeMap
HashMap< String, Node * > ChildNodeMap
Definition: OgreNode.h:78
Ogre::Node::getName
const String & getName(void) const
Returns the name of the node.
Ogre::Node::mDerivedOrientation
Quaternion mDerivedOrientation
Cached combined orientation.
Definition: OgreNode.h:174
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:59
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::Vector3::ZERO
static const Vector3 ZERO
Definition: OgreVector3.h:800
Ogre::Node::translate
virtual void translate(const Vector3 &d, TransformSpace relativeTo=TS_PARENT)
Moves the node along the Cartesian axes.
Ogre::Node::resetToInitialState
virtual void resetToInitialState(void)
Resets the position / orientation / scale of this node to it's initial state, see setInitialState for...
Ogre::Node::~Node
virtual ~Node()
Ogre::Node::setInheritOrientation
virtual void setInheritOrientation(bool inherit)
Tells the node whether it should inherit orientation from it's parent node.
Ogre::Node::DebugRenderable::mScaling
Real mScaling
Definition: OgreNode.h:112
Ogre::Node::removeChild
virtual Node * removeChild(unsigned short index)
Drops the specified child from this node.
OgreMesh.h
Ogre::Camera
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:87
Ogre::set
Definition: OgrePrerequisites.h:520
Ogre::Node::mDebug
DebugRenderable * mDebug
Definition: OgreNode.h:234
Ogre::Node::TS_LOCAL
@ TS_LOCAL
Transform is relative to the local space.
Definition: OgreNode.h:72
Ogre::Node::needUpdate
virtual void needUpdate(bool forceParentUpdate=false)
To be called in the event of transform changes to this node that require it's recalculation.
Ogre::Node::getChildIterator
virtual ConstChildNodeIterator getChildIterator(void) const
Retrieves an iterator for efficiently looping through all children of this node.
Ogre::Node::mName
String mName
Friendly name of this node, can be automatically generated if you don't care.
Definition: OgreNode.h:144
Ogre::Node::getInitialOrientation
virtual const Quaternion & getInitialOrientation(void) const
Gets the initial orientation of this node, see setInitialState for more info.
Ogre::Node::ChildNodeIterator
MapIterator< ChildNodeMap > ChildNodeIterator
Definition: OgreNode.h:79
Ogre::Node::mNeedParentUpdate
bool mNeedParentUpdate
Flag to indicate own transform from parent is out of date.
Definition: OgreNode.h:135
Ogre::Node::convertWorldToLocalOrientation
virtual Quaternion convertWorldToLocalOrientation(const Quaternion &worldOrientation)
Gets the local orientation, relative to this node, of the given world-space orientation.
Ogre::Node::scale
virtual void scale(const Vector3 &scale)
Scales the node, combining it's current scale with the passed in scaling factor.
Ogre::Node::DebugRenderable::mMat
MaterialPtr mMat
Definition: OgreNode.h:111
Ogre::Node::mUserObjectBindings
UserObjectBindings mUserObjectBindings
User objects binding.
Definition: OgreNode.h:237
Ogre::Matrix3
A 3x3 matrix which can represent rotations around axes.
Definition: OgreMatrix3.h:69
OgreQuaternion.h
Ogre::Node::mChildrenToUpdate
ChildUpdateSet mChildrenToUpdate
List of children which need updating, used if self is not out of date but children are.
Definition: OgreNode.h:133
Ogre::Any
Variant type that can hold Any other type.
Definition: OgreAny.h:57
Ogre::Node::DebugRenderable::~DebugRenderable
~DebugRenderable()
Ogre::Node::setListener
virtual void setListener(Listener *listener)
Sets a listener for this Node.
Definition: OgreNode.h:666
Ogre::Node::setScale
virtual void setScale(const Vector3 &scale)
Sets the scaling factor applied to this node.
Ogre::Node::mPosition
Vector3 mPosition
Stores the position/translation of the node relative to its parent.
Definition: OgreNode.h:153
Ogre::Node::getInheritScale
virtual bool getInheritScale(void) const
Returns true if this node is affected by scaling factors applied to the parent node.
Ogre::Node::createChildImpl
virtual Node * createChildImpl(const String &name)=0
Internal method for creating a new child node - must be overridden per subclass.
Ogre::Node::getLocalAxes
virtual Matrix3 getLocalAxes(void) const
Gets a matrix whose columns are the local axes based on the nodes orientation relative to it's parent...
Ogre::Node::convertLocalToWorldPosition
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...
Ogre::Node::setInitialState
virtual void setInitialState(void)
Sets the current transform of this node to be the 'initial state' ie that position / orientation / sc...
Ogre::Node::createChild
virtual Node * createChild(const Vector3 &translate=Vector3::ZERO, const Quaternion &rotate=Quaternion::IDENTITY)
Creates an unnamed new Node as a child of this node.
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::Node::removeAllChildren
virtual void removeAllChildren(void)
Removes all child Nodes attached to this node.
Ogre::Node::getPosition
virtual const Vector3 & getPosition(void) const
Gets the position of the node relative to it's parent.
Ogre::Node::setUserAny
virtual OGRE_DEPRECATED void setUserAny(const Any &anything)
Definition: OgreNode.h:755
Ogre::Node::mCachedTransform
Matrix4 mCachedTransform
Cached derived transform as a 4x4 matrix.
Definition: OgreNode.h:225
Ogre::Node::DebugRenderable::getWorldTransforms
void getWorldTransforms(Matrix4 *xform) const
Gets the world transform matrix / matrices for this renderable object.
Ogre::UserObjectBindings
Class that provides convenient interface to establish a linkage between custom user application objec...
Definition: OgreUserObjectBindings.h:50
Ogre::Node::DebugRenderable::mMeshPtr
MeshPtr mMeshPtr
Definition: OgreNode.h:110
Ogre::Node::translate
virtual void translate(const Matrix3 &axes, const Vector3 &move, TransformSpace relativeTo=TS_PARENT)
Moves the node along arbitrary axes.
Ogre::Node::getUserObjectBindings
UserObjectBindings & getUserObjectBindings()
Return an instance of user objects binding associated with this class.
Definition: OgreNode.h:766
Ogre::Node::getListener
virtual Listener * getListener(void) const
Gets the current listener for this Node.
Definition: OgreNode.h:670
Ogre::Node::getDebugRenderable
virtual DebugRenderable * getDebugRenderable(Real scaling)
Get a debug renderable for rendering the Node.
Ogre::Node::rotate
virtual void rotate(const Vector3 &axis, const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
Rotate the node around an arbitrary axis.
Ogre::Node::_getDerivedOrientation
virtual const Quaternion & _getDerivedOrientation(void) const
Gets the orientation of the node as derived from all parents.
Ogre::Node::translate
virtual void translate(const Matrix3 &axes, Real x, Real y, Real z, TransformSpace relativeTo=TS_PARENT)
Moves the node along arbitrary axes.
Ogre::Quaternion
Implementation of a Quaternion, i.e.
Definition: OgreQuaternion.h:58
Ogre::Node::getInitialScale
virtual const Vector3 & getInitialScale(void) const
Gets the initial position of this node, see setInitialState for more info.
Ogre::Node::_getFullTransform
virtual const Matrix4 & _getFullTransform(void) const
Gets the full transformation matrix for this node.
Ogre::Node::QueuedUpdates
vector< Node * >::type QueuedUpdates
Definition: OgreNode.h:231
Ogre::Node::addChild
virtual void addChild(Node *child)
Adds a (precreated) child scene node to this node.
Ogre::Node::mParent
Node * mParent
Pointer to parent node.
Definition: OgreNode.h:127
Ogre::Node::TransformSpace
TransformSpace
Enumeration denoting the spaces which a transform can be relative to.
Definition: OgreNode.h:70
OgreHeaderPrefix.h
Ogre::Node::Listener
Listener which gets called back on Node events.
Definition: OgreNode.h:85
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:79
Ogre::NameGenerator
Utility class to generate a sequentially numbered series of names.
Definition: OgreNameGenerator.h:57
Ogre::Node::getOrientation
virtual const Quaternion & getOrientation() const
Returns a quaternion representing the nodes orientation.
Ogre::Node::queueNeedUpdate
static void queueNeedUpdate(Node *n)
Queue a 'needUpdate' call to a node safely.
Ogre::Node::mInheritScale
bool mInheritScale
Stores whether this node inherits scale from it's parent.
Definition: OgreNode.h:162
OgrePrerequisites.h
Ogre::Node::resetOrientation
virtual void resetOrientation(void)
Resets the nodes orientation (local axes as world axes, no rotation).
Ogre::Node::scale
virtual void scale(Real x, Real y, Real z)
Scales the node, combining it's current scale with the passed in scaling factor.
Ogre::Node::setOrientation
virtual void setOrientation(const Quaternion &q)
Sets the orientation of this node via a quaternion.
Ogre::Node::getInheritOrientation
virtual bool getInheritOrientation(void) const
Returns true if this node is affected by orientation applied to the parent node.
Ogre::Node::Listener::nodeDestroyed
virtual void nodeDestroyed(const Node *)
Node is being destroyed.
Definition: OgreNode.h:98
Ogre::Node::msQueuedUpdates
static QueuedUpdates msQueuedUpdates
Definition: OgreNode.h:232
Ogre::Radian
Wrapper class which indicates a given angle value is in Radians.
Definition: OgreMath.h:48
Ogre::Node::_update
virtual void _update(bool updateChildren, bool parentHasChanged)
Internal method to update the Node.
Ogre::Node::DebugRenderable::getSquaredViewDepth
Real getSquaredViewDepth(const Camera *cam) const
Returns the camera-relative squared depth of this renderable.
Ogre::Node::createChildImpl
virtual Node * createChildImpl(void)=0
Internal method for creating a new child node - must be overridden per subclass.
Ogre::Node::mDerivedPosition
Vector3 mDerivedPosition
Cached combined position.
Definition: OgreNode.h:183
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::Node::TS_PARENT
@ TS_PARENT
Transform is relative to the space of the parent node.
Definition: OgreNode.h:74
OgreCommon.h
Ogre::Node::ChildUpdateSet
set< Node * >::type ChildUpdateSet
Definition: OgreNode.h:131
Ogre::Node::getScale
virtual const Vector3 & getScale(void) const
Gets the scaling factor of this node.
Ogre::Node::getParent
virtual Node * getParent(void) const
Gets this node's parent (NULL if this is the root).
Ogre::Node::DebugRenderable::getLights
const LightList & getLights(void) const
Gets a list of lights, ordered relative to how close they are to this renderable.
Ogre::Node::setParent
virtual void setParent(Node *parent)
Only available internally - notification of parent.
Ogre::Node::Listener::Listener
Listener()
Definition: OgreNode.h:87
OgreMatrix3.h
Ogre::Node::setScale
virtual void setScale(Real x, Real y, Real z)
Sets the scaling factor applied to this node.
Ogre::SharedPtr< Mesh >
Ogre::Node::mScale
Vector3 mScale
Stores the scaling factor applied to this node.
Definition: OgreNode.h:156
Ogre::Node::convertLocalToWorldOrientation
virtual Quaternion convertLocalToWorldOrientation(const Quaternion &localOrientation)
Gets the world orientation of an orientation in the node local space useful for simple transforms tha...
Ogre::MapIterator
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:319
OgreRenderable.h
Ogre::Node::getChild
virtual Node * getChild(unsigned short index) const
Gets a pointer to a child node.
OgreIteratorWrappers.h
Ogre::Node::getUserAny
virtual OGRE_DEPRECATED const Any & getUserAny(void) const
Definition: OgreNode.h:760
Ogre::Node::mInheritOrientation
bool mInheritOrientation
Stores whether this node inherits orientation from it's parent.
Definition: OgreNode.h:159
Ogre::Node::ConstChildNodeIterator
ConstMapIterator< ChildNodeMap > ConstChildNodeIterator
Definition: OgreNode.h:80
OGRE_DEPRECATED
#define OGRE_DEPRECATED
Definition: OgrePlatform.h:189
Ogre::Node::setInheritScale
virtual void setInheritScale(bool inherit)
Tells the node whether it should inherit scaling factors from it's parent node.
Ogre::Node::getChildIterator
virtual ChildNodeIterator getChildIterator(void)
Retrieves an iterator for efficiently looping through all children of this node.
Ogre::Node::DebugRenderable::DebugRenderable
DebugRenderable(Node *parent)
OgreMatrix4.h
Ogre::Node::removeChild
virtual Node * removeChild(Node *child)
Drops the specified child from this node.
Ogre::Node::numChildren
virtual unsigned short numChildren(void) const
Reports the number of child nodes under this one.
Ogre::Node::mParentNotified
bool mParentNotified
Flag indicating that parent has been notified about update request.
Definition: OgreNode.h:139
Ogre::Node::mInitialPosition
Vector3 mInitialPosition
The position to use as a base for keyframe animation.
Definition: OgreNode.h:218
Ogre::Node::DebugRenderable::getMaterial
const MaterialPtr & getMaterial(void) const
Retrieves a weak reference to the material this renderable object uses.
Ogre::Node::Listener::nodeDetached
virtual void nodeDetached(const Node *)
Node has been detached from a parent.
Definition: OgreNode.h:102
Ogre::Node::_getDerivedScale
virtual const Vector3 & _getDerivedScale(void) const
Gets the scaling factor of the node as derived from all parents.
Ogre::Node::createChild
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.
Ogre::Node::getInitialPosition
virtual const Vector3 & getInitialPosition(void) const
Gets the initial position of this node, see setInitialState for more info.
Ogre::Node::translate
virtual void translate(Real x, Real y, Real z, TransformSpace relativeTo=TS_PARENT)
Moves the node along the Cartesian axes.
Ogre::Renderable
Abstract class defining the interface all renderable objects must implement.
Definition: OgreRenderable.h:64
OgreUserObjectBindings.h
Ogre::Node::rotate
virtual void rotate(const Quaternion &q, TransformSpace relativeTo=TS_LOCAL)
Rotate the node around an aritrary axis using a Quarternion.
Ogre::Node::mChildren
ChildNodeMap mChildren
Collection of pointers to direct children; hashmap for efficiency.
Definition: OgreNode.h:129
Ogre::Node::mInitialOrientation
Quaternion mInitialOrientation
The orientation to use as a base for keyframe animation.
Definition: OgreNode.h:220
Ogre::Quaternion::IDENTITY
static const Quaternion IDENTITY
Definition: OgreQuaternion.h:301
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::Node::Node
Node(const String &name)
Constructor, should only be called by parent, not directly.
Ogre::Node::Listener::~Listener
virtual ~Listener()
Definition: OgreNode.h:88
Ogre::ConstMapIterator
Concrete IteratorWrapper for const access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:352
Ogre::Node::msNameGenerator
static NameGenerator msNameGenerator
Incremented count for next name extension.
Definition: OgreNode.h:147
Ogre::Node::DebugRenderable::setScaling
void setScaling(Real s)
Definition: OgreNode.h:121
Ogre::Node::mDerivedScale
Vector3 mDerivedScale
Cached combined scale.
Definition: OgreNode.h:192
Ogre::Node::processQueuedUpdates
static void processQueuedUpdates(void)
Process queued 'needUpdate' calls.
Ogre::Node::getSquaredViewDepth
virtual Real getSquaredViewDepth(const Camera *cam) const
Helper function, get the squared view depth.
Ogre::Node::mListener
Listener * mListener
Node listener - only one allowed (no list) for size & performance reasons.
Definition: OgreNode.h:229
Ogre::Node::mOrientation
Quaternion mOrientation
Stores the orientation of the node relative to it's parent.
Definition: OgreNode.h:150
Ogre::Node::Listener::nodeUpdated
virtual void nodeUpdated(const Node *)
Called when a node gets updated.
Definition: OgreNode.h:96
Ogre::Node
Class representing a general-purpose node an articulated scene graph.
Definition: OgreNode.h:65
Ogre::Node::yaw
virtual void yaw(const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
Rotate the node around the Y-axis.
OgreString.h
Ogre::vector
Definition: OgrePrerequisites.h:492
Ogre::Node::_setDerivedOrientation
virtual void _setDerivedOrientation(const Quaternion &q)
Sets the final world orientation of the node directly.
Ogre::Node::DebugRenderable::getRenderOperation
void getRenderOperation(RenderOperation &op)
Gets the render operation required to send this object to the frame buffer.
Ogre::Node::_updateFromParent
virtual void _updateFromParent(void) const
Triggers the node to update it's combined transforms.
Ogre::Node::setOrientation
virtual void setOrientation(Real w, Real x, Real y, Real z)
Sets the orientation of this node via quaternion parameters.
Ogre::Node::DebugRenderable::mParent
Node * mParent
Definition: OgreNode.h:109
Ogre::Node::mInitialScale
Vector3 mInitialScale
The scale to use as a base for keyframe animation.
Definition: OgreNode.h:222
Ogre::Node::mCachedTransformOutOfDate
bool mCachedTransformOutOfDate
Definition: OgreNode.h:226
Ogre::Node::removeChild
virtual Node * removeChild(const String &name)
Drops the named child from this node.
Ogre::Node::setPosition
virtual void setPosition(Real x, Real y, Real z)
Sets the position of the node relative to it's parent.
Ogre::Node::cancelUpdate
virtual void cancelUpdate(Node *child)
Called by children to notify their parent that they no longer need an update.
Ogre::Node::convertWorldToLocalPosition
virtual Vector3 convertWorldToLocalPosition(const Vector3 &worldPos)
Gets the local position, relative to this node, of the given world-space position.
Ogre::Node::getChild
virtual Node * getChild(const String &name) const
Gets a pointer to a named child node.
Ogre::Node::mNeedChildUpdate
bool mNeedChildUpdate
Flag indicating that all children need to be updated.
Definition: OgreNode.h:137
Ogre::Node::updateFromParentImpl
virtual void updateFromParentImpl(void) const
Class-specific implementation of _updateFromParent.
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:52
Ogre::RenderOperation
'New' rendering operation using vertex buffers.
Definition: OgreRenderOperation.h:45
Ogre::Node::mQueuedForUpdate
bool mQueuedForUpdate
Flag indicating that the node has been queued for update.
Definition: OgreNode.h:141
Ogre::Node::Listener::nodeAttached
virtual void nodeAttached(const Node *)
Node has been attached to a parent.
Definition: OgreNode.h:100
Ogre::Node::requestUpdate
virtual void requestUpdate(Node *child, bool forceParentUpdate=false)
Called by children to notify their parent that they need an update.
Ogre::Node::Node
Node()
Constructor, should only be called by parent, not directly.
Ogre::Node::roll
virtual void roll(const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
Rotate the node around the Z-axis.
Ogre::Node::getUserObjectBindings
const UserObjectBindings & getUserObjectBindings() const
Return an instance of user objects binding associated with this class.
Definition: OgreNode.h:772

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.