Pre-transforms and batches up meshes for efficient use as static geometry in a scene. More...
#include <OgreStaticGeometry.h>

Classes | |
| class | GeometryBucket |
| A GeometryBucket is a the lowest level bucket where geometry with the same vertex & index format is stored. More... | |
| 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... | |
| class | Region |
| The details of a topological region which is the highest level of partitioning for this class. 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 list < OptimisedSubMeshGeometry * > ::type | OptimisedSubMeshGeometryList |
| typedef vector< QueuedGeometry * > ::type | QueuedGeometryList |
| typedef vector< QueuedSubMesh * > ::type | QueuedSubMeshList |
| typedef MapIterator< RegionMap > | RegionIterator |
| Iterator for iterating over contained regions. | |
| typedef map< uint32, Region * > ::type | RegionMap |
| Indexed region map based on packed x/y/z region index, 10 bits for each axis. | |
| typedef map< SubMesh *, SubMeshLodGeometryLinkList * > ::type | SubMeshGeometryLookup |
| typedef vector < SubMeshLodGeometryLink > ::type | SubMeshLodGeometryLinkList |
Public Member Functions | |
| StaticGeometry (SceneManager *owner, const String &name) | |
| Constructor; do not use directly (. | |
| virtual | ~StaticGeometry () |
| Destructor. | |
| 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. | |
| virtual void | destroy (void) |
| Destroys all the built geometry state (reverse of build). | |
| virtual void | dump (const String &filename) const |
| Dump the contents of this StaticGeometry to a file for diagnostic purposes. | |
| virtual bool | getCastShadows (void) |
| Will the geometry from this object cast shadows? | |
| const String & | getName (void) const |
| Get the name of this object. | |
| virtual const Vector3 & | getOrigin (void) const |
| Gets the origin of this geometry. | |
| virtual const Vector3 & | getRegionDimensions (void) const |
| Gets the size of a single batch of geometry. | |
| RegionIterator | getRegionIterator (void) |
| Get an iterator over the regions in this geometry. | |
| virtual Real | getRenderingDistance (void) const |
| Gets the distance at which batches are no longer rendered. | |
| virtual uint8 | getRenderQueueGroup (void) const |
| Gets the queue group for this entity, see setRenderQueueGroup for full details. | |
| virtual Real | getSquaredRenderingDistance (void) const |
| Gets the squared distance at which batches are no longer rendered. | |
| uint32 | getVisibilityFlags () const |
| Returns the visibility flags of the regions. | |
| virtual bool | isVisible (void) const |
| Are the batches visible? | |
| 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 | |
| void * | operator new (size_t sz) |
| void * | operator new (size_t sz, void *ptr) |
| placement operator new | |
| void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
| array operator new, with debug line info | |
| void * | operator new[] (size_t sz) |
| virtual void | reset (void) |
| Clears any of the entities / nodes added to this geometry and destroys anything which has already been built. | |
| virtual void | setCastShadows (bool castShadows) |
| Sets whether this geometry should cast shadows. | |
| virtual void | setOrigin (const Vector3 &origin) |
| Sets the origin of the geometry. | |
| virtual void | setRegionDimensions (const Vector3 &size) |
| Sets the size of a single region of geometry. | |
| virtual void | setRenderingDistance (Real dist) |
| Sets the distance at which batches are no longer rendered. | |
| virtual void | setRenderQueueGroup (uint8 queueID) |
| Sets the render queue group this object will be rendered through. | |
| void | setVisibilityFlags (uint32 flags) |
| Sets the visibility flags of all the regions at once. | |
| virtual void | setVisible (bool visible) |
| Hides or shows all the batches. | |
| void | visitRenderables (Renderable::Visitor *visitor, bool debugRenderables=false) |
Protected Types | |
| typedef map< size_t, size_t >::type | IndexRemap |
Protected Member Functions | |
| 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. | |
| 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. | |
| virtual Region * | getRegion (const AxisAlignedBox &bounds, bool autoCreate) |
| Virtual method for getting a region most suitable for the passed in bounds. | |
| virtual Region * | getRegion (const Vector3 &point, bool autoCreate) |
| Get the region within which a point lies. | |
| virtual Region * | getRegion (ushort x, ushort y, ushort z, bool autoCreate) |
| Get the region using indexes. | |
| virtual Region * | getRegion (uint32 index) |
| Get the region using a packed index, returns null if it doesn't exist. | |
| virtual AxisAlignedBox | getRegionBounds (ushort x, ushort y, ushort z) |
| Get the bounds of an indexed region. | |
| virtual Vector3 | getRegionCentre (ushort x, ushort y, ushort z) |
| Get the centre of an indexed region. | |
| virtual void | getRegionIndexes (const Vector3 &point, ushort &x, ushort &y, ushort &z) |
| Get the region indexes for a point. | |
| virtual Real | getVolumeIntersection (const AxisAlignedBox &box, ushort x, ushort y, ushort z) |
| Get the volume intersection for an indexed region with some bounds. | |
| virtual uint32 | packIndex (ushort x, ushort y, ushort z) |
| Pack 3 indexes into a single index value. | |
| template<typename T > | |
| void | remapIndexes (T *src, T *dst, const IndexRemap &remap, size_t numIndexes) |
| Method for altering indexes based on a remap. | |
| void | splitGeometry (VertexData *vd, IndexData *id, SubMeshLodGeometryLink *targetGeomLink) |
| Split some shared geometry into dedicated geometry. | |
Protected Attributes | |
| bool | mBuilt |
| bool | mCastShadows |
| Vector3 | mHalfRegionDimensions |
| String | mName |
| OptimisedSubMeshGeometryList | mOptimisedSubMeshGeometryList |
| List of geometry which has been optimised for SubMesh use This is the primary storage used for cleaning up later. | |
| Vector3 | mOrigin |
| SceneManager * | mOwner |
| QueuedSubMeshList | mQueuedSubMeshes |
| Vector3 | mRegionDimensions |
| RegionMap | mRegionMap |
| Map of regions. | |
| uint8 | mRenderQueueID |
| The render queue to use when rendering this object. | |
| bool | mRenderQueueIDSet |
| Flags whether the RenderQueue's default should be used. | |
| Real | mSquaredUpperDistance |
| SubMeshGeometryLookup | mSubMeshGeometryLookup |
| Cached links from SubMeshes to (potentially optimised) geometry This is not used for deletion since the lookup may reference original vertex data. | |
| Real | mUpperDistance |
| uint32 | mVisibilityFlags |
| Stores the visibility flags for the regions. | |
| bool | mVisible |
Pre-transforms and batches up meshes for efficient use as static geometry in a scene.
Definition at line 121 of file OgreStaticGeometry.h.
typedef map<size_t, size_t>::type Ogre::StaticGeometry::IndexRemap [protected] |
Definition at line 556 of file OgreStaticGeometry.h.
Definition at line 148 of file OgreStaticGeometry.h.
| typedef vector<QueuedGeometry*>::type Ogre::StaticGeometry::QueuedGeometryList |
Definition at line 180 of file OgreStaticGeometry.h.
| typedef vector<QueuedSubMesh*>::type Ogre::StaticGeometry::QueuedSubMeshList |
Definition at line 171 of file OgreStaticGeometry.h.
Iterator for iterating over contained regions.
Definition at line 765 of file OgreStaticGeometry.h.
| typedef map<uint32, Region*>::type Ogre::StaticGeometry::RegionMap |
Indexed region map based on packed x/y/z region index, 10 bits for each axis.
Definition at line 484 of file OgreStaticGeometry.h.
| typedef map<SubMesh*, SubMeshLodGeometryLinkList*>::type Ogre::StaticGeometry::SubMeshGeometryLookup |
Definition at line 157 of file OgreStaticGeometry.h.
Definition at line 156 of file OgreStaticGeometry.h.
| Ogre::StaticGeometry::StaticGeometry | ( | SceneManager * | owner, |
| const String & | name | ||
| ) |
Constructor; do not use directly (.
| virtual Ogre::StaticGeometry::~StaticGeometry | ( | ) | [virtual] |
Destructor.
| virtual void Ogre::StaticGeometry::addEntity | ( | Entity * | ent, |
| const Vector3 & | position, | ||
| const Quaternion & | orientation = Quaternion::IDENTITY, |
||
| const Vector3 & | scale = Vector3::UNIT_SCALE |
||
| ) | [virtual] |
Adds an Entity to the static geometry.
| virtual void Ogre::StaticGeometry::addSceneNode | ( | const SceneNode * | node | ) | [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 void Ogre::StaticGeometry::build | ( | void | ) | [virtual] |
Build the geometry.
| void Ogre::StaticGeometry::buildIndexRemap | ( | T * | pBuffer, |
| size_t | numIndexes, | ||
| IndexRemap & | remap | ||
| ) | [protected] |
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 562 of file OgreStaticGeometry.h.
| virtual AxisAlignedBox Ogre::StaticGeometry::calculateBounds | ( | VertexData * | vertexData, |
| const Vector3 & | position, | ||
| const Quaternion & | orientation, | ||
| const Vector3 & | scale | ||
| ) | [protected, virtual] |
Calculate world bounds from a set of vertex data.
| virtual void Ogre::StaticGeometry::destroy | ( | void | ) | [virtual] |
Destroys all the built geometry state (reverse of build).
| SubMeshLodGeometryLinkList* Ogre::StaticGeometry::determineGeometry | ( | SubMesh * | sm | ) | [protected] |
Look up or calculate the geometry data to use for this SubMesh.
| virtual void Ogre::StaticGeometry::dump | ( | const String & | filename | ) | const [virtual] |
Dump the contents of this StaticGeometry to a file for diagnostic purposes.
| virtual bool Ogre::StaticGeometry::getCastShadows | ( | void | ) | [virtual] |
Will the geometry from this object cast shadows?
Definition at line 707 of file OgreStaticGeometry.h.
| const String& Ogre::StaticGeometry::getName | ( | void | ) | const |
Get the name of this object.
Definition at line 594 of file OgreStaticGeometry.h.
| virtual const Vector3& Ogre::StaticGeometry::getOrigin | ( | void | ) | const [virtual] |
Gets the origin of this geometry.
Definition at line 738 of file OgreStaticGeometry.h.
| virtual Region* Ogre::StaticGeometry::getRegion | ( | const AxisAlignedBox & | bounds, |
| bool | autoCreate | ||
| ) | [protected, virtual] |
Virtual method for getting a region most suitable for the passed in bounds.
Can be overridden by subclasses.
| virtual Region* Ogre::StaticGeometry::getRegion | ( | const Vector3 & | point, |
| bool | autoCreate | ||
| ) | [protected, virtual] |
Get the region within which a point lies.
| virtual Region* Ogre::StaticGeometry::getRegion | ( | ushort | x, |
| ushort | y, | ||
| ushort | z, | ||
| bool | autoCreate | ||
| ) | [protected, virtual] |
Get the region using indexes.
| virtual Region* Ogre::StaticGeometry::getRegion | ( | uint32 | index | ) | [protected, virtual] |
Get the region using a packed index, returns null if it doesn't exist.
| virtual AxisAlignedBox Ogre::StaticGeometry::getRegionBounds | ( | ushort | x, |
| ushort | y, | ||
| ushort | z | ||
| ) | [protected, virtual] |
Get the bounds of an indexed region.
| virtual Vector3 Ogre::StaticGeometry::getRegionCentre | ( | ushort | x, |
| ushort | y, | ||
| ushort | z | ||
| ) | [protected, virtual] |
Get the centre of an indexed region.
| virtual const Vector3& Ogre::StaticGeometry::getRegionDimensions | ( | void | ) | const [virtual] |
Gets the size of a single batch of geometry.
Definition at line 724 of file OgreStaticGeometry.h.
| virtual void Ogre::StaticGeometry::getRegionIndexes | ( | const Vector3 & | point, |
| ushort & | x, | ||
| ushort & | y, | ||
| ushort & | z | ||
| ) | [protected, virtual] |
Get the region indexes for a point.
Get an iterator over the regions in this geometry.
| virtual Real Ogre::StaticGeometry::getRenderingDistance | ( | void | ) | const [virtual] |
Gets the distance at which batches are no longer rendered.
Definition at line 676 of file OgreStaticGeometry.h.
| virtual uint8 Ogre::StaticGeometry::getRenderQueueGroup | ( | void | ) | const [virtual] |
Gets the queue group for this entity, see setRenderQueueGroup for full details.
| virtual Real Ogre::StaticGeometry::getSquaredRenderingDistance | ( | void | ) | const [virtual] |
Gets the squared distance at which batches are no longer rendered.
Definition at line 679 of file OgreStaticGeometry.h.
Returns the visibility flags of the regions.
| virtual Real Ogre::StaticGeometry::getVolumeIntersection | ( | const AxisAlignedBox & | box, |
| ushort | x, | ||
| ushort | y, | ||
| ushort | z | ||
| ) | [protected, virtual] |
Get the volume intersection for an indexed region with some bounds.
| virtual bool Ogre::StaticGeometry::isVisible | ( | void | ) | const [virtual] |
Are the batches visible?
Definition at line 686 of file OgreStaticGeometry.h.
| void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | [inherited] |
Definition at line 96 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, |
| void * | |||
| ) | [inherited] |
Definition at line 102 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, |
| const char * | , | ||
| int | , | ||
| const char * | |||
| ) | [inherited] |
Definition at line 108 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | [inherited] |
Definition at line 113 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr, |
| const char * | , | ||
| int | , | ||
| const char * | |||
| ) | [inherited] |
Definition at line 119 of file OgreMemoryAllocatedObject.h.
| 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.
| void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | [inherited] |
Definition at line 73 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, |
| void * | ptr | ||
| ) | [inherited] |
placement operator new
Definition at line 79 of file OgreMemoryAllocatedObject.h.
| 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.
| void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | [inherited] |
Definition at line 91 of file OgreMemoryAllocatedObject.h.
| virtual uint32 Ogre::StaticGeometry::packIndex | ( | ushort | x, |
| ushort | y, | ||
| ushort | z | ||
| ) | [protected, virtual] |
Pack 3 indexes into a single index value.
| void Ogre::StaticGeometry::remapIndexes | ( | T * | src, |
| T * | dst, | ||
| const IndexRemap & | remap, | ||
| size_t | numIndexes | ||
| ) | [protected] |
Method for altering indexes based on a remap.
Definition at line 575 of file OgreStaticGeometry.h.
| virtual void Ogre::StaticGeometry::reset | ( | void | ) | [virtual] |
Clears any of the entities / nodes added to this geometry and destroys anything which has already been built.
| virtual void Ogre::StaticGeometry::setCastShadows | ( | bool | castShadows | ) | [virtual] |
Sets whether this geometry should cast shadows.
| virtual void Ogre::StaticGeometry::setOrigin | ( | const Vector3 & | origin | ) | [virtual] |
Sets the origin of the geometry.
| origin | Vector3 expressing the 3D origin of the geometry. |
Definition at line 736 of file OgreStaticGeometry.h.
| virtual void Ogre::StaticGeometry::setRegionDimensions | ( | const Vector3 & | size | ) | [virtual] |
Sets the size of a single region of geometry.
| size | Vector3 expressing the 3D size of each region. |
Definition at line 719 of file OgreStaticGeometry.h.
| virtual void Ogre::StaticGeometry::setRenderingDistance | ( | Real | dist | ) | [virtual] |
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). |
Definition at line 670 of file OgreStaticGeometry.h.
| virtual void Ogre::StaticGeometry::setRenderQueueGroup | ( | uint8 | queueID | ) | [virtual] |
Sets the render queue group this object will be rendered through.
| queueID | Enumerated value of the queue group to use. |
| void Ogre::StaticGeometry::setVisibilityFlags | ( | uint32 | flags | ) |
Sets the visibility flags of all the regions at once.
| virtual void Ogre::StaticGeometry::setVisible | ( | bool | visible | ) | [virtual] |
Hides or shows all the batches.
| void Ogre::StaticGeometry::splitGeometry | ( | VertexData * | vd, |
| IndexData * | id, | ||
| SubMeshLodGeometryLink * | targetGeomLink | ||
| ) | [protected] |
Split some shared geometry into dedicated geometry.
| void Ogre::StaticGeometry::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. |
bool Ogre::StaticGeometry::mBuilt [protected] |
Definition at line 489 of file OgreStaticGeometry.h.
bool Ogre::StaticGeometry::mCastShadows [protected] |
Definition at line 492 of file OgreStaticGeometry.h.
Vector3 Ogre::StaticGeometry::mHalfRegionDimensions [protected] |
Definition at line 494 of file OgreStaticGeometry.h.
String Ogre::StaticGeometry::mName [protected] |
Definition at line 488 of file OgreStaticGeometry.h.
List of geometry which has been optimised for SubMesh use This is the primary storage used for cleaning up later.
Definition at line 508 of file OgreStaticGeometry.h.
Vector3 Ogre::StaticGeometry::mOrigin [protected] |
Definition at line 495 of file OgreStaticGeometry.h.
SceneManager* Ogre::StaticGeometry::mOwner [protected] |
Definition at line 487 of file OgreStaticGeometry.h.
Definition at line 504 of file OgreStaticGeometry.h.
Vector3 Ogre::StaticGeometry::mRegionDimensions [protected] |
Definition at line 493 of file OgreStaticGeometry.h.
RegionMap Ogre::StaticGeometry::mRegionMap [protected] |
Map of regions.
Definition at line 517 of file OgreStaticGeometry.h.
uint8 Ogre::StaticGeometry::mRenderQueueID [protected] |
The render queue to use when rendering this object.
Definition at line 498 of file OgreStaticGeometry.h.
bool Ogre::StaticGeometry::mRenderQueueIDSet [protected] |
Flags whether the RenderQueue's default should be used.
Definition at line 500 of file OgreStaticGeometry.h.
Real Ogre::StaticGeometry::mSquaredUpperDistance [protected] |
Definition at line 491 of file OgreStaticGeometry.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 514 of file OgreStaticGeometry.h.
Real Ogre::StaticGeometry::mUpperDistance [protected] |
Definition at line 490 of file OgreStaticGeometry.h.
uint32 Ogre::StaticGeometry::mVisibilityFlags [protected] |
Stores the visibility flags for the regions.
Definition at line 502 of file OgreStaticGeometry.h.
bool Ogre::StaticGeometry::mVisible [protected] |
Definition at line 496 of file OgreStaticGeometry.h.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Mon Jul 27 2020 13:41:39