Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound 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< RenderablePass > | 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.
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 Methods

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

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

RenderQueueGroup * | mParent
| 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 120 of file OgreRenderQueueSortingGrouping.h. Referenced by addSolidRenderable(), and addSolidRenderableSplitByLightType().

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 123 of file OgreRenderQueueSortingGrouping.h. Referenced by _getSolidPasses(), _getSolidPassesDecal(), _getSolidPassesDiffuseSpecular(), _getSolidPassesNoShadow(), addSolidRenderable(), and addSolidRenderableSplitByLightType().

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 119 of file OgreRenderQueueSortingGrouping.h. Referenced by _getTransparentPasses().

## Constructor & Destructor Documentation

Ogre::RenderPriorityGroup::RenderPriorityGroup | ( | RenderQueueGroup * | parent,
|  | bool | splitPassesByLightingType,
|  | bool | splitNoShadowPasses
| ) |

| Definition at line 157 of file OgreRenderQueueSortingGrouping.h. References mSplitNoShadowPasses, and mSplitPassesByLightingType.

Ogre::RenderPriorityGroup::~RenderPriorityGroup | ( |  | ) |

| Definition at line 162 of file OgreRenderQueueSortingGrouping.h. References destroySolidPassMap(), mSolidPasses, mSolidPassesDecal, mSolidPassesDiffuseSpecular, mSolidPassesNoShadow, and mTransparentPasses.

## Member Function Documentation

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

Get the collection of solid passes currently queued.

Definition at line 173 of file OgreRenderQueueSortingGrouping.h.

References mSolidPasses, and SolidRenderablePassMap.

Referenced by Ogre::SceneManager::renderAdditiveStencilShadowedQueueGroupObjects(), Ogre::SceneManager::renderBasicQueueGroupObjects(), Ogre::SceneManager::renderModulativeStencilShadowedQueueGroupObjects(), Ogre::SceneManager::renderModulativeTextureShadowedQueueGroupObjects(), Ogre::SceneManager::renderTextureShadowCasterQueueGroupObjects(), and Ogre::SceneManager::renderTextureShadowReceiverQueueGroupObjects().

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

| Get the collection of solid passes currently queued (decal textures). Definition at line 179 of file OgreRenderQueueSortingGrouping.h. References mSolidPassesDecal, and SolidRenderablePassMap. Referenced by Ogre::SceneManager::renderAdditiveStencilShadowedQueueGroupObjects().

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

| Get the collection of solid passes currently queued (per-light). Definition at line 176 of file OgreRenderQueueSortingGrouping.h. References mSolidPassesDiffuseSpecular, and SolidRenderablePassMap. Referenced by Ogre::SceneManager::renderAdditiveStencilShadowedQueueGroupObjects().

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

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

Definition at line 182 of file OgreRenderQueueSortingGrouping.h.

References mSolidPassesNoShadow, and SolidRenderablePassMap.

Referenced by Ogre::SceneManager::renderAdditiveStencilShadowedQueueGroupObjects(), Ogre::SceneManager::renderModulativeStencilShadowedQueueGroupObjects(), Ogre::SceneManager::renderModulativeTextureShadowedQueueGroupObjects(), and Ogre::SceneManager::renderTextureShadowCasterQueueGroupObjects().

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

Get the collection of transparent passes currently queued.

Definition at line 185 of file OgreRenderQueueSortingGrouping.h.

References mTransparentPasses, and TransparentRenderablePassList.

Referenced by Ogre::SceneManager::renderAdditiveStencilShadowedQueueGroupObjects(), Ogre::SceneManager::renderBasicQueueGroupObjects(), Ogre::SceneManager::renderModulativeStencilShadowedQueueGroupObjects(), Ogre::SceneManager::renderModulativeTextureShadowedQueueGroupObjects(), and Ogre::SceneManager::renderTextureShadowCasterQueueGroupObjects().

void Ogre::RenderPriorityGroup::addRenderable | ( | Renderable * | pRend | ) |

Add a renderable to this group.

Definition at line 95 of file OgreRenderQueueSortingGrouping.cpp.

References addSolidRenderable(), addSolidRenderableSplitByLightType(), addTransparentRenderable(), Ogre::Renderable::getMaterial(), Ogre::Technique::getParent(), Ogre::Material::getReceiveShadows(), Ogre::Renderable::getTechnique(), Ogre::Technique::isDepthCheckEnabled(), Ogre::Technique::isDepthWriteEnabled(), Ogre::Technique::isTransparent(), and mSplitNoShadowPasses.

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

void Ogre::RenderPriorityGroup::addSolidRenderable | ( | Technique * | pTech,
|  | Renderable * | rend,
|  | bool | toNoShadowMap
| ) | `[protected]`

| Internal method for adding a solid renderable. Definition at line 140 of file OgreRenderQueueSortingGrouping.cpp. References Ogre::Technique::getPassIterator(), mSolidPasses, mSolidPassesNoShadow, RenderableList, and SolidRenderablePassMap. Referenced by addRenderable().

void Ogre::RenderPriorityGroup::addSolidRenderableSplitByLightType | ( | Technique * | pTech,
|  | Renderable * | rend
| ) | `[protected]`

Internal method for adding a solid renderable.

Definition at line 178 of file OgreRenderQueueSortingGrouping.cpp.

References Ogre::Technique::getIlluminationPassIterator(), Ogre::IS_AMBIENT, Ogre::IS_DECAL, Ogre::IS_PER_LIGHT, mSolidPasses, mSolidPassesDecal, mSolidPassesDiffuseSpecular, Ogre::IlluminationPass::pass, RenderableList, SolidRenderablePassMap, and Ogre::IlluminationPass::stage.

Referenced by addRenderable().

void Ogre::RenderPriorityGroup::addTransparentRenderable | ( | Technique * | pTech,
|  | Renderable * | rend
| ) | `[protected]`

| Internal method for adding a transparent renderable. Definition at line 219 of file OgreRenderQueueSortingGrouping.cpp. References Ogre::Technique::getPassIterator(), and mTransparentPasses. Referenced by addRenderable().

void Ogre::RenderPriorityGroup::clear | ( | void |  | ) |

| Clears this group of renderables. Definition at line 239 of file OgreRenderQueueSortingGrouping.cpp. References clearSolidPassMap(), mSolidPasses, mSolidPassesDecal, mSolidPassesDiffuseSpecular, mSolidPassesNoShadow, mTransparentPasses, and removeSolidPassEntry().

void Ogre::RenderPriorityGroup::clearSolidPassMap | ( | SolidRenderablePassMap & | passmap | ) | `[protected]`

| Clear a solid pass map at the end of a frame. Definition at line 84 of file OgreRenderQueueSortingGrouping.cpp. Referenced by clear().

void Ogre::RenderPriorityGroup::destroySolidPassMap | ( | SolidRenderablePassMap & | passmap | ) | `[protected]`

| Totally empties and destroys a solid pass map. Definition at line 31 of file OgreRenderQueueSortingGrouping.cpp. Referenced by ~RenderPriorityGroup().

void Ogre::RenderPriorityGroup::removeSolidPassEntry | ( | Pass * | p | ) | `[protected]`

| remove a pass entry from all solid pass maps Definition at line 44 of file OgreRenderQueueSortingGrouping.cpp. References mSolidPasses, mSolidPassesDecal, mSolidPassesDiffuseSpecular, and mSolidPassesNoShadow. Referenced by clear().

void Ogre::RenderPriorityGroup::setSplitNoShadowPasses | ( | bool | split | ) |

| Sets whether or not passes which have shadow receive disabled should be separated. Definition at line 211 of file OgreRenderQueueSortingGrouping.h. References mSplitNoShadowPasses.

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 203 of file OgreRenderQueueSortingGrouping.h. References mSplitPassesByLightingType.

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.

Definition at line 230 of file OgreRenderQueueSortingGrouping.cpp.

References Ogre::RenderPriorityGroup::TransparentQueueItemLess::camera, and mTransparentPasses.

Referenced by Ogre::SceneManager::renderAdditiveStencilShadowedQueueGroupObjects(), Ogre::SceneManager::renderBasicQueueGroupObjects(), Ogre::SceneManager::renderModulativeStencilShadowedQueueGroupObjects(), Ogre::SceneManager::renderModulativeTextureShadowedQueueGroupObjects(), and Ogre::SceneManager::renderTextureShadowCasterQueueGroupObjects().

## Member Data Documentation

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

| Parent queue group. Definition at line 126 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 130 of file OgreRenderQueueSortingGrouping.h. Referenced by _getSolidPasses(), addSolidRenderable(), addSolidRenderableSplitByLightType(), clear(), removeSolidPassEntry(), and ~RenderPriorityGroup().

SolidRenderablePassMap Ogre::RenderPriorityGroup::mSolidPassesDecal`[protected]`

| Solid decal (texture) pass list, used with additive shadows. Definition at line 134 of file OgreRenderQueueSortingGrouping.h. Referenced by _getSolidPassesDecal(), addSolidRenderableSplitByLightType(), clear(), removeSolidPassEntry(), and ~RenderPriorityGroup().

SolidRenderablePassMap Ogre::RenderPriorityGroup::mSolidPassesDiffuseSpecular`[protected]`

| Solid per-light pass list, used with additive shadows. Definition at line 132 of file OgreRenderQueueSortingGrouping.h. Referenced by _getSolidPassesDiffuseSpecular(), addSolidRenderableSplitByLightType(), clear(), removeSolidPassEntry(), and ~RenderPriorityGroup().

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 136 of file OgreRenderQueueSortingGrouping.h. Referenced by _getSolidPassesNoShadow(), addSolidRenderable(), clear(), removeSolidPassEntry(), and ~RenderPriorityGroup().

bool Ogre::RenderPriorityGroup::mSplitNoShadowPasses`[protected]`

| Definition at line 128 of file OgreRenderQueueSortingGrouping.h. Referenced by addRenderable(), RenderPriorityGroup(), and setSplitNoShadowPasses().

bool Ogre::RenderPriorityGroup::mSplitPassesByLightingType`[protected]`

| Definition at line 127 of file OgreRenderQueueSortingGrouping.h. Referenced by RenderPriorityGroup(), and setSplitPassesByLightingType().

TransparentRenderablePassList Ogre::RenderPriorityGroup::mTransparentPasses`[protected]`

| Transparent list. Definition at line 139 of file OgreRenderQueueSortingGrouping.h. Referenced by _getTransparentPasses(), addTransparentRenderable(), clear(), sort(), and ~RenderPriorityGroup().

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

- OgreRenderQueueSortingGrouping.h
- OgreRenderQueueSortingGrouping.cpp

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:28 2004