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

 RenderPriorityGroup ()
 ~RenderPriorityGroup ()
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.


Protected Types

typedef std::vector< RenderablePassTransparentRenderablePasses
 Storage of transparent RenderablePass structs, this is separate from list because it makes sorting faster.


Protected Attributes

SolidRenderablePassMap mSolidPasses
 Solid pass list.

TransparentRenderablePassList mTransparentPasses
 Transparent list.

TransparentRenderablePasses mRenderablePasses

Friends

class Ogre::SceneManager


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 121 of file OgreRenderQueueSortingGrouping.h.

Referenced by addRenderable().

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 124 of file OgreRenderQueueSortingGrouping.h.

typedef std::vector<RenderablePass> Ogre::RenderPriorityGroup::TransparentRenderablePasses [protected]
 

Storage of transparent RenderablePass structs, this is separate from list because it makes sorting faster.

Definition at line 133 of file OgreRenderQueueSortingGrouping.h.

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 120 of file OgreRenderQueueSortingGrouping.h.


Constructor & Destructor Documentation

Ogre::RenderPriorityGroup::RenderPriorityGroup  
 

Definition at line 137 of file OgreRenderQueueSortingGrouping.h.

Ogre::RenderPriorityGroup::~RenderPriorityGroup  
 

Definition at line 139 of file OgreRenderQueueSortingGrouping.h.

References mSolidPasses, and mTransparentPasses.


Member Function Documentation

void Ogre::RenderPriorityGroup::addRenderable Renderable   pRend
 

Add a renderable to this group.

Definition at line 154 of file OgreRenderQueueSortingGrouping.h.

References Ogre::Renderable::getMaterial(), Ogre::Technique::getPassIterator(), Ogre::Renderable::getTechnique(), Ogre::Technique::isTransparent(), mSolidPasses, mTransparentPasses, and RenderableList.

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

void Ogre::RenderPriorityGroup::clear void   
 

Clears this group of renderables.

Definition at line 220 of file OgreRenderQueueSortingGrouping.h.

References mSolidPasses, and mTransparentPasses.

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 207 of file OgreRenderQueueSortingGrouping.h.

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

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


Friends And Related Function Documentation

friend class Ogre::SceneManager [friend]
 

Definition at line 65 of file OgreRenderQueueSortingGrouping.h.


Member Data Documentation

TransparentRenderablePasses Ogre::RenderPriorityGroup::mRenderablePasses [protected]
 

Definition at line 134 of file OgreRenderQueueSortingGrouping.h.

SolidRenderablePassMap Ogre::RenderPriorityGroup::mSolidPasses [protected]
 

Solid pass list.

Definition at line 127 of file OgreRenderQueueSortingGrouping.h.

Referenced by Ogre::SceneManager::_renderVisibleObjects(), addRenderable(), clear(), and ~RenderPriorityGroup().

TransparentRenderablePassList Ogre::RenderPriorityGroup::mTransparentPasses [protected]
 

Transparent list.

Definition at line 129 of file OgreRenderQueueSortingGrouping.h.

Referenced by Ogre::SceneManager::_renderVisibleObjects(), addRenderable(), clear(), sort(), and ~RenderPriorityGroup().


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:21 2004