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

Ogre::RenderPriorityGroup Class Reference

Renderables in the queue grouped by priority. More...

#include <OgreRenderQueueSortingGrouping.h>

List of all members.

Public Types

typedef std::vector< RenderablePassTransparentRenderablePassList
 Vector of RenderablePass objects, this is built on the assumption that vectors only ever increase in size, so even if we do clear() the memory stays allocated, ie fast.

typedef std::vector< Renderable * > RenderableList
typedef std::map< Pass *,
RenderableList *, SolidQueueItemLess
SolidRenderablePassMap
 Map of pass to renderable lists, used for solid objects since ordering within objects not important.


Public Member Functions

 RenderPriorityGroup (RenderQueueGroup *parent, bool splitPassesByLightingType, bool splitNoShadowPasses)
 ~RenderPriorityGroup ()
const SolidRenderablePassMap_getSolidPasses (void) const
 Get the collection of solid passes currently queued.

const SolidRenderablePassMap_getSolidPassesDiffuseSpecular (void) const
 Get the collection of solid passes currently queued (per-light).

const SolidRenderablePassMap_getSolidPassesDecal (void) const
 Get the collection of solid passes currently queued (decal textures).

const SolidRenderablePassMap_getSolidPassesNoShadow (void) const
 Get the collection of solid passes for which shadow receipt is disabled.

const TransparentRenderablePassList_getTransparentPasses (void) const
 Get the collection of transparent passes currently queued.

void addRenderable (Renderable *pRend)
 Add a renderable to this group.

void sort (const Camera *cam)
 Sorts the objects which have been added to the queue; transparent objects by their depth in relation to the passed in Camera.

void clear (void)
 Clears this group of renderables.

void setSplitPassesByLightingType (bool split)
 Sets whether or not the queue will split passes by their lighting type, ie ambient, per-light and decal.

void setSplitNoShadowPasses (bool split)
 Sets whether or not passes which have shadow receive disabled should be separated.


Protected Member Functions

void destroySolidPassMap (SolidRenderablePassMap &passmap)
 Totally empties and destroys a solid pass map.

void removeSolidPassEntry (Pass *p)
 remove a pass entry from all solid pass maps

void clearSolidPassMap (SolidRenderablePassMap &passmap)
 Clear a solid pass map at the end of a frame.

void addSolidRenderable (Technique *pTech, Renderable *rend, bool toNoShadowMap)
 Internal method for adding a solid renderable.

void addSolidRenderableSplitByLightType (Technique *pTech, Renderable *rend)
 Internal method for adding a solid renderable.

void addTransparentRenderable (Technique *pTech, Renderable *rend)
 Internal method for adding a transparent renderable.


Protected Attributes

RenderQueueGroupmParent
 Parent queue group.

bool mSplitPassesByLightingType
bool mSplitNoShadowPasses
SolidRenderablePassMap mSolidPasses
 Solid pass list, used when no shadows, modulative shadows, or ambient passes for additive.

SolidRenderablePassMap mSolidPassesDiffuseSpecular
 Solid per-light pass list, used with additive shadows.

SolidRenderablePassMap mSolidPassesDecal
 Solid decal (texture) pass list, used with additive shadows.

SolidRenderablePassMap mSolidPassesNoShadow
 Solid pass list, used when shadows are enabled but shadow receive is turned off for these passes.

TransparentRenderablePassList mTransparentPasses
 Transparent list.


Detailed Description

Renderables in the queue grouped by priority.

Remarks:
This class simply groups renderables for rendering. All the renderables contained in this class are destined for the same RenderQueueGroup (coarse groupings like those between the main scene and overlays) and have the same priority (fine groupings for detailed overlap control).
This class optimises the grouped renderables by sorting them by material to reduce render state changes, and outsorts transparent objects.

Definition at line 50 of file OgreRenderQueueSortingGrouping.h.


Member Typedef Documentation

typedef std::vector<Renderable*> Ogre::RenderPriorityGroup::RenderableList
 

Definition at line 119 of file OgreRenderQueueSortingGrouping.h.

typedef std::map<Pass*, RenderableList*, SolidQueueItemLess> Ogre::RenderPriorityGroup::SolidRenderablePassMap
 

Map of pass to renderable lists, used for solid objects since ordering within objects not important.

Definition at line 122 of file OgreRenderQueueSortingGrouping.h.

Referenced by _getSolidPasses(), _getSolidPassesDecal(), _getSolidPassesDiffuseSpecular(), and _getSolidPassesNoShadow().

typedef std::vector<RenderablePass> Ogre::RenderPriorityGroup::TransparentRenderablePassList
 

Vector of RenderablePass objects, this is built on the assumption that vectors only ever increase in size, so even if we do clear() the memory stays allocated, ie fast.

Definition at line 118 of file OgreRenderQueueSortingGrouping.h.

Referenced by _getTransparentPasses().


Constructor & Destructor Documentation

Ogre::RenderPriorityGroup::RenderPriorityGroup RenderQueueGroup parent,
bool  splitPassesByLightingType,
bool  splitNoShadowPasses
 

Definition at line 156 of file OgreRenderQueueSortingGrouping.h.

Ogre::RenderPriorityGroup::~RenderPriorityGroup  ) 
 

Definition at line 161 of file OgreRenderQueueSortingGrouping.h.


Member Function Documentation

const SolidRenderablePassMap& Ogre::RenderPriorityGroup::_getSolidPasses void   )  const
 

Get the collection of solid passes currently queued.

Definition at line 172 of file OgreRenderQueueSortingGrouping.h.

References SolidRenderablePassMap.

const SolidRenderablePassMap& Ogre::RenderPriorityGroup::_getSolidPassesDecal void   )  const
 

Get the collection of solid passes currently queued (decal textures).

Definition at line 178 of file OgreRenderQueueSortingGrouping.h.

References SolidRenderablePassMap.

const SolidRenderablePassMap& Ogre::RenderPriorityGroup::_getSolidPassesDiffuseSpecular void   )  const
 

Get the collection of solid passes currently queued (per-light).

Definition at line 175 of file OgreRenderQueueSortingGrouping.h.

References SolidRenderablePassMap.

const SolidRenderablePassMap& Ogre::RenderPriorityGroup::_getSolidPassesNoShadow void   )  const
 

Get the collection of solid passes for which shadow receipt is disabled.

Definition at line 181 of file OgreRenderQueueSortingGrouping.h.

References SolidRenderablePassMap.

const TransparentRenderablePassList& Ogre::RenderPriorityGroup::_getTransparentPasses void   )  const
 

Get the collection of transparent passes currently queued.

Definition at line 184 of file OgreRenderQueueSortingGrouping.h.

References TransparentRenderablePassList.

void Ogre::RenderPriorityGroup::addRenderable Renderable pRend  ) 
 

Add a renderable to this group.

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

void Ogre::RenderPriorityGroup::addSolidRenderable Technique pTech,
Renderable rend,
bool  toNoShadowMap
[protected]
 

Internal method for adding a solid renderable.

void Ogre::RenderPriorityGroup::addSolidRenderableSplitByLightType Technique pTech,
Renderable rend
[protected]
 

Internal method for adding a solid renderable.

void Ogre::RenderPriorityGroup::addTransparentRenderable Technique pTech,
Renderable rend
[protected]
 

Internal method for adding a transparent renderable.

void Ogre::RenderPriorityGroup::clear void   ) 
 

Clears this group of renderables.

void Ogre::RenderPriorityGroup::clearSolidPassMap SolidRenderablePassMap passmap  )  [protected]
 

Clear a solid pass map at the end of a frame.

void Ogre::RenderPriorityGroup::destroySolidPassMap SolidRenderablePassMap passmap  )  [protected]
 

Totally empties and destroys a solid pass map.

void Ogre::RenderPriorityGroup::removeSolidPassEntry Pass p  )  [protected]
 

remove a pass entry from all solid pass maps

void Ogre::RenderPriorityGroup::setSplitNoShadowPasses bool  split  ) 
 

Sets whether or not passes which have shadow receive disabled should be separated.

Definition at line 210 of file OgreRenderQueueSortingGrouping.h.

void Ogre::RenderPriorityGroup::setSplitPassesByLightingType bool  split  ) 
 

Sets whether or not the queue will split passes by their lighting type, ie ambient, per-light and decal.

Definition at line 202 of file OgreRenderQueueSortingGrouping.h.

void Ogre::RenderPriorityGroup::sort const Camera cam  ) 
 

Sorts the objects which have been added to the queue; transparent objects by their depth in relation to the passed in Camera.


Member Data Documentation

RenderQueueGroup* Ogre::RenderPriorityGroup::mParent [protected]
 

Parent queue group.

Definition at line 125 of file OgreRenderQueueSortingGrouping.h.

SolidRenderablePassMap Ogre::RenderPriorityGroup::mSolidPasses [protected]
 

Solid pass list, used when no shadows, modulative shadows, or ambient passes for additive.

Definition at line 129 of file OgreRenderQueueSortingGrouping.h.

SolidRenderablePassMap Ogre::RenderPriorityGroup::mSolidPassesDecal [protected]
 

Solid decal (texture) pass list, used with additive shadows.

Definition at line 133 of file OgreRenderQueueSortingGrouping.h.

SolidRenderablePassMap Ogre::RenderPriorityGroup::mSolidPassesDiffuseSpecular [protected]
 

Solid per-light pass list, used with additive shadows.

Definition at line 131 of file OgreRenderQueueSortingGrouping.h.

SolidRenderablePassMap Ogre::RenderPriorityGroup::mSolidPassesNoShadow [protected]
 

Solid pass list, used when shadows are enabled but shadow receive is turned off for these passes.

Definition at line 135 of file OgreRenderQueueSortingGrouping.h.

bool Ogre::RenderPriorityGroup::mSplitNoShadowPasses [protected]
 

Definition at line 127 of file OgreRenderQueueSortingGrouping.h.

bool Ogre::RenderPriorityGroup::mSplitPassesByLightingType [protected]
 

Definition at line 126 of file OgreRenderQueueSortingGrouping.h.

TransparentRenderablePassList Ogre::RenderPriorityGroup::mTransparentPasses [protected]
 

Transparent list.

Definition at line 138 of file OgreRenderQueueSortingGrouping.h.


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

Copyright © 2000-2005 by The OGRE Team
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 13:02:24 2006