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

Ogre::SimpleRenderable Class Reference

#include <OgreSimpleRenderable.h>

Inheritance diagram for Ogre::SimpleRenderable:

Ogre::MovableObject Ogre::Renderable Ogre::WireBoundingBox List of all members.

Public Methods

 SimpleRenderable ()
Real ** getVertexCache ()
ushort ** getIndexCache ()
Real ** getNormalCache ()
RGBA ** getDiffuseCache ()
RGBA ** getSpecularCache ()
Real ** getTexCoordCache (unsigned short cn)
void setMaterial (const String &matName)
virtual MaterialgetMaterial (void) const
 Retrieves a pointer to the material this renderable object uses. More...

virtual void setRenderOperation (const RenderOperation &rend)
virtual void getRenderOperation (RenderOperation &rend)
 Gets the render operation required to send this object to the frame buffer. More...

RenderOperationgetRenderOperation ()
void setWorldTransform (const Matrix4 &xform)
virtual void getWorldTransforms (Matrix4 *xform)
 Gets the world transform matrix / matrices for this renderable 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 void _notifyCurrentCamera (Camera *cam)
 Internal method to notify the object of the camera to be used for the next rendering operation. More...

void setBoundingBox (const AxisAlignedBox &box)
virtual const AxisAlignedBoxgetBoundingBox (void) const
 Retrieves the local axis-aligned bounding box for this object. More...

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

virtual ~SimpleRenderable ()
virtual const StringgetName (void) const
 Overridden from MovableObject. More...

virtual const String getMovableType (void) const
 Overridden from MovableObject. More...

virtual bool isAttached (void) const
 Returns true if this object is attached to a SceneNode. 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...

virtual unsigned short getNumWorldTransforms (void)
 Returns the number of world transform matrices this renderable requires. More...

virtual bool useIdentityProjection (void)
 Returns whether or not to use an 'identity' projection. More...

virtual bool useIdentityView (void)
 Returns whether or not to use an 'identity' projection. More...

virtual Real getSquaredViewDepth (const Camera *cam) const=0
 Returns the camera-relative squared depth of this renderable. More...

virtual SceneDetailLevel getRenderDetail ()
 Returns the preferred rasterisation mode of this renderable. More...


Protected Attributes

RenderOperation mRendOp
Matrix4 m_matWorldTransform
AxisAlignedBox mBox
String m_strMatName
Materialm_pMaterial
Realm_pVertexCache
ushortm_pIndexCache
Realm_pNormalCache
RGBAm_pDiffuseCache
RGBAm_pSpecularCache
Realm_pTexCache [OGRE_MAX_TEXTURE_COORD_SETS]
SceneManagerm_pParentSceneManager
 The scene manager for the current frame. More...

Cameram_pCamera
 The camera for the current frame. More...

String m_strName
 The name of the object. More...

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...


Static Protected Attributes

uint ms_uGenNameCount = 0
 Static member used to automatically generate names for SimpleRendaerable objects. More...


Constructor & Destructor Documentation

Ogre::SimpleRenderable::SimpleRenderable  
 

Ogre::SimpleRenderable::~SimpleRenderable   [virtual]
 


Member Function Documentation

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

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

Reimplemented from Ogre::MovableObject.

void Ogre::SimpleRenderable::_notifyCurrentCamera Camera   cam [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.

Implements Ogre::MovableObject.

void Ogre::SimpleRenderable::_updateRenderQueue RenderQueue   queue [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.

Implements Ogre::MovableObject.

const AxisAlignedBox & Ogre::SimpleRenderable::getBoundingBox void    const [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.

Implements Ogre::MovableObject.

RGBA ** Ogre::SimpleRenderable::getDiffuseCache  
 

unsigned short ** Ogre::SimpleRenderable::getIndexCache  
 

Material * Ogre::SimpleRenderable::getMaterial void    const [virtual]
 

Retrieves a pointer to the material this renderable object uses.

Implements Ogre::Renderable.

const String Ogre::SimpleRenderable::getMovableType void    const [virtual]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

const String & Ogre::SimpleRenderable::getName void    const [virtual]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

Real ** Ogre::SimpleRenderable::getNormalCache  
 

virtual unsigned short Ogre::Renderable::getNumWorldTransforms void    [inline, virtual, inherited]
 

Returns the number of world transform matrices this renderable requires.

Remarks:
When a renderable uses vertex blending, it uses multiple world matrices instead of a single one. Each vertex sent to the pipeline can reference one or more matrices in this list with given weights. If a renderable does not use vertex blending this method returns 1, which is the default for simplicity.

Reimplemented in Ogre::SubEntity.

SceneNode * Ogre::SimpleRenderable::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 from Ogre::MovableObject.

virtual SceneDetailLevel Ogre::Renderable::getRenderDetail   [inline, virtual, inherited]
 

Returns the preferred rasterisation mode of this renderable.

Reimplemented in Ogre::SubEntity.

RenderOperation & Ogre::SimpleRenderable::getRenderOperation  
 

void Ogre::SimpleRenderable::getRenderOperation RenderOperation   rend [virtual]
 

Gets the render operation required to send this object to the frame buffer.

Parameters:
rend  RenderOperation structure to update.

Implements Ogre::Renderable.

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

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

RGBA ** Ogre::SimpleRenderable::getSpecularCache  
 

virtual Real Ogre::Renderable::getSquaredViewDepth const Camera   cam const [pure virtual, inherited]
 

Returns the camera-relative squared depth of this renderable.

Remarks:
Used to sort transparent objects. Squared depth is used rather than actual depth to avoid having to perform a square root on the result.

Implemented in Ogre::BillboardSet.

Real ** Ogre::SimpleRenderable::getTexCoordCache unsigned short    cn
 

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

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

Real ** Ogre::SimpleRenderable::getVertexCache  
 

void Ogre::SimpleRenderable::getWorldTransforms Matrix4   xform [virtual]
 

Gets the world transform matrix / matrices for this renderable object.

Remarks:
If the object has any derived transforms, these are expected to be up to date as long as all the SceneNode structures have been updated before this is called.

This method will populate xform with 1 matrix if it does not use vertex blending. If it does use vertex blending it will fill the passed in pointer with an array of matrices, the length being the value returned from getNumWorldTransforms.

Implements Ogre::Renderable.

Reimplemented in Ogre::WireBoundingBox.

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

Returns true if this object is attached to a SceneNode.

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

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

void Ogre::SimpleRenderable::setBoundingBox const AxisAlignedBox   box
 

void Ogre::SimpleRenderable::setMaterial const String   matName
 

void Ogre::SimpleRenderable::setRenderOperation const RenderOperation   rend [virtual]
 

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

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, inherited]
 

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, inherited]
 

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

Reimplemented in Ogre::Light.

void Ogre::SimpleRenderable::setWorldTransform const Matrix4   xform
 

virtual bool Ogre::Renderable::useIdentityProjection void    [inline, virtual, inherited]
 

Returns whether or not to use an 'identity' projection.

Remarks:
Usually Renderable objects will use a projection matrix as determined by the active camera. However, if they want they can cancel this out and use an identity projection, which effectively projects in 2D using a {-1, 1} view space. Useful for overlay rendering. Normal renderables need not override this.

Reimplemented in Ogre::GuiElement.

virtual bool Ogre::Renderable::useIdentityView void    [inline, virtual, inherited]
 

Returns whether or not to use an 'identity' projection.

Remarks:
Usually Renderable objects will use a view matrix as determined by the active camera. However, if they want they can cancel this out and use an identity matrix, which means all geometry is assumed to be relative to camera space already. Useful for overlay rendering. Normal renderables need not override this.

Reimplemented in Ogre::GuiElement.


Member Data Documentation

Matrix4 Ogre::SimpleRenderable::m_matWorldTransform [protected]
 

Camera* Ogre::SimpleRenderable::m_pCamera [protected]
 

The camera for the current frame.

RGBA* Ogre::SimpleRenderable::m_pDiffuseCache [protected]
 

ushort* Ogre::SimpleRenderable::m_pIndexCache [protected]
 

Material* Ogre::SimpleRenderable::m_pMaterial [protected]
 

Real* Ogre::SimpleRenderable::m_pNormalCache [protected]
 

SceneManager* Ogre::SimpleRenderable::m_pParentSceneManager [protected]
 

The scene manager for the current frame.

RGBA* Ogre::SimpleRenderable::m_pSpecularCache [protected]
 

Real* Ogre::SimpleRenderable::m_pTexCache[OGRE_MAX_TEXTURE_COORD_SETS] [protected]
 

Real* Ogre::SimpleRenderable::m_pVertexCache [protected]
 

String Ogre::SimpleRenderable::m_strMatName [protected]
 

String Ogre::SimpleRenderable::m_strName [protected]
 

The name of the object.

AxisAlignedBox Ogre::SimpleRenderable::mBox [protected]
 

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

node to which this object is attached.

RenderQueueGroupID Ogre::MovableObject::mRenderQueueID [protected, inherited]
 

The render queue to use when rendering this object.

RenderOperation Ogre::SimpleRenderable::mRendOp [protected]
 

uint Ogre::SimpleRenderable::ms_uGenNameCount = 0 [static, protected]
 

Static member used to automatically generate names for SimpleRendaerable objects.

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

User defined object which is linked to this object.

bool Ogre::MovableObject::mVisible [protected, inherited]
 

Is this object visible?

Copyright © 2002 by The OGRE Team