OGRE  13.6
Object-Oriented Graphics Rendering Engine
Ogre::QueuedRenderableCollection Class Reference

Lowest level collection of renderables. More...

#include <OgreRenderQueueSortingGrouping.h>

+ Inheritance diagram for Ogre::QueuedRenderableCollection:

Public Types

enum  OrganisationMode { OM_PASS_GROUP = 1 , OM_SORT_DESCENDING = 2 , OM_SORT_ASCENDING = 6 }
 Organisation modes required for this collection. More...
 

Public Member Functions

 QueuedRenderableCollection ()
 
void acceptVisitor (QueuedRenderableVisitor *visitor, OrganisationMode om) const
 Accept a visitor over the collection contents. More...
 
void addOrganisationMode (OrganisationMode om)
 Add a required sorting / grouping mode to this collection when next used. More...
 
void addRenderable (Pass *pass, Renderable *rend)
 Add a renderable to the collection using a given pass. More...
 
void clear (void)
 Empty the collection. More...
 
void merge (const QueuedRenderableCollection &rhs)
 Merge renderable collection. More...
 
void removePassGroup (Pass *p)
 Remove the group entry (if any) for a given Pass. More...
 
void resetOrganisationModes (void)
 Reset the organisation modes required for this collection. More...
 
void sort (const Camera *cam)
 Perform any sorting that is required on this collection. More...
 

Detailed Description

Lowest level collection of renderables.

Remarks
To iterate over items in this collection, you must call the accept method and supply a QueuedRenderableVisitor. The order of the iteration, and whether that iteration is over a RenderablePass list or a 2-level grouped list which causes a visit call at the Pass level, and a call for each Renderable underneath.

Member Enumeration Documentation

◆ OrganisationMode

Organisation modes required for this collection.

Remarks
This affects the internal placement of the items added to this collection; if only one type of sorting / grouping is to be required, then renderables can be stored only once, whilst if multiple types are going to be needed then internally there will be multiple organisations. Changing the organisation needs to be done when the collection is empty.
Enumerator
OM_PASS_GROUP 

Group by pass.

OM_SORT_DESCENDING 

Sort descending camera distance.

OM_SORT_ASCENDING 

Sort ascending camera distance Note value overlaps with descending since both use same sort.

Constructor & Destructor Documentation

◆ QueuedRenderableCollection()

Ogre::QueuedRenderableCollection::QueuedRenderableCollection ( )

Member Function Documentation

◆ clear()

void Ogre::QueuedRenderableCollection::clear ( void  )

Empty the collection.

◆ removePassGroup()

void Ogre::QueuedRenderableCollection::removePassGroup ( Pass p)

Remove the group entry (if any) for a given Pass.

Remarks
To be used when a pass is destroyed, such that any grouping level for it becomes useless.

◆ resetOrganisationModes()

void Ogre::QueuedRenderableCollection::resetOrganisationModes ( void  )
inline

Reset the organisation modes required for this collection.

Remarks
You can only do this when the collection is empty.
See also
OrganisationMode

◆ addOrganisationMode()

void Ogre::QueuedRenderableCollection::addOrganisationMode ( OrganisationMode  om)
inline

Add a required sorting / grouping mode to this collection when next used.

Remarks
You can only do this when the collection is empty.
See also
OrganisationMode

◆ addRenderable()

void Ogre::QueuedRenderableCollection::addRenderable ( Pass pass,
Renderable rend 
)

Add a renderable to the collection using a given pass.

◆ sort()

void Ogre::QueuedRenderableCollection::sort ( const Camera cam)

Perform any sorting that is required on this collection.

Parameters
camThe camera

◆ acceptVisitor()

void Ogre::QueuedRenderableCollection::acceptVisitor ( QueuedRenderableVisitor visitor,
OrganisationMode  om 
) const

Accept a visitor over the collection contents.

Parameters
visitorVisitor class which should be called back
omThe organisation mode which you want to iterate over. Note that this must have been included in an addOrganisationMode call before any renderables were added.

◆ merge()

void Ogre::QueuedRenderableCollection::merge ( const QueuedRenderableCollection rhs)

Merge renderable collection.


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