Go to the documentation of this file.
28 #ifndef _SceneNode_H__
29 #define _SceneNode_H__
41 struct VisibleObjectsBoundsInfo;
185 virtual void _update(
bool updateChildren,
bool parentHasChanged);
211 bool includeChildren =
true,
bool displayNodes =
false,
bool onlyShadowCasters =
false);
SceneNode * getParentSceneNode(void) const
Gets the parent of this SceneNode.
static const Vector3 UNIT_Y
SceneNode * mAutoTrackTarget
Auto tracking target.
Inner class for displaying debug renderable for Node.
static const Vector3 ZERO
A viewpoint from which the scene will be rendered.
virtual ObjectIterator getAttachedObjectIterator(void)
Retrieves an iterator which can be used to efficiently step through the objects attached to this node...
virtual MovableObject * getAttachedObject(unsigned short index)
Retrieves a pointer to an attached object.
virtual bool getShowBoundingBox() const
This allows scene managers to determine if the node's bounding box should be added to the rendering q...
virtual void setFixedYawAxis(bool useFixed, const Vector3 &fixedAxis=Vector3::UNIT_Y)
Tells the node whether to yaw around it's own local Y axis or a fixed axis of choice.
virtual void detachObject(MovableObject *obj)
Detaches an object by pointer.
virtual void attachObject(MovableObject *obj)
Adds an instance of a scene object to this node.
virtual void flipVisibility(bool cascade=true)
Inverts the visibility of all objects attached to this node.
virtual void yaw(const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
Rotate the node around the Y-axis.
virtual void setAutoTracking(bool enabled, SceneNode *const target=0, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z, const Vector3 &offset=Vector3::ZERO)
Enables / disables automatic tracking of another SceneNode.
virtual void showBoundingBox(bool bShow)
Allows the showing of the node's bounding box.
Abstract class defining a movable object in a scene.
virtual void findLights(LightList &destList, Real radius, uint32 lightMask=0xFFFFFFFF) const
Allows retrieval of the nearest lights to the centre of this SceneNode.
virtual unsigned short numAttachedObjects(void) const
Reports the number of objects attached to this node.
virtual void lookAt(const Vector3 &targetPoint, TransformSpace relativeTo, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
Points the local -Z direction of this node at a point in space.
Structure collecting together information about the visible objects that have been discovered in a sc...
MapIterator< ObjectMap > ObjectIterator
Allows the rendering of a wireframe bounding box.
Node * createChildImpl(void)
See Node.
Class representing a node in the scene graph.
virtual DebugRenderable * getDebugRenderable()
As Node::getDebugRenderable, except scaling is automatically determined.
bool mShowBoundingBox
Flag that determines if the bounding box of the node should be displayed.
SceneManager * getCreator(void) const
Gets the creator of this scene node.
bool mYawFixed
Whether to yaw around a fixed axis.
Implementation of a Quaternion, i.e.
virtual MovableObject * detachObject(unsigned short index)
Detaches the indexed object from this scene node.
TransformSpace
Enumeration denoting the spaces which a transform can be relative to.
virtual void _updateBounds(void)
Tells the SceneNode to update the world bound info it stores.
Manages the organisation and rendering of a 'scene' i.e.
Vector3 mAutoTrackOffset
Tracking offset for fine tuning.
virtual void setDirection(const Vector3 &vec, TransformSpace relativeTo=TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
Sets the node's direction vector ie it's local -z.
HashMap< String, MovableObject * > ObjectMap
ConstMapIterator< ObjectMap > ConstObjectIterator
Wrapper class which indicates a given angle value is in Radians.
Vector3 mAutoTrackLocalDirection
Local 'normal' direction vector.
void setParent(Node *parent)
See Node.
void _autoTrack(void)
Internal method used by OGRE to update auto-tracking cameras.
A 3D box aligned with the x/y/z axes.
virtual ConstObjectIterator getAttachedObjectIterator(void) const
Retrieves an iterator which can be used to efficiently step through the objects attached to this node...
virtual SceneNode * createChildSceneNode(const String &name, const Vector3 &translate=Vector3::ZERO, const Quaternion &rotate=Quaternion::IDENTITY)
Creates a new named SceneNode as a child of this node.
virtual void setVisible(bool visible, bool cascade=true)
Makes all objects attached to this node become visible / invisible.
AxisAlignedBox mWorldAABB
World-Axis aligned bounding box, updated only through _update.
virtual void setDirection(Real x, Real y, Real z, TransformSpace relativeTo=TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
Sets the node's direction vector ie it's local -z.
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
virtual void setDebugDisplayEnabled(bool enabled, bool cascade=true)
Tells all objects attached to this node whether to display their debug information or not.
SceneNode(SceneManager *creator)
Constructor, only to be called by the creator SceneManager.
static const Vector3 NEGATIVE_UNIT_Z
virtual void removeAndDestroyChild(unsigned short index)
This method removes and destroys the child and all of its children.
SceneNode(SceneManager *creator, const String &name)
Constructor, only to be called by the creator SceneManager.
void updateFromParentImpl(void) const
virtual const Vector3 & getAutoTrackOffset(void)
Get the auto tracking offset for this node, if the node is auto tracking.
virtual const AxisAlignedBox & _getWorldAABB(void) const
Gets the axis-aligned bounding box of this node (and hence all subnodes).
virtual void _notifyRootNode(void)
Notifies this SceneNode that it is the root scene node.
WireBoundingBox * mWireBoundingBox
Pointer to a Wire Bounding Box for this Node.
virtual MovableObject * getAttachedObject(const String &name)
Retrieves a pointer to an attached object.
virtual SceneNode * createChildSceneNode(const Vector3 &translate=Vector3::ZERO, const Quaternion &rotate=Quaternion::IDENTITY)
Creates an unnamed new SceneNode as a child of this node.
static const Quaternion IDENTITY
float Real
Software floating point type.
Concrete IteratorWrapper for const access to the underlying key-value container.
virtual void _findVisibleObjects(Camera *cam, RenderQueue *queue, VisibleObjectsBoundsInfo *visibleBounds, bool includeChildren=true, bool displayNodes=false, bool onlyShadowCasters=false)
Internal method which locates any visible objects attached to this node and adds them to the passed i...
virtual const Vector3 & getAutoTrackLocalDirection(void)
Get the auto tracking local direction for this node, if it is auto tracking.
virtual MovableObject * detachObject(const String &name)
Detaches the named object from this node and returns a pointer to it.
virtual void detachAllObjects(void)
Detaches all objects attached to this node.
Vector3 mYawFixedAxis
Fixed axis to yaw around.
virtual void setInSceneGraph(bool inGraph)
Internal method for setting whether the node is in the scene graph.
Class representing a general-purpose node an articulated scene graph.
virtual void removeAndDestroyChild(const String &name)
This method removes and destroys the named child and all of its children.
bool mIsInSceneGraph
Is this node a current part of the scene graph?
virtual void removeAndDestroyAllChildren(void)
Removes and destroys all children of this node.
virtual void _addBoundingBoxToQueue(RenderQueue *queue)
Add the bounding box to the rendering queue.
SceneManager * mCreator
SceneManager which created this node.
virtual SceneNode * getAutoTrackTarget(void)
Get the auto tracking target for this node, if any.
Standard 3-dimensional vector.
Node * createChildImpl(const String &name)
See Node.
virtual bool isInSceneGraph(void) const
Determines whether this node is in the scene graph, i.e.
Class to manage the scene object rendering queue.
virtual void hideBoundingBox(bool bHide)
Allows the overriding of the node's bounding box over the SceneManager's bounding box setting.
virtual void _update(bool updateChildren, bool parentHasChanged)
Internal method to update the Node.
Copyright © 2012 Torus Knot Software Ltd

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