#include <OgreInstancedGeometry.h>
Public Types | |
typedef std::list< OptimisedSubMeshGeometry * > | OptimisedSubMeshGeometryList |
typedef std::vector< SubMeshLodGeometryLink > | SubMeshLodGeometryLinkList |
typedef std::map< SubMesh *, SubMeshLodGeometryLinkList * > | SubMeshGeometryLookup |
typedef std::vector< QueuedSubMesh * > | QueuedSubMeshList |
typedef std::vector< String > | QueuedSubMeshOriginList |
typedef std::vector< QueuedGeometry * > | QueuedGeometryList |
typedef std::map< uint32, BatchInstance * > | BatchInstanceMap |
Indexed BatchInstance map based on packed x/y/z BatchInstance index, 10 bits for each axis. | |
typedef std::vector< RenderOperation * > | RenderOperationVector |
Simple vectors where are stored all the renderoperations of the Batch. | |
typedef MapIterator< BatchInstanceMap > | BatchInstanceIterator |
Iterator for iterating over contained BatchInstances. | |
Public Member Functions | |
InstancedGeometry (SceneManager *owner, const String &name) | |
Constructor; do not use directly ( SceneManager::createInstancedGeometry). | |
virtual | ~InstancedGeometry () |
Destructor. | |
const String & | getName (void) const |
Get the name of this object. | |
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. | |
virtual void | addSceneNode (const SceneNode *node) |
Adds all the Entity objects attached to a SceneNode and all it's children to the static geometry. | |
virtual void | build (void) |
Build the geometry. | |
void | addBatchInstance (void) |
Add a new batch instance. | |
virtual void | destroy (void) |
Destroys all the built geometry state (reverse of build). | |
virtual void | reset (void) |
Clears any of the entities / nodes added to this geometry and destroys anything which has already been built. | |
virtual void | setRenderingDistance (Real dist) |
Sets the distance at which batches are no longer rendered. | |
virtual Real | getRenderingDistance (void) const |
Gets the distance at which batches are no longer rendered. | |
virtual Real | getSquaredRenderingDistance (void) const |
Gets the squared distance at which batches are no longer rendered. | |
virtual void | setVisible (bool visible) |
Hides or shows all the batches. | |
virtual bool | isVisible (void) const |
Are the batches visible? | |
virtual void | setCastShadows (bool castShadows) |
Sets whether this geometry should cast shadows. | |
virtual bool | getCastShadows (void) |
Will the geometry from this object cast shadows? | |
virtual void | setBatchInstanceDimensions (const Vector3 &size) |
Sets the size of a single BatchInstance of geometry. | |
virtual const Vector3 & | getBatchInstanceDimensions (void) const |
Gets the size of a single batch of geometry. | |
virtual void | setOrigin (const Vector3 &origin) |
Sets the origin of the geometry. | |
virtual const Vector3 & | getOrigin (void) const |
Gets the origin of this geometry. | |
virtual void | setRenderQueueGroup (uint8 queueID) |
Sets the render queue group this object will be rendered through. | |
virtual uint8 | getRenderQueueGroup (void) const |
Gets the queue group for this entity, see setRenderQueueGroup for full details. | |
BatchInstanceIterator | getBatchInstanceIterator (void) |
Get an iterator over the BatchInstances in this geometry. | |
RenderOperationVector & | getRenderOperationVector () |
get the mRenderOps vector. | |
virtual void | dump (const String &filename) const |
Dump the contents of this InstancedGeometry to a file for diagnostic purposes. | |
SkeletonInstance * | getBaseSkeletonInstance (void) |
SkeletonPtr | getBaseSkeleton (void) |
AnimationStateSet * | getBaseAnimationState (void) |
unsigned int | getObjectCount (void) |
Protected Types | |
typedef std::map< size_t, size_t > | IndexRemap |
Protected Member Functions | |
virtual BatchInstance * | getBatchInstance (const AxisAlignedBox &bounds, bool autoCreate) |
Virtual method for getting a BatchInstance most suitable for the passed in bounds. | |
virtual BatchInstance * | getBatchInstance (const Vector3 &point, bool autoCreate) |
Get the BatchInstance within which a point lies. | |
virtual BatchInstance * | getBatchInstance (ushort x, ushort y, ushort z, bool autoCreate) |
Get the BatchInstance using indexes. | |
virtual BatchInstance * | getBatchInstance (uint32 index) |
Get the BatchInstance using a packed index, returns null if it doesn't exist. | |
virtual void | getBatchInstanceIndexes (const Vector3 &point, ushort &x, ushort &y, ushort &z) |
Get the BatchInstance indexes for a point. | |
virtual BatchInstance * | getInstancedGeometryInstance (void) |
get the first BatchInstance or create on if it does not exists. | |
virtual uint32 | packIndex (ushort x, ushort y, ushort z) |
Pack 3 indexes into a single index value. | |
virtual Real | getVolumeIntersection (const AxisAlignedBox &box, ushort x, ushort y, ushort z) |
Get the volume intersection for an indexed BatchInstance with some bounds. | |
virtual AxisAlignedBox | getBatchInstanceBounds (ushort x, ushort y, ushort z) |
Get the bounds of an indexed BatchInstance. | |
virtual Vector3 | getBatchInstanceCentre (ushort x, ushort y, ushort z) |
Get the centre of an indexed BatchInstance. | |
virtual AxisAlignedBox | calculateBounds (VertexData *vertexData, const Vector3 &position, const Quaternion &orientation, const Vector3 &scale) |
Calculate world bounds from a set of vertex data. | |
SubMeshLodGeometryLinkList * | determineGeometry (SubMesh *sm) |
Look up or calculate the geometry data to use for this SubMesh. | |
void | splitGeometry (VertexData *vd, IndexData *id, SubMeshLodGeometryLink *targetGeomLink) |
Split some shared geometry into dedicated geometry. | |
template<typename T> | |
void | buildIndexRemap (T *pBuffer, size_t numIndexes, IndexRemap &remap) |
Method for figuring out which vertices are used by an index buffer and calculating a remap lookup for a vertex buffer just containing those vertices. | |
template<typename T> | |
void | remapIndexes (T *src, T *dst, const IndexRemap &remap, size_t numIndexes) |
Method for altering indexes based on a remap. | |
Protected Attributes | |
SceneManager * | mOwner |
String | mName |
bool | mBuilt |
Real | mUpperDistance |
Real | mSquaredUpperDistance |
bool | mCastShadows |
Vector3 | mBatchInstanceDimensions |
Vector3 | mHalfBatchInstanceDimensions |
Vector3 | mOrigin |
bool | mVisible |
uint8 | mRenderQueueID |
The render queue to use when rendering this object. | |
bool | mRenderQueueIDSet |
Flags whether the RenderQueue's default should be used. | |
unsigned int | mObjectCount |
number of objects in the batch | |
QueuedSubMeshList | mQueuedSubMeshes |
BatchInstance * | mInstancedGeometryInstance |
SkeletonPtr | mBaseSkeleton |
this is just a pointer to the base skeleton that will be used for each animated object in the batches This pointer has a value only during the creation of the InstancedGeometry | |
SkeletonInstance * | mSkeletonInstance |
AnimationStateSet * | mAnimationState |
This is the main animation state. | |
OptimisedSubMeshGeometryList | mOptimisedSubMeshGeometryList |
List of geometry which has been optimised for SubMesh use This is the primary storage used for cleaning up later. | |
SubMeshGeometryLookup | mSubMeshGeometryLookup |
Cached links from SubMeshes to (potentially optimised) geometry This is not used for deletion since the lookup may reference original vertex data. | |
BatchInstanceMap | mBatchInstanceMap |
Map of BatchInstances. | |
RenderOperationVector | mRenderOps |
This vector stores all the renderOperation used in the batch. | |
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... |
Definition at line 95 of file OgreInstancedGeometry.h.
|
Iterator for iterating over contained BatchInstances.
Definition at line 796 of file OgreInstancedGeometry.h. |
|
Indexed BatchInstance map based on packed x/y/z BatchInstance index, 10 bits for each axis.
Definition at line 496 of file OgreInstancedGeometry.h. |
|
Definition at line 588 of file OgreInstancedGeometry.h. |
|
Definition at line 122 of file OgreInstancedGeometry.h. |
|
Definition at line 157 of file OgreInstancedGeometry.h. |
|
Definition at line 146 of file OgreInstancedGeometry.h. |
|
Definition at line 147 of file OgreInstancedGeometry.h. |
|
Simple vectors where are stored all the renderoperations of the Batch. This vector is used when we want to delete the batch, in order to delete only one time each render operation. Definition at line 502 of file OgreInstancedGeometry.h. |
|
Definition at line 131 of file OgreInstancedGeometry.h. |
|
Definition at line 130 of file OgreInstancedGeometry.h. |
|
Constructor; do not use directly ( SceneManager::createInstancedGeometry).
|
|
Destructor.
|
|
Add a new batch instance.
|
|
Adds an Entity to the static geometry.
|
|
Adds all the Entity objects attached to a SceneNode and all it's children to the static geometry.
|
|
Build the geometry.
|
|
Method for figuring out which vertices are used by an index buffer and calculating a remap lookup for a vertex buffer just containing those vertices.
Definition at line 594 of file OgreInstancedGeometry.h. |
|
Calculate world bounds from a set of vertex data.
|
|
Destroys all the built geometry state (reverse of build).
|
|
Look up or calculate the geometry data to use for this SubMesh.
|
|
Dump the contents of this InstancedGeometry to a file for diagnostic purposes.
|
|
Definition at line 819 of file OgreInstancedGeometry.h. |
|
Definition at line 814 of file OgreInstancedGeometry.h. |
|
Definition at line 809 of file OgreInstancedGeometry.h. |
|
Get the BatchInstance using a packed index, returns null if it doesn't exist.
|
|
Get the BatchInstance using indexes.
|
|
Get the BatchInstance within which a point lies.
|
|
Virtual method for getting a BatchInstance most suitable for the passed in bounds. Can be overridden by subclasses. |
|
Get the bounds of an indexed BatchInstance.
|
|
Get the centre of an indexed BatchInstance.
|
|
Gets the size of a single batch of geometry.
Definition at line 764 of file OgreInstancedGeometry.h. |
|
Get the BatchInstance indexes for a point.
|
|
Get an iterator over the BatchInstances in this geometry.
|
|
Will the geometry from this object cast shadows?
Definition at line 747 of file OgreInstancedGeometry.h. |
|
get the first BatchInstance or create on if it does not exists.
|
|
Get the name of this object.
Definition at line 626 of file OgreInstancedGeometry.h. |
|
Definition at line 824 of file OgreInstancedGeometry.h. |
|
Gets the origin of this geometry.
Definition at line 778 of file OgreInstancedGeometry.h. |
|
Gets the distance at which batches are no longer rendered.
Definition at line 716 of file OgreInstancedGeometry.h. |
|
get the mRenderOps vector.
Definition at line 800 of file OgreInstancedGeometry.h. |
|
Gets the queue group for this entity, see setRenderQueueGroup for full details.
|
|
Gets the squared distance at which batches are no longer rendered.
Definition at line 719 of file OgreInstancedGeometry.h. |
|
Get the volume intersection for an indexed BatchInstance with some bounds.
|
|
Are the batches visible?
Definition at line 726 of file OgreInstancedGeometry.h. |
|
Pack 3 indexes into a single index value.
|
|
Method for altering indexes based on a remap.
Definition at line 607 of file OgreInstancedGeometry.h. |
|
Clears any of the entities / nodes added to this geometry and destroys anything which has already been built.
|
|
Sets the size of a single BatchInstance of geometry.
Definition at line 759 of file OgreInstancedGeometry.h. |
|
Sets whether this geometry should cast shadows.
|
|
Sets the origin of the geometry.
Definition at line 776 of file OgreInstancedGeometry.h. |
|
Sets the distance at which batches are no longer rendered.
Definition at line 710 of file OgreInstancedGeometry.h. |
|
Sets the render queue group this object will be rendered through.
|
|
Hides or shows all the batches.
|
|
Split some shared geometry into dedicated geometry.
|
|
This is the main animation state. All "objects" in the batch will use an instance of this animation state Definition at line 531 of file OgreInstancedGeometry.h. |
|
this is just a pointer to the base skeleton that will be used for each animated object in the batches This pointer has a value only during the creation of the InstancedGeometry
Definition at line 526 of file OgreInstancedGeometry.h. |
|
Definition at line 511 of file OgreInstancedGeometry.h. |
|
Map of BatchInstances.
Definition at line 543 of file OgreInstancedGeometry.h. |
|
Definition at line 507 of file OgreInstancedGeometry.h. |
|
Definition at line 510 of file OgreInstancedGeometry.h. |
|
Definition at line 512 of file OgreInstancedGeometry.h. |
|
Definition at line 522 of file OgreInstancedGeometry.h. |
|
Definition at line 506 of file OgreInstancedGeometry.h. |
|
number of objects in the batch
Definition at line 520 of file OgreInstancedGeometry.h. |
|
List of geometry which has been optimised for SubMesh use This is the primary storage used for cleaning up later.
Definition at line 534 of file OgreInstancedGeometry.h. |
|
Definition at line 513 of file OgreInstancedGeometry.h. |
|
Definition at line 505 of file OgreInstancedGeometry.h. |
|
Definition at line 521 of file OgreInstancedGeometry.h. |
|
This vector stores all the renderOperation used in the batch. See the type definition for more details. Definition at line 547 of file OgreInstancedGeometry.h. |
|
The render queue to use when rendering this object.
Definition at line 516 of file OgreInstancedGeometry.h. |
|
Flags whether the RenderQueue's default should be used.
Definition at line 518 of file OgreInstancedGeometry.h. |
|
Definition at line 527 of file OgreInstancedGeometry.h. |
|
Definition at line 509 of file OgreInstancedGeometry.h. |
|
Cached links from SubMeshes to (potentially optimised) geometry This is not used for deletion since the lookup may reference original vertex data.
Definition at line 540 of file OgreInstancedGeometry.h. |
|
Definition at line 508 of file OgreInstancedGeometry.h. |
|
Definition at line 514 of file OgreInstancedGeometry.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Jul 8 15:21:05 2007