OGRE
1.10.12
Object-Oriented Graphics Rendering Engine
|
Pre-transforms and batches up meshes for efficient use as instanced geometry in a scene. More...
#include <OgreInstancedGeometry.h>
Classes | |
class | BatchInstance |
The details of a topological BatchInstance which is the highest level of partitioning for this class. More... | |
class | GeometryBucket |
A GeometryBucket is a the lowest level bucket where geometry with the same vertex & index format is stored. More... | |
class | InstancedObject |
class | LODBucket |
A LODBucket is a collection of smaller buckets with the same LOD. More... | |
class | MaterialBucket |
A MaterialBucket is a collection of smaller buckets with the same Material (and implicitly the same LOD). More... | |
class | OptimisedSubMeshGeometry |
Struct holding geometry optimised per SubMesh / LOD level, ready for copying to instances. More... | |
struct | QueuedGeometry |
Structure recording a queued geometry for low level builds. More... | |
struct | QueuedSubMesh |
Structure recording a queued submesh for the build. More... | |
struct | SubMeshLodGeometryLink |
Saved link between SubMesh at a LOD and vertex/index data May point to original or optimised geometry. More... | |
Public Types | |
typedef MapIterator< BatchInstanceMap > | BatchInstanceIterator |
Iterator for iterating over contained BatchInstances. More... | |
typedef map< uint32, BatchInstance * >::type | BatchInstanceMap |
Indexed BatchInstance map based on packed x/y/z BatchInstance index, 10 bits for each axis. More... | |
typedef list< OptimisedSubMeshGeometry * >::type | OptimisedSubMeshGeometryList |
typedef vector< QueuedGeometry * >::type | QueuedGeometryList |
typedef vector< QueuedSubMesh * >::type | QueuedSubMeshList |
typedef vector< String >::type | QueuedSubMeshOriginList |
typedef vector< RenderOperation * >::type | RenderOperationVector |
Simple vectors where are stored all the render operations of the Batch. More... | |
typedef map< SubMesh *, SubMeshLodGeometryLinkList * >::type | SubMeshGeometryLookup |
typedef vector< SubMeshLodGeometryLink >::type | SubMeshLodGeometryLinkList |
Public Member Functions | |
InstancedGeometry (SceneManager *owner, const String &name) | |
Constructor; do not use directly (. More... | |
virtual | ~InstancedGeometry () |
Destructor. More... | |
void | addBatchInstance (void) |
Add a new batch instance. More... | |
virtual void | addEntity (Entity *ent, const Vector3 &position, const Quaternion &orientation=Quaternion::IDENTITY, const Vector3 &scale=Vector3::UNIT_SCALE) |
Adds an Entity to the static geometry. More... | |
virtual void | addSceneNode (const SceneNode *node) |
Adds all the Entity objects attached to a SceneNode and all it's children to the static geometry. More... | |
virtual void | build (void) |
Build the geometry. More... | |
virtual void | destroy (void) |
Destroys all the built geometry state (reverse of build). More... | |
virtual void | dump (const String &filename) const |
Dump the contents of this InstancedGeometry to a file for diagnostic purposes. More... | |
AnimationStateSet * | getBaseAnimationState (void) |
SkeletonPtr | getBaseSkeleton (void) |
SkeletonInstance * | getBaseSkeletonInstance (void) |
virtual const Vector3 & | getBatchInstanceDimensions (void) const |
Gets the size of a single batch of geometry. More... | |
BatchInstanceIterator | getBatchInstanceIterator (void) |
Get an iterator over the BatchInstances in this geometry. More... | |
virtual bool | getCastShadows (void) |
Will the geometry from this object cast shadows? More... | |
const String & | getName (void) const |
Get the name of this object. More... | |
unsigned int | getObjectCount (void) |
virtual const Vector3 & | getOrigin (void) const |
Gets the origin of this geometry. More... | |
virtual bool | getProvideWorldInverses (void) const |
virtual Real | getRenderingDistance (void) const |
Gets the distance at which batches are no longer rendered. More... | |
RenderOperationVector & | getRenderOperationVector () |
get the mRenderOps vector. More... | |
virtual uint8 | getRenderQueueGroup (void) const |
Gets the queue group for this entity, see setRenderQueueGroup for full details. More... | |
virtual Real | getSquaredRenderingDistance (void) const |
Gets the squared distance at which batches are no longer rendered. More... | |
virtual bool | isVisible (void) const |
Are the batches visible? More... | |
virtual void | reset (void) |
Clears any of the entities / nodes added to this geometry and destroys anything which has already been built. More... | |
virtual void | setBatchInstanceDimensions (const Vector3 &size) |
Sets the size of a single BatchInstance of geometry. More... | |
virtual void | setCastShadows (bool castShadows) |
Sets whether this geometry should cast shadows. More... | |
virtual void | setOrigin (const Vector3 &origin) |
Sets the origin of the geometry. More... | |
virtual void | setProvideWorldInverses (bool flag) |
virtual void | setRenderingDistance (Real dist) |
Sets the distance at which batches are no longer rendered. More... | |
virtual void | setRenderQueueGroup (uint8 queueID) |
Sets the render queue group this object will be rendered through. More... | |
virtual void | setVisible (bool visible) |
Hides or shows all the batches. More... | |
void | visitRenderables (Renderable::Visitor *visitor, bool debugRenderables=false) |
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject will add to the render queue when asked, if any. More... | |
Pre-transforms and batches up meshes for efficient use as instanced geometry in a scene.
typedef map<SubMesh*, SubMeshLodGeometryLinkList*>::type Ogre::InstancedGeometry::SubMeshGeometryLookup |
typedef vector<QueuedSubMesh*>::type Ogre::InstancedGeometry::QueuedSubMeshList |
typedef vector<String>::type Ogre::InstancedGeometry::QueuedSubMeshOriginList |
typedef vector<QueuedGeometry*>::type Ogre::InstancedGeometry::QueuedGeometryList |
typedef map<uint32, BatchInstance*>::type Ogre::InstancedGeometry::BatchInstanceMap |
Indexed BatchInstance map based on packed x/y/z BatchInstance index, 10 bits for each axis.
typedef vector<RenderOperation*>::type Ogre::InstancedGeometry::RenderOperationVector |
Simple vectors where are stored all the render operations of the Batch.
This vector is used when we want to delete the batch, in order to delete only one time each render operation.
Iterator for iterating over contained BatchInstances.
Ogre::InstancedGeometry::InstancedGeometry | ( | SceneManager * | owner, |
const String & | name | ||
) |
Constructor; do not use directly (.
|
virtual |
Destructor.
|
inline |
Get the name of this object.
References Ogre::Quaternion::IDENTITY, and Ogre::Vector3::UNIT_SCALE.
|
virtual |
Adds an Entity to the static geometry.
|
virtual |
Adds all the Entity objects attached to a SceneNode and all it's children to the static geometry.
node | Pointer to the node to use to provide a set of Entity templates |
|
virtual |
Build the geometry.
void Ogre::InstancedGeometry::addBatchInstance | ( | void | ) |
Add a new batch instance.
|
virtual |
Destroys all the built geometry state (reverse of build).
|
virtual |
Clears any of the entities / nodes added to this geometry and destroys anything which has already been built.
|
inlinevirtual |
Sets the distance at which batches are no longer rendered.
dist | Distance beyond which the batches will not be rendered (the default is 0, which means batches are always rendered). |
|
inlinevirtual |
Gets the distance at which batches are no longer rendered.
|
inlinevirtual |
Gets the squared distance at which batches are no longer rendered.
|
virtual |
Hides or shows all the batches.
|
inlinevirtual |
Are the batches visible?
|
virtual |
Sets whether this geometry should cast shadows.
|
inlinevirtual |
Will the geometry from this object cast shadows?
|
inlinevirtual |
Sets the size of a single BatchInstance of geometry.
size | Vector3 expressing the 3D size of each BatchInstance. |
|
inlinevirtual |
Gets the size of a single batch of geometry.
|
inlinevirtual |
Sets the origin of the geometry.
origin | Vector3 expressing the 3D origin of the geometry. |
|
inlinevirtual |
Gets the origin of this geometry.
|
virtual |
Sets the render queue group this object will be rendered through.
queueID | Enumerated value of the queue group to use. |
|
virtual |
Gets the queue group for this entity, see setRenderQueueGroup for full details.
BatchInstanceIterator Ogre::InstancedGeometry::getBatchInstanceIterator | ( | void | ) |
Get an iterator over the BatchInstances in this geometry.
|
inline |
get the mRenderOps vector.
void Ogre::InstancedGeometry::visitRenderables | ( | Renderable::Visitor * | visitor, |
bool | debugRenderables = false |
||
) |
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject will add to the render queue when asked, if any.
visitor | Pointer to a class implementing the Renderable::Visitor interface which will be called back for each Renderable which will be queued. Bear in mind that the state of the Renderable instances may not be finalised depending on when you call this. |
debugRenderables | If false, only regular renderables will be visited (those for normal display). If true, debug renderables will be included too. |
|
virtual |
Dump the contents of this InstancedGeometry to a file for diagnostic purposes.
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
|
inlinevirtual |