OGRE
1.12.13
Object-Oriented Graphics Rendering Engine
|
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 std::list< OptimisedSubMeshGeometry * > | OptimisedSubMeshGeometryList |
typedef std::vector< QueuedGeometry * > | QueuedGeometryList |
typedef std::vector< QueuedSubMesh * > | QueuedSubMeshList |
typedef MapIterator< RegionMap > | RegionIterator |
Iterator for iterating over contained regions. More... | |
typedef std::map< uint32, Region * > | RegionMap |
Indexed region map based on packed x/y/z region index, 10 bits for each axis. More... | |
typedef std::map< SubMesh *, SubMeshLodGeometryLinkList * > | SubMeshGeometryLookup |
typedef std::vector< SubMeshLodGeometryLink > | SubMeshLodGeometryLinkList |
Public Member Functions | |
StaticGeometry (SceneManager *owner, const String &name) | |
Constructor; do not use directly (. More... | |
virtual | ~StaticGeometry () |
Destructor. 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 StaticGeometry to a file for diagnostic purposes. 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... | |
virtual const Vector3 & | getOrigin (void) const |
Gets the origin of this geometry. More... | |
virtual const Vector3 & | getRegionDimensions (void) const |
Gets the size of a single batch of geometry. More... | |
RegionIterator | getRegionIterator (void) |
const RegionMap & | getRegions () const |
Get an list of the regions in this geometry. More... | |
virtual Real | getRenderingDistance (void) const |
Gets the distance at which batches are no longer rendered. 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... | |
uint32 | getVisibilityFlags () const |
Returns the visibility flags of the regions. 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 | 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 | setRegionDimensions (const Vector3 &size) |
Sets the size of a single region of geometry. More... | |
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... | |
void | setVisibilityFlags (uint32 flags) |
Sets the visibility flags of all the regions at once. 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 static geometry in a scene.
typedef std::list<OptimisedSubMeshGeometry*> Ogre::StaticGeometry::OptimisedSubMeshGeometryList |
typedef std::vector<SubMeshLodGeometryLink> Ogre::StaticGeometry::SubMeshLodGeometryLinkList |
typedef std::map<SubMesh*, SubMeshLodGeometryLinkList*> Ogre::StaticGeometry::SubMeshGeometryLookup |
typedef std::vector<QueuedSubMesh*> Ogre::StaticGeometry::QueuedSubMeshList |
typedef std::vector<QueuedGeometry*> Ogre::StaticGeometry::QueuedGeometryList |
typedef std::map<uint32, Region*> Ogre::StaticGeometry::RegionMap |
Indexed region map based on packed x/y/z region index, 10 bits for each axis.
Iterator for iterating over contained regions.
Ogre::StaticGeometry::StaticGeometry | ( | SceneManager * | owner, |
const String & | name | ||
) |
Constructor; do not use directly (.
|
virtual |
Destructor.
|
inline |
Get the name of this object.
|
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.
|
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 region of geometry.
size | Vector3 expressing the 3D size of each region. |
|
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.
void Ogre::StaticGeometry::setVisibilityFlags | ( | uint32 | flags | ) |
Sets the visibility flags of all the regions at once.
uint32 Ogre::StaticGeometry::getVisibilityFlags | ( | ) | const |
Returns the visibility flags of the regions.
|
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.
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. |
|
inline |
Get an list of the regions in this geometry.
RegionIterator Ogre::StaticGeometry::getRegionIterator | ( | void | ) |
|
virtual |
Dump the contents of this StaticGeometry to a file for diagnostic purposes.