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

Ogre::Renderable Class Reference

Abstract class defining the interface all renderable objects must implement. More...

#include <OgreRenderable.h>

Inheritance diagram for Ogre::Renderable:

Ogre::BillboardSet Ogre::BorderRenderable Ogre::GuiElement Ogre::Node Ogre::SimpleRenderable Ogre::SubEntity Ogre::TerrainRenderable Ogre::ParticleSystem Ogre::GuiContainer Ogre::TextAreaGuiElement Ogre::Bone Ogre::SceneNode Ogre::WireBoundingBox Ogre::PanelGuiElement Ogre::OctreeNode Ogre::BorderPanelGuiElement Ogre::CursorGuiElement Ogre::ListGuiElement Ogre::ButtonGuiElement List of all members.

Public Methods

virtual MaterialgetMaterial (void) const=0
 Retrieves a pointer to the material this renderable object uses. More...

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

virtual void getWorldTransforms (Matrix4 *xform)=0
 Gets the world transform matrix / matrices for this renderable object. 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...


Detailed Description

Abstract class defining the interface all renderable objects must implement.

Remarks:
This interface abstracts renderable discrete objects which will be queued in the render pipeline, grouped by material. Classes implementing this interface must be based on a single material, a single world matrix (or a collection of world matrices which are blended by weights), and must be renderable via a single render operation.

Note that deciding whether to put these objects in the rendering pipeline is done from the more specific classes e.g. entities. Only once it is decided that the specific class is to be rendered is the abstract version created (could be more than one per visible object) and pushed onto the rendering queue.


Member Function Documentation

virtual Material* Ogre::Renderable::getMaterial void    const [pure virtual]
 

Retrieves a pointer to the material this renderable object uses.

Implemented in Ogre::BillboardSet.

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

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.

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

Returns the preferred rasterisation mode of this renderable.

Reimplemented in Ogre::SubEntity.

virtual void Ogre::Renderable::getRenderOperation RenderOperation   rend [pure virtual]
 

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

Parameters:
rend  RenderOperation structure to update.

Implemented in Ogre::BillboardSet.

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

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.

virtual void Ogre::Renderable::getWorldTransforms Matrix4   xform [pure 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.

Implemented in Ogre::BillboardSet.

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

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]
 

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.

Copyright © 2002 by The OGRE Team