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:

Inheritance graph
[legend]
List of all members.

Public Methods

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

virtual TechniquegetTechnique (void) const
 Retrieves a pointer to the Material Technique this renderable object uses.

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

virtual void getWorldTransforms (Matrix4 *xform) const=0
 Gets the world transform matrix / matrices for this renderable object.

virtual const QuaterniongetWorldOrientation (void) const=0
 Gets the worldspace orientation of this renderable; this is used in order to more efficiently update parameters to vertex & fragment programs, since inverting Quaterion and Vector in order to derive object-space positions / directions for cameras and lights is much more efficient than inverting a complete 4x4 matrix, and also eliminates problems introduced by scaling.

virtual const Vector3getWorldPosition (void) const=0
 Gets the worldspace orientation of this renderable; this is used in order to more efficiently update parameters to vertex & fragment programs, since inverting Quaterion and Vector in order to derive object-space positions / directions for cameras and lights is much more efficient than inverting a complete 4x4 matrix, and also eliminates problems introduced by scaling.

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

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

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

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

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

virtual bool getNormaliseNormals (void) const
 Returns whether or not this Renderable wishes the hardware to normalise normals.

virtual const LightListgetLights (void) const=0
 Gets a list of lights, ordered relative to how close they are to this renderable.


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.

Definition at line 49 of file OgreRenderable.h.


Member Function Documentation

virtual const LightList& Ogre::Renderable::getLights void    const [pure virtual]
 

Gets a list of lights, ordered relative to how close they are to this renderable.

Remarks:
Directional lights, which have no position, will always be first on this list.

Implemented in Ogre::BillboardSet, Ogre::Frustum, Ogre::GuiElement, Ogre::Node, Ogre::SceneNode, Ogre::SimpleRenderable, Ogre::SubEntity, Ogre::TagPoint, Ogre::BorderRenderable, Ogre::OctreeCamera, and Ogre::TerrainRenderable.

Referenced by Ogre::SceneManager::renderSingleObject().

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

Retrieves a pointer to the material this renderable object uses.

Remarks:
Note that the Renderable also has the option to override the getTechnique method to specify a particular Technique to use instead of the best one available.

Implemented in Ogre::BillboardSet, Ogre::Frustum, Ogre::GuiElement, Ogre::Node, Ogre::SimpleRenderable, Ogre::SubEntity, Ogre::BorderRenderable, Ogre::OctreeCamera, and Ogre::TerrainRenderable.

Referenced by Ogre::RenderPriorityGroup::addRenderable(), and Ogre::RenderQueue::addRenderable().

virtual bool Ogre::Renderable::getNormaliseNormals void    const [virtual]
 

Returns whether or not this Renderable wishes the hardware to normalise normals.

Reimplemented in Ogre::SubEntity.

Definition at line 132 of file OgreRenderable.h.

Referenced by Ogre::SceneManager::renderSingleObject().

virtual unsigned short Ogre::Renderable::getNumWorldTransforms void    const [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, and Ogre::BorderRenderable.

Definition at line 98 of file OgreRenderable.h.

Referenced by Ogre::SceneManager::renderSingleObject().

virtual SceneDetailLevel Ogre::Renderable::getRenderDetail   const [virtual]
 

Returns the preferred rasterisation mode of this renderable.

Reimplemented in Ogre::SubEntity.

Definition at line 129 of file OgreRenderable.h.

References Ogre::SceneDetailLevel, and Ogre::SDL_SOLID.

Referenced by Ogre::SceneManager::renderSingleObject().

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

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

Implemented in Ogre::BillboardSet, Ogre::Frustum, Ogre::Node, Ogre::SimpleRenderable, Ogre::SubEntity, Ogre::BorderRenderable, Ogre::PanelGuiElement, Ogre::TextAreaGuiElement, Ogre::TTYGuiElement, Ogre::OctreeCamera, Ogre::OctreeNode, and Ogre::TerrainRenderable.

Referenced by Ogre::SceneManager::renderSingleObject().

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, Ogre::Frustum, Ogre::GuiElement, Ogre::Node, Ogre::SubEntity, Ogre::WireBoundingBox, Ogre::BorderRenderable, Ogre::OctreeCamera, and Ogre::TerrainRenderable.

Referenced by Ogre::RenderPriorityGroup::TransparentQueueItemLess::operator()().

virtual Technique* Ogre::Renderable::getTechnique void    const [virtual]
 

Retrieves a pointer to the Material Technique this renderable object uses.

Remarks:
This is to allow Renderables to use a chosen Technique if they wish, otherwise they will use the best Technique available for the Material they are using.

Reimplemented in Ogre::SubEntity.

Definition at line 63 of file OgreRenderable.h.

References Ogre::Material::getBestTechnique().

Referenced by Ogre::RenderPriorityGroup::addRenderable().

virtual const Quaternion& Ogre::Renderable::getWorldOrientation void    const [pure virtual]
 

Gets the worldspace orientation of this renderable; this is used in order to more efficiently update parameters to vertex & fragment programs, since inverting Quaterion and Vector in order to derive object-space positions / directions for cameras and lights is much more efficient than inverting a complete 4x4 matrix, and also eliminates problems introduced by scaling.

Implemented in Ogre::BillboardSet, Ogre::Frustum, Ogre::GuiElement, Ogre::Node, Ogre::ParticleSystem, Ogre::SimpleRenderable, Ogre::SubEntity, Ogre::WireBoundingBox, Ogre::BorderRenderable, Ogre::OctreeCamera, and Ogre::TerrainRenderable.

virtual const Vector3& Ogre::Renderable::getWorldPosition void    const [pure virtual]
 

Gets the worldspace orientation of this renderable; this is used in order to more efficiently update parameters to vertex & fragment programs, since inverting Quaterion and Vector in order to derive object-space positions / directions for cameras and lights is much more efficient than inverting a complete 4x4 matrix, and also eliminates problems introduced by scaling.

Implemented in Ogre::BillboardSet, Ogre::Frustum, Ogre::GuiElement, Ogre::Node, Ogre::ParticleSystem, Ogre::SimpleRenderable, Ogre::SubEntity, Ogre::WireBoundingBox, Ogre::BorderRenderable, Ogre::OctreeCamera, and Ogre::TerrainRenderable.

virtual void Ogre::Renderable::getWorldTransforms Matrix4   xform const [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, Ogre::Frustum, Ogre::GuiElement, Ogre::Node, Ogre::ParticleSystem, Ogre::SimpleRenderable, Ogre::SubEntity, Ogre::WireBoundingBox, Ogre::BorderRenderable, Ogre::OctreeCamera, and Ogre::TerrainRenderable.

Referenced by Ogre::AutoParamDataSource::getWorldMatrix(), and Ogre::SceneManager::renderSingleObject().

virtual bool Ogre::Renderable::useIdentityProjection void    const [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, and Ogre::BorderRenderable.

Definition at line 108 of file OgreRenderable.h.

Referenced by Ogre::SceneManager::useRenderableViewProjMode().

virtual bool Ogre::Renderable::useIdentityView void    const [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, and Ogre::BorderRenderable.

Definition at line 118 of file OgreRenderable.h.

Referenced by Ogre::SceneManager::useRenderableViewProjMode().


The documentation for this class was generated from the following file:

Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:19:20 2004