116 void getWorldTransforms(
Matrix4* xform)
const;
117 Real getSquaredViewDepth(
const Camera* cam)
const;
163 virtual void setParent(
Node* parent);
198 virtual void _updateFromParent(
void)
const;
206 virtual void updateFromParentImpl(
void)
const;
210 virtual Node* createChildImpl(
void) = 0;
213 virtual Node* createChildImpl(
const String& name) = 0;
252 const String& getName(
void)
const;
256 virtual Node* getParent(
void)
const;
260 virtual const Quaternion & getOrientation()
const;
275 virtual void setOrientation(
const Quaternion& q );
305 virtual void resetOrientation(
void);
309 virtual void setPosition(
const Vector3& pos);
317 virtual const Vector3 & getPosition(
void)
const;
331 virtual void setScale(
const Vector3& scale);
349 virtual const Vector3 & getScale(
void)
const;
364 virtual void setInheritOrientation(
bool inherit);
379 virtual bool getInheritOrientation(
void)
const;
393 virtual void setInheritScale(
bool inherit);
399 virtual bool getInheritScale(
void)
const;
410 virtual void scale(
const Vector3& scale);
510 virtual Matrix3 getLocalAxes(
void)
const;
518 virtual Node* createChild(
537 virtual void addChild(
Node* child);
541 virtual unsigned short numChildren(
void)
const;
547 virtual Node* getChild(
unsigned short index)
const;
551 virtual Node* getChild(
const String& name)
const;
584 virtual Node* removeChild(
unsigned short index);
592 virtual Node* removeChild(
Node* child);
599 virtual Node* removeChild(
const String& name);
603 virtual void removeAllChildren(
void);
609 virtual void _setDerivedPosition(
const Vector3& pos);
616 virtual void _setDerivedOrientation(
const Quaternion& q);
620 virtual const Quaternion & _getDerivedOrientation(
void)
const;
624 virtual const Vector3 & _getDerivedPosition(
void)
const;
628 virtual const Vector3 & _getDerivedScale(
void)
const;
639 virtual const Matrix4& _getFullTransform(
void)
const;
653 virtual void _update(
bool updateChildren,
bool parentHasChanged);
677 virtual void setInitialState(
void);
680 virtual void resetToInitialState(
void);
686 virtual const Vector3& getInitialPosition(
void)
const;
689 virtual Vector3 convertWorldToLocalPosition(
const Vector3 &worldPos );
693 virtual Vector3 convertLocalToWorldPosition(
const Vector3 &localPos );
703 virtual const Quaternion& getInitialOrientation(
void)
const;
706 virtual const Vector3& getInitialScale(
void)
const;
709 Real getSquaredViewDepth(
const Camera* cam)
const;
718 virtual void needUpdate(
bool forceParentUpdate =
false);
723 virtual void requestUpdate(
Node* child,
bool forceParentUpdate =
false);
725 virtual void cancelUpdate(
Node* child);
728 virtual DebugRenderable* getDebugRenderable(
Real scaling);
737 static void queueNeedUpdate(
Node* n);
739 static void processQueuedUpdates(
void);
749 virtual void setUserAny(
const Any& anything) { getUserObjectBindings().setUserAny(anything); }
754 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.