117 void getWorldTransforms(
Matrix4* xform)
const;
118 Real getSquaredViewDepth(
const Camera* cam)
const;
164 virtual void setParent(
Node* parent);
199 virtual void _updateFromParent(
void)
const;
207 virtual void updateFromParentImpl(
void)
const;
211 virtual Node* createChildImpl(
void) = 0;
214 virtual Node* createChildImpl(
const String& name) = 0;
253 const String& getName(
void)
const;
257 virtual Node* getParent(
void)
const;
261 virtual const Quaternion & getOrientation()
const;
276 virtual void setOrientation(
const Quaternion& q );
306 virtual void resetOrientation(
void);
310 virtual void setPosition(
const Vector3& pos);
318 virtual const Vector3 & getPosition(
void)
const;
332 virtual void setScale(
const Vector3& scale);
350 virtual const Vector3 & getScale(
void)
const;
365 virtual void setInheritOrientation(
bool inherit);
380 virtual bool getInheritOrientation(
void)
const;
394 virtual void setInheritScale(
bool inherit);
400 virtual bool getInheritScale(
void)
const;
411 virtual void scale(
const Vector3& scale);
511 virtual Matrix3 getLocalAxes(
void)
const;
519 virtual Node* createChild(
538 virtual void addChild(
Node* child);
542 virtual unsigned short numChildren(
void)
const;
548 virtual Node* getChild(
unsigned short index)
const;
552 virtual Node* getChild(
const String& name)
const;
585 virtual Node* removeChild(
unsigned short index);
593 virtual Node* removeChild(
Node* child);
600 virtual Node* removeChild(
const String& name);
604 virtual void removeAllChildren(
void);
610 virtual void _setDerivedPosition(
const Vector3& pos);
617 virtual void _setDerivedOrientation(
const Quaternion& q);
621 virtual const Quaternion & _getDerivedOrientation(
void)
const;
625 virtual const Vector3 & _getDerivedPosition(
void)
const;
629 virtual const Vector3 & _getDerivedScale(
void)
const;
640 virtual const Matrix4& _getFullTransform(
void)
const;
654 virtual void _update(
bool updateChildren,
bool parentHasChanged);
678 virtual void setInitialState(
void);
681 virtual void resetToInitialState(
void);
687 virtual const Vector3& getInitialPosition(
void)
const;
690 virtual Vector3 convertWorldToLocalPosition(
const Vector3 &worldPos );
694 virtual Vector3 convertLocalToWorldPosition(
const Vector3 &localPos );
704 virtual const Quaternion& getInitialOrientation(
void)
const;
707 virtual const Vector3& getInitialScale(
void)
const;
710 virtual Real getSquaredViewDepth(
const Camera* cam)
const;
719 virtual void needUpdate(
bool forceParentUpdate =
false);
724 virtual void requestUpdate(
Node* child,
bool forceParentUpdate =
false);
726 virtual void cancelUpdate(
Node* child);
729 virtual DebugRenderable* getDebugRenderable(
Real scaling);
738 static void queueNeedUpdate(
Node* n);
740 static void processQueuedUpdates(
void);
750 virtual void setUserAny(
const Any& anything) { getUserObjectBindings().setUserAny(anything); }
755 virtual const Any&
getUserAny(
void)
const {
return getUserObjectBindings().getUserAny(); }
ChildNodeMap mChildren
Collection of pointers to direct children; hashmap for efficiency.
A viewpoint from which the scene will be rendered.
Class encapsulating a standard 4x4 homogeneous matrix.
Quaternion mOrientation
Stores the orientation of the node relative to it's parent.
float Real
Software floating point type.
Vector3 mInitialScale
The scale to use as a base for keyframe animation.
ConstMapIterator< ChildNodeMap > ConstChildNodeIterator
Variant type that can hold Any other type.
Utility class to generate a sequentially numbered series of names.
Transform is relative to the local space.
virtual Listener * getListener(void) const
Gets the current listener for this Node.
MapIterator< ChildNodeMap > ChildNodeIterator
virtual const Any & getUserAny(void) const
TransformSpace
Enumeration denoting the spaces which a transform can be relative to.
vector< Node * >::type QueuedUpdates
static const Vector3 ZERO
bool mCachedTransformOutOfDate
Quaternion mDerivedOrientation
Cached combined orientation.
A 3x3 matrix which can represent rotations around axes.
virtual void nodeUpdated(const Node *)
Called when a node gets updated.
bool mParentNotified
Flag indicating that parent has been notified about update request.
Abstract class defining the interface all renderable objects must implement.
virtual void nodeDestroyed(const Node *)
Node is being destroyed.
Implementation of a Quaternion, i.e.
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
Vector3 mPosition
Stores the position/translation of the node relative to its parent.
virtual void nodeAttached(const Node *)
Node has been attached to a parent.
static QueuedUpdates msQueuedUpdates
UserObjectBindings & getUserObjectBindings()
Return an instance of user objects binding associated with this class.
virtual void setUserAny(const Any &anything)
static const Quaternion IDENTITY
Vector3 mDerivedScale
Cached combined scale.
bool mInheritOrientation
Stores whether this node inherits orientation from it's parent.
static NameGenerator msNameGenerator
Incremented count for next name extension.
ChildUpdateSet mChildrenToUpdate
List of children which need updating, used if self is not out of date but children are...
virtual void nodeDetached(const Node *)
Node has been detached from a parent.
bool mInheritScale
Stores whether this node inherits scale from it's parent.
Transform is relative to the space of the parent node.
bool mNeedParentUpdate
Flag to indicate own transform from parent is out of date.
Listener * mListener
Node listener - only one allowed (no list) for size & performance reasons.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
UserObjectBindings mUserObjectBindings
User objects binding.
HashMap< String, Node * > ChildNodeMap
bool mQueuedForUpdate
Flag indicating that the node has been queued for update.
Standard 3-dimensional vector.
const UserObjectBindings & getUserObjectBindings() const
Return an instance of user objects binding associated with this class.
Vector3 mInitialPosition
The position to use as a base for keyframe animation.
'New' rendering operation using vertex buffers.
String mName
Friendly name of this node, can be automatically generated if you don't care.
Quaternion mInitialOrientation
The orientation to use as a base for keyframe animation.
Wrapper class which indicates a given angle value is in Radians.
set< Node * >::type ChildUpdateSet
bool mNeedChildUpdate
Flag indicating that all children need to be updated.
Concrete IteratorWrapper for const access to the underlying key-value container.
Matrix4 mCachedTransform
Cached derived transform as a 4x4 matrix.
Vector3 mDerivedPosition
Cached combined position.
Specialisation of SharedPtr to allow SharedPtr to be assigned to MaterialPtr.
Specialisation of SharedPtr to allow SharedPtr to be assigned to MeshPtr.
Node * mParent
Pointer to parent node.
Vector3 mScale
Stores the scaling factor applied to this node.
Class representing a general-purpose node an articulated scene graph.
Listener which gets called back on Node events.
Class that provide convenient interface to establish a linkage between custom user application object...
Inner class for displaying debug renderable for Node.
virtual void setListener(Listener *listener)
Sets a listener for this Node.