Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::MovableObject Class Reference

Abstract class definining a movable object in a scene. More...

#include <OgreMovableObject.h>

Inheritance diagram for Ogre::MovableObject:

Ogre::BillboardSet Ogre::Camera Ogre::Entity Ogre::Light Ogre::SimpleRenderable Ogre::TerrainRenderable Ogre::ParticleSystem Ogre::OctreeCamera Ogre::WireBoundingBox List of all members.

Public Methods

 MovableObject ()
 Constructor. More...

virtual ~MovableObject ()
 Virtual destructor - read Scott Meyers if you don't know why this is needed. More...

virtual const StringgetName (void) const=0
 Returns the name of this object. More...

virtual const String getMovableType (void) const=0
 Returns the type name of this object. More...

virtual SceneNodegetParentNode (void)
 Returns the node to which this object is attached. More...

virtual void _notifyAttached (SceneNode *parent)
 Internal method called to notify the object that it has been attached to a node. More...

virtual bool isAttached (void) const
 Returns true if this object is attached to a SceneNode. More...

virtual void _notifyCurrentCamera (Camera *cam)=0
 Internal method to notify the object of the camera to be used for the next rendering operation. More...

virtual const AxisAlignedBoxgetBoundingBox (void) const=0
 Retrieves the local axis-aligned bounding box for this object. More...

virtual void _updateRenderQueue (RenderQueue *queue)=0
 Internal method by which the movable object must add Renderable subclass instances to the rendering queue. More...

virtual void setVisible (bool visible)
 Tells this object whether to be visible or not, if it has a renderable component. More...

virtual bool isVisible (void) const
 Returns whether or not this object is supposed to be visible or not. More...

virtual void setUserObject (UserDefinedObject *obj)
 Call this to associate your own custom user object instance with this MovableObject. More...

virtual UserDefinedObjectgetUserObject (void)
 Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject. More...

virtual void setRenderQueueGroup (RenderQueueGroupID queueID)
 Sets the render queue group this entity will be rendered through. More...

virtual RenderQueueGroupID getRenderQueueGroup (void)
 Gets the queue group for this entity, see setRenderQueueGroup for full details. More...


Protected Attributes

SceneNodemParentNode
 node to which this object is attached. More...

bool mVisible
 Is this object visible? More...

UserDefinedObjectmUserObject
 User defined object which is linked to this object. More...

RenderQueueGroupID mRenderQueueID
 The render queue to use when rendering this object. More...


Detailed Description

Abstract class definining a movable object in a scene.

Remarks:
Instances of this class are discrete, relatively small, movable objects which are attached to SceneNode objects to define their position.
Todo:
Add local OBB / convex hull


Constructor & Destructor Documentation

Ogre::MovableObject::MovableObject  
 

Constructor.

virtual Ogre::MovableObject::~MovableObject   [inline, virtual]
 

Virtual destructor - read Scott Meyers if you don't know why this is needed.


Member Function Documentation

void Ogre::MovableObject::_notifyAttached SceneNode   parent [virtual]
 

Internal method called to notify the object that it has been attached to a node.

Reimplemented in Ogre::SimpleRenderable.

virtual void Ogre::MovableObject::_notifyCurrentCamera Camera   cam [pure virtual]
 

Internal method to notify the object of the camera to be used for the next rendering operation.

Remarks:
Certain objects may want to do specific processing based on the camera position. This method notifies them incase they wish to do this.

Implemented in Ogre::BillboardSet.

virtual void Ogre::MovableObject::_updateRenderQueue RenderQueue   queue [pure virtual]
 

Internal method by which the movable object must add Renderable subclass instances to the rendering queue.

Remarks:
The engine will call this method when this object is to be rendered. The object must then create one or more Renderable subclass instances which it places on the passed in Queue for rendering.

Implemented in Ogre::BillboardSet.

virtual const AxisAlignedBox& Ogre::MovableObject::getBoundingBox void    const [pure virtual]
 

Retrieves the local axis-aligned bounding box for this object.

Remarks:
This bounding box is in local coordinates so will need to be transformed and converted into a world bounding box by the SceneNode.

Implemented in Ogre::BillboardSet.

virtual const String Ogre::MovableObject::getMovableType void    const [pure virtual]
 

Returns the type name of this object.

Implemented in Ogre::BillboardSet.

virtual const String& Ogre::MovableObject::getName void    const [pure virtual]
 

Returns the name of this object.

Implemented in Ogre::BillboardSet.

SceneNode * Ogre::MovableObject::getParentNode void    [virtual]
 

Returns the node to which this object is attached.

Remarks:
An object is not visible in the scene unless attached to a SceneNode.

Attaching an object is done via the SceneNode::attachObject method.

Reimplemented in Ogre::SimpleRenderable.

RenderQueueGroupID Ogre::MovableObject::getRenderQueueGroup void    [virtual]
 

Gets the queue group for this entity, see setRenderQueueGroup for full details.

virtual UserDefinedObject* Ogre::MovableObject::getUserObject void    [inline, virtual]
 

Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject.

bool Ogre::MovableObject::isAttached void    const [virtual]
 

Returns true if this object is attached to a SceneNode.

bool Ogre::MovableObject::isVisible void    const [virtual]
 

Returns whether or not this object is supposed to be visible or not.

void Ogre::MovableObject::setRenderQueueGroup RenderQueueGroupID    queueID [virtual]
 

Sets the render queue group this entity will be rendered through.

Remarks:
Render queues are grouped to allow you to more tightly control the ordering of rendered objects. If you do not call this method, all Entity objects default to RENDER_QUEUE_MAIN which is fine for most objects. You may want to alter this if you want this entity to always appear in front of other objects, e.g. for a 3D menu system or such.

See RenderQueue for more details.

Parameters:
queueID  Enumerated value of the queue group to use.

virtual void Ogre::MovableObject::setUserObject UserDefinedObject   obj [inline, virtual]
 

Call this to associate your own custom user object instance with this MovableObject.

Remarks:
By simply making your game / application object a subclass of UserDefinedObject, you can establish a link between an OGRE instance of MovableObject and your own application classes. Call this method to establish the link.

void Ogre::MovableObject::setVisible bool    visible [virtual]
 

Tells this object whether to be visible or not, if it has a renderable component.

Reimplemented in Ogre::Light.


Member Data Documentation

SceneNode* Ogre::MovableObject::mParentNode [protected]
 

node to which this object is attached.

RenderQueueGroupID Ogre::MovableObject::mRenderQueueID [protected]
 

The render queue to use when rendering this object.

UserDefinedObject* Ogre::MovableObject::mUserObject [protected]
 

User defined object which is linked to this object.

bool Ogre::MovableObject::mVisible [protected]
 

Is this object visible?

Copyright © 2002 by The OGRE Team