OgreRenderQueueSortingGrouping.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __RenderQueueSortingGrouping_H__
#define __RenderQueueSortingGrouping_H__
// Precompiler options
#include "OgrePrerequisites.h"
#include "OgreIteratorWrappers.h"
#include "OgreMaterial.h"
#include "OgreTechnique.h"
#include "OgrePass.h"
#include "OgreRadixSort.h"
namespace Ogre {
struct RenderablePass
{
Renderable* renderable;
Pass* pass;
RenderablePass(Renderable* rend, Pass* p) :renderable(rend), pass(p) {}
};
class _OgreExport QueuedRenderableVisitor
{
public:
QueuedRenderableVisitor() {}
virtual ~QueuedRenderableVisitor() {}
virtual void visit(RenderablePass* rp) = 0;
/* When visiting a collection grouped by pass, this is
called when the grouping pass changes.
@remarks
If this method is called, the RenderablePass visit
method will not be called for this collection. The
Renderable visit method will be called for each item
underneath the pass grouping level.
@return True to continue, false to skip the Renderables underneath
*/
virtual bool visit(const Pass* p) = 0;
virtual void visit(Renderable* r) = 0;
};
class _OgreExport QueuedRenderableCollection : public RenderQueueAlloc
{
public:
enum OrganisationMode
{
OM_PASS_GROUP = 1,
OM_SORT_DESCENDING = 2,
OM_SORT_ASCENDING = 6
};
protected:
struct PassGroupLess
{
bool _OgreExport operator()(const Pass* a, const Pass* b) const
{
// Sort by passHash, which is pass, then texture unit changes
uint32 hasha = a->getHash();
uint32 hashb = b->getHash();
if (hasha == hashb)
{
// Must differentTransparentQueueItemLessiate by pointer incase 2 passes end up with the same hash
return a < b;
}
else
{
return hasha < hashb;
}
}
};
struct DepthSortDescendingLess
{
const Camera* camera;
DepthSortDescendingLess(const Camera* cam)
: camera(cam)
{
}
bool _OgreExport operator()(const RenderablePass& a, const RenderablePass& b) const
{
if (a.renderable == b.renderable)
{
// Same renderable, sort by pass hash
return a.pass->getHash() < b.pass->getHash();
}
else
{
// Different renderables, sort by depth
Real adepth = a.renderable->getSquaredViewDepth(camera);
Real bdepth = b.renderable->getSquaredViewDepth(camera);
if (Math::RealEqual(adepth, bdepth))
{
// Must return deterministic result, doesn't matter what
return a.pass < b.pass;
}
else
{
// Sort DESCENDING by depth (i.e. far objects first)
return (adepth > bdepth);
}
}
}
};
typedef vector<RenderablePass>::type RenderablePassList;
typedef vector<Renderable*>::type RenderableList;
typedef map<Pass*, RenderableList*, PassGroupLess>::type PassGroupRenderableMap;
struct RadixSortFunctorPass
{
uint32 operator()(const RenderablePass& p) const
{
return p.pass->getHash();
}
};
static RadixSort<RenderablePassList, RenderablePass, uint32> msRadixSorter1;
struct RadixSortFunctorDistance
{
const Camera* camera;
RadixSortFunctorDistance(const Camera* cam)
: camera(cam)
{
}
float operator()(const RenderablePass& p) const
{
// Sort DESCENDING by depth (ie far objects first), use negative distance
// here because radix sorter always dealing with accessing sort
return static_cast<float>(- p.renderable->getSquaredViewDepth(camera));
}
};
static RadixSort<RenderablePassList, RenderablePass, float> msRadixSorter2;
uint8 mOrganisationMode;
PassGroupRenderableMap mGrouped;
RenderablePassList mSortedDescending;
void acceptVisitorGrouped(QueuedRenderableVisitor* visitor) const;
void acceptVisitorDescending(QueuedRenderableVisitor* visitor) const;
void acceptVisitorAscending(QueuedRenderableVisitor* visitor) const;
public:
QueuedRenderableCollection();
~QueuedRenderableCollection();
void clear(void);
void removePassGroup(Pass* p);
void resetOrganisationModes(void)
{
mOrganisationMode = 0;
}
void addOrganisationMode(OrganisationMode om)
{
mOrganisationMode |= om;
}
void addRenderable(Pass* pass, Renderable* rend);
void sort(const Camera* cam);
void acceptVisitor(QueuedRenderableVisitor* visitor, OrganisationMode om) const;
void merge( const QueuedRenderableCollection& rhs );
};
class _OgreExport RenderPriorityGroup : public RenderQueueAlloc
{
protected:
RenderQueueGroup* mParent;
bool mSplitPassesByLightingType;
bool mSplitNoShadowPasses;
bool mShadowCastersNotReceivers;
QueuedRenderableCollection mSolidsBasic;
QueuedRenderableCollection mSolidsDiffuseSpecular;
QueuedRenderableCollection mSolidsDecal;
QueuedRenderableCollection mSolidsNoShadowReceive;
QueuedRenderableCollection mTransparentsUnsorted;
QueuedRenderableCollection mTransparents;
void removePassEntry(Pass* p);
void addSolidRenderable(Technique* pTech, Renderable* rend, bool toNoShadowMap);
void addSolidRenderableSplitByLightType(Technique* pTech, Renderable* rend);
void addUnsortedTransparentRenderable(Technique* pTech, Renderable* rend);
void addTransparentRenderable(Technique* pTech, Renderable* rend);
public:
RenderPriorityGroup(RenderQueueGroup* parent,
bool splitPassesByLightingType,
bool splitNoShadowPasses,
bool shadowCastersNotReceivers);
~RenderPriorityGroup() { }
const QueuedRenderableCollection& getSolidsBasic(void) const
{ return mSolidsBasic; }
const QueuedRenderableCollection& getSolidsDiffuseSpecular(void) const
{ return mSolidsDiffuseSpecular; }
const QueuedRenderableCollection& getSolidsDecal(void) const
{ return mSolidsDecal; }
const QueuedRenderableCollection& getSolidsNoShadowReceive(void) const
{ return mSolidsNoShadowReceive; }
const QueuedRenderableCollection& getTransparentsUnsorted(void) const
{ return mTransparentsUnsorted; }
const QueuedRenderableCollection& getTransparents(void) const
{ return mTransparents; }
void resetOrganisationModes(void);
void addOrganisationMode(QueuedRenderableCollection::OrganisationMode om);
void defaultOrganisationMode(void);
void addRenderable(Renderable* pRend, Technique* pTech);
void sort(const Camera* cam);
void clear(void);
void setSplitPassesByLightingType(bool split)
{
mSplitPassesByLightingType = split;
}
void setSplitNoShadowPasses(bool split)
{
mSplitNoShadowPasses = split;
}
void setShadowCastersCannotBeReceivers(bool ind)
{
mShadowCastersNotReceivers = ind;
}
void merge( const RenderPriorityGroup* rhs );
};
class _OgreExport RenderQueueGroup : public RenderQueueAlloc
{
public:
typedef map<ushort, RenderPriorityGroup*, std::less<ushort> >::type PriorityMap;
typedef MapIterator<PriorityMap> PriorityMapIterator;
typedef ConstMapIterator<PriorityMap> ConstPriorityMapIterator;
protected:
RenderQueue* mParent;
bool mSplitPassesByLightingType;
bool mSplitNoShadowPasses;
bool mShadowCastersNotReceivers;
PriorityMap mPriorityGroups;
bool mShadowsEnabled;
uint8 mOrganisationMode;
public:
RenderQueueGroup(RenderQueue* parent,
bool splitPassesByLightingType,
bool splitNoShadowPasses,
bool shadowCastersNotReceivers)
: mParent(parent)
, mSplitPassesByLightingType(splitPassesByLightingType)
, mSplitNoShadowPasses(splitNoShadowPasses)
, mShadowCastersNotReceivers(shadowCastersNotReceivers)
, mShadowsEnabled(true)
, mOrganisationMode(0)
{
}
~RenderQueueGroup() {
// destroy contents now
PriorityMap::iterator i;
for (i = mPriorityGroups.begin(); i != mPriorityGroups.end(); ++i)
{
OGRE_DELETE i->second;
}
}
PriorityMapIterator getIterator(void)
{
return PriorityMapIterator(mPriorityGroups.begin(), mPriorityGroups.end());
}
ConstPriorityMapIterator getIterator(void) const
{
return ConstPriorityMapIterator(mPriorityGroups.begin(), mPriorityGroups.end());
}
void addRenderable(Renderable* pRend, Technique* pTech, ushort priority)
{
// Check if priority group is there
PriorityMap::iterator i = mPriorityGroups.find(priority);
RenderPriorityGroup* pPriorityGrp;
if (i == mPriorityGroups.end())
{
// Missing, create
pPriorityGrp = OGRE_NEW RenderPriorityGroup(this,
mSplitPassesByLightingType,
mSplitNoShadowPasses,
mShadowCastersNotReceivers);
if (mOrganisationMode)
{
pPriorityGrp->resetOrganisationModes();
pPriorityGrp->addOrganisationMode((QueuedRenderableCollection::OrganisationMode)mOrganisationMode);
}
mPriorityGroups.insert(PriorityMap::value_type(priority, pPriorityGrp));
}
else
{
pPriorityGrp = i->second;
}
// Add
pPriorityGrp->addRenderable(pRend, pTech);
}
void clear(bool destroy = false)
{
PriorityMap::iterator i, iend;
iend = mPriorityGroups.end();
for (i = mPriorityGroups.begin(); i != iend; ++i)
{
if (destroy)
OGRE_DELETE i->second;
else
i->second->clear();
}
if (destroy)
mPriorityGroups.clear();
}
void setShadowsEnabled(bool enabled) { mShadowsEnabled = enabled; }
bool getShadowsEnabled(void) const { return mShadowsEnabled; }
void setSplitPassesByLightingType(bool split)
{
mSplitPassesByLightingType = split;
PriorityMap::iterator i, iend;
iend = mPriorityGroups.end();
for (i = mPriorityGroups.begin(); i != iend; ++i)
{
i->second->setSplitPassesByLightingType(split);
}
}
void setSplitNoShadowPasses(bool split)
{
mSplitNoShadowPasses = split;
PriorityMap::iterator i, iend;
iend = mPriorityGroups.end();
for (i = mPriorityGroups.begin(); i != iend; ++i)
{
i->second->setSplitNoShadowPasses(split);
}
}
void setShadowCastersCannotBeReceivers(bool ind)
{
mShadowCastersNotReceivers = ind;
PriorityMap::iterator i, iend;
iend = mPriorityGroups.end();
for (i = mPriorityGroups.begin(); i != iend; ++i)
{
i->second->setShadowCastersCannotBeReceivers(ind);
}
}
void resetOrganisationModes(void)
{
mOrganisationMode = 0;
PriorityMap::iterator i, iend;
iend = mPriorityGroups.end();
for (i = mPriorityGroups.begin(); i != iend; ++i)
{
i->second->resetOrganisationModes();
}
}
void addOrganisationMode(QueuedRenderableCollection::OrganisationMode om)
{
mOrganisationMode |= om;
PriorityMap::iterator i, iend;
iend = mPriorityGroups.end();
for (i = mPriorityGroups.begin(); i != iend; ++i)
{
i->second->addOrganisationMode(om);
}
}
void defaultOrganisationMode(void)
{
mOrganisationMode = 0;
PriorityMap::iterator i, iend;
iend = mPriorityGroups.end();
for (i = mPriorityGroups.begin(); i != iend; ++i)
{
i->second->defaultOrganisationMode();
}
}
void merge( const RenderQueueGroup* rhs )
{
ConstPriorityMapIterator it = rhs->getIterator();
while( it.hasMoreElements() )
{
ushort priority = it.peekNextKey();
RenderPriorityGroup* pSrcPriorityGrp = it.getNext();
RenderPriorityGroup* pDstPriorityGrp;
// Check if priority group is there
PriorityMap::iterator i = mPriorityGroups.find(priority);
if (i == mPriorityGroups.end())
{
// Missing, create
pDstPriorityGrp = OGRE_NEW RenderPriorityGroup(this,
mSplitPassesByLightingType,
mSplitNoShadowPasses,
mShadowCastersNotReceivers);
if (mOrganisationMode)
{
pDstPriorityGrp->resetOrganisationModes();
pDstPriorityGrp->addOrganisationMode((QueuedRenderableCollection::OrganisationMode)mOrganisationMode);
}
mPriorityGroups.insert(PriorityMap::value_type(priority, pDstPriorityGrp));
}
else
{
pDstPriorityGrp = i->second;
}
// merge
pDstPriorityGrp->merge( pSrcPriorityGrp );
}
}
};
}
#endif
Ogre::RenderPriorityGroup::merge
void merge(const RenderPriorityGroup *rhs)
Merge group of renderables.
OgreRadixSort.h
Ogre::RenderQueueGroup::addRenderable
void addRenderable(Renderable *pRend, Technique *pTech, ushort priority)
Add a renderable to this group, with the given priority.
Definition: OgreRenderQueueSortingGrouping.h:520
Ogre::QueuedRenderableCollection::RenderableList
vector< Renderable * >::type RenderableList
Definition: OgreRenderQueueSortingGrouping.h:197
Ogre::Renderable
Abstract class defining the interface all renderable objects must implement.
Definition: OgreRenderable.h:63
Ogre::RenderPriorityGroup::mSplitPassesByLightingType
bool mSplitPassesByLightingType
Definition: OgreRenderQueueSortingGrouping.h:329
Ogre::QueuedRenderableCollection::msRadixSorter2
static RadixSort< RenderablePassList, RenderablePass, float > msRadixSorter2
Radix sorter for sort value 2 (distance)
Definition: OgreRenderQueueSortingGrouping.h:232
Ogre::Pass
Class defining a single pass of a Technique (of a Material), i.e.
Definition: OgrePass.h:80
Ogre::RenderPriorityGroup::resetOrganisationModes
void resetOrganisationModes(void)
Reset the organisation modes required for the solids in this group.
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::RenderPriorityGroup::setSplitPassesByLightingType
void setSplitPassesByLightingType(bool split)
Sets whether or not the queue will split passes by their lighting type, ie ambient, per-light and decal.
Definition: OgreRenderQueueSortingGrouping.h:429
Ogre::MapIteratorWrapper::getNext
ValueType getNext()
Returns the next(=current) value element in the collection, and advances to the next.
Definition: OgreIteratorWrapper.h:299
Ogre::RenderPriorityGroup::getSolidsNoShadowReceive
const QueuedRenderableCollection & getSolidsNoShadowReceive(void) const
Get the collection of solids for which shadow receipt is disabled (only applicable when shadows are e...
Definition: OgreRenderQueueSortingGrouping.h:381
Ogre::RenderQueueGroup::setSplitPassesByLightingType
void setSplitPassesByLightingType(bool split)
Sets whether or not the queue will split passes by their lighting type, ie ambient, per-light and decal.
Definition: OgreRenderQueueSortingGrouping.h:594
Ogre::vector::type
std::vector< T, A > type
Definition: OgrePrerequisites.h:494
OGRE_DELETE
#define OGRE_DELETE
Definition: OgreMemoryAllocatorConfig.h:474
Ogre::QueuedRenderableCollection::DepthSortDescendingLess::DepthSortDescendingLess
DepthSortDescendingLess(const Camera *cam)
Definition: OgreRenderQueueSortingGrouping.h:161
Ogre::QueuedRenderableVisitor::~QueuedRenderableVisitor
virtual ~QueuedRenderableVisitor()
Definition: OgreRenderQueueSortingGrouping.h:73
Ogre::MapIterator
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:319
Ogre::ConstMapIterator
Concrete IteratorWrapper for const access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:352
Ogre::RenderPriorityGroup::mTransparents
QueuedRenderableCollection mTransparents
Transparent list.
Definition: OgreRenderQueueSortingGrouping.h:343
Ogre::RenderQueueGroup::mSplitNoShadowPasses
bool mSplitNoShadowPasses
Definition: OgreRenderQueueSortingGrouping.h:474
Ogre::RenderQueueGroup::defaultOrganisationMode
void defaultOrganisationMode(void)
Setthe sorting / grouping mode for the solids in this group to the default.
Definition: OgreRenderQueueSortingGrouping.h:673
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::RenderPriorityGroup::getTransparents
const QueuedRenderableCollection & getTransparents(void) const
Get the collection of transparent objects currently queued.
Definition: OgreRenderQueueSortingGrouping.h:387
OgreTechnique.h
Ogre::RenderPriorityGroup::mSplitNoShadowPasses
bool mSplitNoShadowPasses
Definition: OgreRenderQueueSortingGrouping.h:330
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:92
Ogre::Pass::getHash
uint32 getHash(void) const
Gets the &#39;hash&#39; of this pass, ie a precomputed number to use for sorting.
Definition: OgrePass.h:1500
Ogre::RenderPriorityGroup::getTransparentsUnsorted
const QueuedRenderableCollection & getTransparentsUnsorted(void) const
Get the collection of transparent objects currently queued.
Definition: OgreRenderQueueSortingGrouping.h:384
Ogre::QueuedRenderableCollection::mGrouped
PassGroupRenderableMap mGrouped
Grouped.
Definition: OgreRenderQueueSortingGrouping.h:238
Ogre::RenderPriorityGroup::addRenderable
void addRenderable(Renderable *pRend, Technique *pTech)
Add a renderable to this group.
OGRE_NEW
#define OGRE_NEW
Definition: OgreMemoryAllocatorConfig.h:473
Ogre::RenderPriorityGroup::mSolidsNoShadowReceive
QueuedRenderableCollection mSolidsNoShadowReceive
Solid pass list, used when shadows are enabled but shadow receive is turned off for these passes...
Definition: OgreRenderQueueSortingGrouping.h:339
Ogre::QueuedRenderableCollection::resetOrganisationModes
void resetOrganisationModes(void)
Reset the organisation modes required for this collection.
Definition: OgreRenderQueueSortingGrouping.h:268
Ogre::RenderQueueGroup::addOrganisationMode
void addOrganisationMode(QueuedRenderableCollection::OrganisationMode om)
Add a required sorting / grouping mode for the solids in this group.
Definition: OgreRenderQueueSortingGrouping.h:655
Ogre::RenderPriorityGroup::mTransparentsUnsorted
QueuedRenderableCollection mTransparentsUnsorted
Unsorted transparent list.
Definition: OgreRenderQueueSortingGrouping.h:341
Ogre::RenderQueueGroup::mShadowsEnabled
bool mShadowsEnabled
Whether shadows are enabled for this queue.
Definition: OgreRenderQueueSortingGrouping.h:479
Ogre::RenderQueueGroup::setSplitNoShadowPasses
void setSplitNoShadowPasses(bool split)
Sets whether or not the queue will split passes which have shadow receive turned off (in their parent...
Definition: OgreRenderQueueSortingGrouping.h:608
Ogre::QueuedRenderableCollection::PassGroupRenderableMap
map< Pass *, RenderableList *, PassGroupLess >::type PassGroupRenderableMap
Map of pass to renderable lists, this is a grouping by pass.
Definition: OgreRenderQueueSortingGrouping.h:199
Ogre::RenderQueueGroup::setShadowCastersCannotBeReceivers
void setShadowCastersCannotBeReceivers(bool ind)
Sets whether or not objects which cast shadows should be treated as never receiving shadows...
Definition: OgreRenderQueueSortingGrouping.h:621
Ogre::QueuedRenderableCollection::RadixSortFunctorPass::operator()
uint32 operator()(const RenderablePass &p) const
Definition: OgreRenderQueueSortingGrouping.h:204
Ogre::MapIteratorWrapper::peekNextKey
KeyType peekNextKey(void) const
Returns the next(=current) key element in the collection, without advancing to the next...
Definition: OgreIteratorWrapper.h:277
Ogre::RenderQueueGroup::resetOrganisationModes
void resetOrganisationModes(void)
Reset the organisation modes required for the solids in this group.
Definition: OgreRenderQueueSortingGrouping.h:637
OgrePass.h
Ogre::RenderablePass::RenderablePass
RenderablePass(Renderable *rend, Pass *p)
Definition: OgreRenderQueueSortingGrouping.h:58
Ogre::QueuedRenderableCollection::mOrganisationMode
uint8 mOrganisationMode
Bitmask of the organisation modes requested.
Definition: OgreRenderQueueSortingGrouping.h:235
Ogre::RenderPriorityGroup::mShadowCastersNotReceivers
bool mShadowCastersNotReceivers
Definition: OgreRenderQueueSortingGrouping.h:331
OgrePrerequisites.h
Ogre::QueuedRenderableCollection
Lowest level collection of renderables.
Definition: OgreRenderQueueSortingGrouping.h:113
Ogre::RenderPriorityGroup::getSolidsDiffuseSpecular
const QueuedRenderableCollection & getSolidsDiffuseSpecular(void) const
Get the collection of solids currently queued per light (only applicable in additive shadow modes)...
Definition: OgreRenderQueueSortingGrouping.h:373
Ogre::RenderQueueGroup
A grouping level underneath RenderQueue which groups renderables to be issued at coarsely the same ti...
Definition: OgreRenderQueueSortingGrouping.h:465
Ogre::RenderQueueGroup::setShadowsEnabled
void setShadowsEnabled(bool enabled)
Indicate whether a given queue group will be doing any shadow setup.
Definition: OgreRenderQueueSortingGrouping.h:586
Ogre::RenderQueueGroup::getShadowsEnabled
bool getShadowsEnabled(void) const
Are shadows enabled for this queue?
Definition: OgreRenderQueueSortingGrouping.h:589
Ogre::QueuedRenderableCollection::RadixSortFunctorPass
Functor for accessing sort value 1 for radix sort (Pass)
Definition: OgreRenderQueueSortingGrouping.h:202
Ogre::QueuedRenderableCollection::RadixSortFunctorDistance::operator()
float operator()(const RenderablePass &p) const
Definition: OgreRenderQueueSortingGrouping.h:223
Ogre::uint8
unsigned char uint8
Definition: OgrePlatform.h:361
Ogre::RenderPriorityGroup
Collection of renderables by priority.
Definition: OgreRenderQueueSortingGrouping.h:323
Ogre::RenderablePass::renderable
Renderable * renderable
Pointer to the Renderable details.
Definition: OgreRenderQueueSortingGrouping.h:54
Ogre::QueuedRenderableCollection::mSortedDescending
RenderablePassList mSortedDescending
Sorted descending (can iterate backwards to get ascending)
Definition: OgreRenderQueueSortingGrouping.h:240
Ogre::RenderQueueGroup::mParent
RenderQueue * mParent
Definition: OgreRenderQueueSortingGrouping.h:472
Ogre::QueuedRenderableCollection::PassGroupLess::operator()
bool _OgreExport operator()(const Pass *a, const Pass *b) const
Definition: OgreRenderQueueSortingGrouping.h:140
Ogre::RenderablePass::pass
Pass * pass
Pointer to the Pass.
Definition: OgreRenderQueueSortingGrouping.h:56
Ogre::Renderable::getSquaredViewDepth
virtual Real getSquaredViewDepth(const Camera *cam) const =0
Returns the camera-relative squared depth of this renderable.
Ogre::RenderQueueGroup::mShadowCastersNotReceivers
bool mShadowCastersNotReceivers
Definition: OgreRenderQueueSortingGrouping.h:475
Ogre::RenderQueueGroup::merge
void merge(const RenderQueueGroup *rhs)
Merge group of renderables.
Definition: OgreRenderQueueSortingGrouping.h:687
Ogre::QueuedRenderableCollection::DepthSortDescendingLess
Comparator to order objects by descending camera distance.
Definition: OgreRenderQueueSortingGrouping.h:157
Ogre::RenderPriorityGroup::setSplitNoShadowPasses
void setSplitNoShadowPasses(bool split)
Sets whether or not passes which have shadow receive disabled should be separated.
Definition: OgreRenderQueueSortingGrouping.h:437
Ogre::RenderPriorityGroup::mSolidsDiffuseSpecular
QueuedRenderableCollection mSolidsDiffuseSpecular
Solid per-light pass list, used with additive shadows.
Definition: OgreRenderQueueSortingGrouping.h:335
Ogre::QueuedRenderableCollection::PassGroupLess
Comparator to order pass groups.
Definition: OgreRenderQueueSortingGrouping.h:138
Ogre::Camera
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:86
Ogre::RenderPriorityGroup::addOrganisationMode
void addOrganisationMode(QueuedRenderableCollection::OrganisationMode om)
Add a required sorting / grouping mode for the solids in this group.
Ogre::RadixSort
Class for performing a radix sort (fast comparison-less sort based on byte value) on various standard...
Definition: OgreRadixSort.h:88
Ogre::RenderPriorityGroup::getSolidsBasic
const QueuedRenderableCollection & getSolidsBasic(void) const
Get the collection of basic solids currently queued, this includes all solids when there are no shado...
Definition: OgreRenderQueueSortingGrouping.h:369
Ogre::RenderQueueGroup::getIterator
ConstPriorityMapIterator getIterator(void) const
Get a const iterator for browsing through child contents.
Definition: OgreRenderQueueSortingGrouping.h:514
Ogre::RenderQueueGroup::PriorityMap
map< ushort, RenderPriorityGroup *, std::less< ushort > >::type PriorityMap
Definition: OgreRenderQueueSortingGrouping.h:468
Ogre::RenderQueueGroup::PriorityMapIterator
MapIterator< PriorityMap > PriorityMapIterator
Definition: OgreRenderQueueSortingGrouping.h:469
Ogre::uint32
unsigned int uint32
Definition: OgrePlatform.h:359
Ogre::RenderQueueGroup::clear
void clear(bool destroy=false)
Clears this group of renderables.
Definition: OgreRenderQueueSortingGrouping.h:557
OgreIteratorWrappers.h
Ogre::RenderPriorityGroup::mSolidsBasic
QueuedRenderableCollection mSolidsBasic
Solid pass list, used when no shadows, modulative shadows, or ambient passes for additive.
Definition: OgreRenderQueueSortingGrouping.h:333
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::RenderQueueGroup::mOrganisationMode
uint8 mOrganisationMode
Bitmask of the organisation modes requested (for new priority groups)
Definition: OgreRenderQueueSortingGrouping.h:481
Ogre::RenderablePass
Struct associating a single Pass with a single Renderable.
Definition: OgreRenderQueueSortingGrouping.h:51
Ogre::RenderPriorityGroup::~RenderPriorityGroup
~RenderPriorityGroup()
Definition: OgreRenderQueueSortingGrouping.h:363
Ogre::vector
Definition: OgrePrerequisites.h:491
Ogre::QueuedRenderableCollection::RadixSortFunctorDistance::camera
const Camera * camera
Definition: OgreRenderQueueSortingGrouping.h:216
Ogre::QueuedRenderableCollection::RenderablePassList
vector< RenderablePass >::type RenderablePassList
Vector of RenderablePass objects, this is built on the assumption that vectors only ever increase in ...
Definition: OgreRenderQueueSortingGrouping.h:196
Ogre::QueuedRenderableCollection::DepthSortDescendingLess::camera
const Camera * camera
Definition: OgreRenderQueueSortingGrouping.h:159
Ogre::RenderQueueGroup::~RenderQueueGroup
~RenderQueueGroup()
Definition: OgreRenderQueueSortingGrouping.h:498
Ogre::RenderPriorityGroup::getSolidsDecal
const QueuedRenderableCollection & getSolidsDecal(void) const
Get the collection of solids currently queued for decal passes (only applicable in additive shadow mo...
Definition: OgreRenderQueueSortingGrouping.h:377
Ogre::Technique
Class representing an approach to rendering this particular Material.
Definition: OgreTechnique.h:53
Ogre::map
Definition: OgrePrerequisites.h:533
Ogre::QueuedRenderableCollection::RadixSortFunctorDistance
Functor for descending sort value 2 for radix sort (distance)
Definition: OgreRenderQueueSortingGrouping.h:214
Ogre::ushort
unsigned short ushort
Definition: OgrePrerequisites.h:113
Ogre::QueuedRenderableCollection::DepthSortDescendingLess::operator()
bool _OgreExport operator()(const RenderablePass &a, const RenderablePass &b) const
Definition: OgreRenderQueueSortingGrouping.h:166
Ogre::RenderQueueGroup::ConstPriorityMapIterator
ConstMapIterator< PriorityMap > ConstPriorityMapIterator
Definition: OgreRenderQueueSortingGrouping.h:470
Ogre::RenderPriorityGroup::setShadowCastersCannotBeReceivers
void setShadowCastersCannotBeReceivers(bool ind)
Sets whether or not objects which cast shadows should be treated as never receiving shadows...
Definition: OgreRenderQueueSortingGrouping.h:445
OgreMaterial.h
Ogre::QueuedRenderableCollection::msRadixSorter1
static RadixSort< RenderablePassList, RenderablePass, uint32 > msRadixSorter1
Radix sorter for accessing sort value 1 (Pass)
Definition: OgreRenderQueueSortingGrouping.h:211
Ogre::IteratorWrapper::hasMoreElements
bool hasMoreElements() const
Returns true if there are more items in the collection.
Definition: OgreIteratorWrapper.h:97
Ogre::QueuedRenderableCollection::addOrganisationMode
void addOrganisationMode(OrganisationMode om)
Add a required sorting / grouping mode to this collection when next used.
Definition: OgreRenderQueueSortingGrouping.h:278
Ogre::QueuedRenderableCollection::RadixSortFunctorDistance::RadixSortFunctorDistance
RadixSortFunctorDistance(const Camera *cam)
Definition: OgreRenderQueueSortingGrouping.h:218
Ogre::QueuedRenderableVisitor
Visitor interface for items in a QueuedRenderableCollection.
Definition: OgreRenderQueueSortingGrouping.h:69
Ogre::QueuedRenderableVisitor::QueuedRenderableVisitor
QueuedRenderableVisitor()
Definition: OgreRenderQueueSortingGrouping.h:72
Ogre::RenderQueueGroup::mSplitPassesByLightingType
bool mSplitPassesByLightingType
Definition: OgreRenderQueueSortingGrouping.h:473
Ogre::RenderPriorityGroup::mParent
RenderQueueGroup * mParent
Parent queue group.
Definition: OgreRenderQueueSortingGrouping.h:328
Ogre::RenderQueueGroup::getIterator
PriorityMapIterator getIterator(void)
Get an iterator for browsing through child contents.
Definition: OgreRenderQueueSortingGrouping.h:508
Ogre::Math::RealEqual
static bool RealEqual(Real a, Real b, Real tolerance=std::numeric_limits< Real >::epsilon())
Compare 2 reals, using tolerance for inaccuracies.
Ogre::RenderQueueGroup::mPriorityGroups
PriorityMap mPriorityGroups
Map of RenderPriorityGroup objects.
Definition: OgreRenderQueueSortingGrouping.h:477
Ogre::RenderPriorityGroup::mSolidsDecal
QueuedRenderableCollection mSolidsDecal
Solid decal (texture) pass list, used with additive shadows.
Definition: OgreRenderQueueSortingGrouping.h:337
Ogre::QueuedRenderableCollection::OrganisationMode
OrganisationMode
Organisation modes required for this collection.
Definition: OgreRenderQueueSortingGrouping.h:124
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:58
Ogre::RenderQueueGroup::RenderQueueGroup
RenderQueueGroup(RenderQueue *parent, bool splitPassesByLightingType, bool splitNoShadowPasses, bool shadowCastersNotReceivers)
Definition: OgreRenderQueueSortingGrouping.h:485

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