Ogre::QueuedRenderableCollection Class Reference
Core » RenderSystem

Lowest level collection of renderables. More...

`#include <OgreRenderQueueSortingGrouping.h>`

Inheritance diagram for Ogre::QueuedRenderableCollection:
[legend]

## Classes

struct | DepthSortDescendingLess
| Comparator to order objects by descending camera distance. More...
struct | PassGroupLess
| Comparator to order pass groups. More...
struct | RadixSortFunctorDistance
| Functor for descending sort value 2 for radix sort (distance) More...
struct | RadixSortFunctorPass
| Functor for accessing sort value 1 for radix sort (Pass) More...

## 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 ()
| ~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 | operator delete (void *ptr)
void | operator delete (void *ptr, void *)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info More...
void * | operator new (size_t sz)
void * | operator new (size_t sz, void *ptr)
| placement operator new More...
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info More...
void * | operator new[] (size_t sz)
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...

## Protected Types

typedef map< Pass *, RenderableList *, PassGroupLess >::type | PassGroupRenderableMap
| Map of pass to renderable lists, this is a grouping by pass. More...
typedef vector< Renderable * >::type | RenderableList
typedef vector< RenderablePass >::type | RenderablePassList
| 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. More...

## Protected Member Functions

void | acceptVisitorAscending (QueuedRenderableVisitor *visitor) const
| Internal visitor implementation. More...
void | acceptVisitorDescending (QueuedRenderableVisitor *visitor) const
| Internal visitor implementation. More...
void | acceptVisitorGrouped (QueuedRenderableVisitor *visitor) const
| Internal visitor implementation. More...

## Protected Attributes

PassGroupRenderableMap | mGrouped
| Grouped. More...
uint8 | mOrganisationMode
| Bitmask of the organisation modes requested. More...
RenderablePassList | mSortedDescending
| Sorted descending (can iterate backwards to get ascending) More...

## Static Protected Attributes

static RadixSort< RenderablePassList, RenderablePass, uint32 > | msRadixSorter1
| Radix sorter for accessing sort value 1 (Pass) More...
static RadixSort< RenderablePassList, RenderablePass, float > | msRadixSorter2
| Radix sorter for sort value 2 (distance) 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.

Definition at line 113 of file OgreRenderQueueSortingGrouping.h.

## Member Typedef Documentation

## PassGroupRenderableMap

typedef map<Pass*, RenderableList*, PassGroupLess>::type Ogre::QueuedRenderableCollection::PassGroupRenderableMap

protected

Map of pass to renderable lists, this is a grouping by pass.

Definition at line 199 of file OgreRenderQueueSortingGrouping.h.

## RenderableList

typedef vector<Renderable*>::type Ogre::QueuedRenderableCollection::RenderableList

protected

Definition at line 197 of file OgreRenderQueueSortingGrouping.h.

## RenderablePassList

typedef vector<RenderablePass>::type Ogre::QueuedRenderableCollection::RenderablePassList

protected

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

## Member Enumeration Documentation

## OrganisationMode

enum Ogre::QueuedRenderableCollection::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.

Definition at line 124 of file OgreRenderQueueSortingGrouping.h.

## Constructor & Destructor Documentation

## QueuedRenderableCollection()

Ogre::QueuedRenderableCollection::QueuedRenderableCollection | ( |  | ) |

## ~QueuedRenderableCollection()

Ogre::QueuedRenderableCollection::~QueuedRenderableCollection | ( |  | ) |

## Member Function Documentation

## acceptVisitor()

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

Accept a visitor over the collection contents.

Parameters

  visitor | Visitor class which should be called back
  om | The organisation mode which you want to iterate over. Note that this must have been included in an addOrganisationMode call before any renderables were added.

## acceptVisitorAscending()

void Ogre::QueuedRenderableCollection::acceptVisitorAscending | ( | QueuedRenderableVisitor * | visitor | ) | const

protected

Internal visitor implementation.

## acceptVisitorDescending()

void Ogre::QueuedRenderableCollection::acceptVisitorDescending | ( | QueuedRenderableVisitor * | visitor | ) | const

protected

Internal visitor implementation.

## acceptVisitorGrouped()

void Ogre::QueuedRenderableCollection::acceptVisitorGrouped | ( | QueuedRenderableVisitor * | visitor | ) | const

protected

Internal visitor implementation.

## addOrganisationMode()

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

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

Definition at line 278 of file OgreRenderQueueSortingGrouping.h.

References Ogre::RenderablePass::pass.

## addRenderable()

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

Add a renderable to the collection using a given pass.

## clear()

void Ogre::QueuedRenderableCollection::clear | ( | void |  | ) |

Empty the collection.

## merge()

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

Merge renderable collection.

## operator delete() [1/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) |

inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

## operator delete() [2/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  |

inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

## operator delete() [3/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [1/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) |

inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [2/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

## operator new() [1/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

## operator new() [2/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) |

inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

## operator new() [3/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr
| ) |  |

inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

## operator new[]() [1/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

## operator new[]() [2/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) |

inherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

## 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 |  | ) |

Reset the organisation modes required for this collection.

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

See also
  OrganisationMode

Definition at line 268 of file OgreRenderQueueSortingGrouping.h.

## sort()

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

Perform any sorting that is required on this collection.

Parameters

  cam | The camera

## Member Data Documentation

## mGrouped

PassGroupRenderableMap Ogre::QueuedRenderableCollection::mGrouped

protected

Grouped.

Definition at line 238 of file OgreRenderQueueSortingGrouping.h.

## mOrganisationMode

uint8 Ogre::QueuedRenderableCollection::mOrganisationMode

protected

Bitmask of the organisation modes requested.

Definition at line 235 of file OgreRenderQueueSortingGrouping.h.

## mSortedDescending

RenderablePassList Ogre::QueuedRenderableCollection::mSortedDescending

protected

Sorted descending (can iterate backwards to get ascending)

Definition at line 240 of file OgreRenderQueueSortingGrouping.h.

## msRadixSorter1

RadixSort<RenderablePassList, RenderablePass, uint32> Ogre::QueuedRenderableCollection::msRadixSorter1

static protected

Radix sorter for accessing sort value 1 (Pass)

Definition at line 211 of file OgreRenderQueueSortingGrouping.h.

## msRadixSorter2

RadixSort<RenderablePassList, RenderablePass, float> Ogre::QueuedRenderableCollection::msRadixSorter2

static protected

Radix sorter for sort value 2 (distance)

Definition at line 232 of file OgreRenderQueueSortingGrouping.h.

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

- OgreRenderQueueSortingGrouping.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.