OgreStaticGeometry.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 __StaticGeometry_H__
#define __StaticGeometry_H__
#include "OgrePrerequisites.h"
#include "OgreMovableObject.h"
#include "OgreRenderable.h"
#include "OgreMesh.h"
#include "OgreLodStrategy.h"
#include "OgreHeaderPrefix.h"
namespace Ogre {
class _OgreExport StaticGeometry : public BatchedGeometryAlloc
{
public:
class _OgrePrivate OptimisedSubMeshGeometry : public BatchedGeometryAlloc
{
public:
OptimisedSubMeshGeometry() :vertexData(0), indexData(0) {}
~OptimisedSubMeshGeometry()
{
OGRE_DELETE vertexData;
OGRE_DELETE indexData;
}
VertexData *vertexData;
IndexData *indexData;
};
typedef list<OptimisedSubMeshGeometry*>::type OptimisedSubMeshGeometryList;
struct SubMeshLodGeometryLink
{
VertexData* vertexData;
IndexData* indexData;
};
typedef vector<SubMeshLodGeometryLink>::type SubMeshLodGeometryLinkList;
typedef map<SubMesh*, SubMeshLodGeometryLinkList*>::type SubMeshGeometryLookup;
struct QueuedSubMesh : public BatchedGeometryAlloc
{
SubMesh* submesh;
SubMeshLodGeometryLinkList* geometryLodList;
String materialName;
Vector3 position;
Quaternion orientation;
Vector3 scale;
AxisAlignedBox worldBounds;
};
typedef vector<QueuedSubMesh*>::type QueuedSubMeshList;
struct QueuedGeometry : public BatchedGeometryAlloc
{
SubMeshLodGeometryLink* geometry;
Vector3 position;
Quaternion orientation;
Vector3 scale;
};
typedef vector<QueuedGeometry*>::type QueuedGeometryList;
// forward declarations
class LODBucket;
class MaterialBucket;
class Region;
class _OgreExport GeometryBucket : public Renderable, public BatchedGeometryAlloc
{
protected:
QueuedGeometryList mQueuedGeometry;
MaterialBucket* mParent;
String mFormatString;
VertexData* mVertexData;
IndexData* mIndexData;
HardwareIndexBuffer::IndexType mIndexType;
size_t mMaxVertexIndex;
template<typename T>
void copyIndexes(const T* src, T* dst, size_t count, size_t indexOffset)
{
if (indexOffset == 0)
{
memcpy(dst, src, sizeof(T) * count);
}
else
{
while(count--)
{
*dst++ = static_cast<T>(*src++ + indexOffset);
}
}
}
public:
GeometryBucket(MaterialBucket* parent, const String& formatString,
const VertexData* vData, const IndexData* iData);
virtual ~GeometryBucket();
MaterialBucket* getParent(void) { return mParent; }
const VertexData* getVertexData(void) const { return mVertexData; }
const IndexData* getIndexData(void) const { return mIndexData; }
const MaterialPtr& getMaterial(void) const;
Technique* getTechnique(void) const;
void getRenderOperation(RenderOperation& op);
void getWorldTransforms(Matrix4* xform) const;
Real getSquaredViewDepth(const Camera* cam) const;
const LightList& getLights(void) const;
bool getCastsShadows(void) const;
bool assign(QueuedGeometry* qsm);
void build(bool stencilShadows);
void dump(std::ofstream& of) const;
};
class _OgreExport MaterialBucket : public BatchedGeometryAlloc
{
public:
typedef vector<GeometryBucket*>::type GeometryBucketList;
protected:
LODBucket* mParent;
String mMaterialName;
MaterialPtr mMaterial;
Technique* mTechnique;
GeometryBucketList mGeometryBucketList;
// index to current Geometry Buckets for a given geometry format
typedef map<String, GeometryBucket*>::type CurrentGeometryMap;
CurrentGeometryMap mCurrentGeometryMap;
String getGeometryFormatString(SubMeshLodGeometryLink* geom);
public:
MaterialBucket(LODBucket* parent, const String& materialName);
virtual ~MaterialBucket();
LODBucket* getParent(void) { return mParent; }
const String& getMaterialName(void) const { return mMaterialName; }
void assign(QueuedGeometry* qsm);
void build(bool stencilShadows);
void addRenderables(RenderQueue* queue, uint8 group,
Real lodValue);
const MaterialPtr& getMaterial(void) const { return mMaterial; }
typedef VectorIterator<GeometryBucketList> GeometryIterator;
GeometryIterator getGeometryIterator(void);
Technique* getCurrentTechnique(void) const { return mTechnique; }
void dump(std::ofstream& of) const;
void visitRenderables(Renderable::Visitor* visitor, bool debugRenderables);
};
class _OgreExport LODBucket : public BatchedGeometryAlloc
{
public:
typedef map<String, MaterialBucket*>::type MaterialBucketMap;
protected:
class _OgreExport LODShadowRenderable : public ShadowRenderable
{
protected:
LODBucket* mParent;
// Shared link to position buffer
HardwareVertexBufferSharedPtr mPositionBuffer;
// Shared link to w-coord buffer (optional)
HardwareVertexBufferSharedPtr mWBuffer;
public:
LODShadowRenderable(LODBucket* parent,
HardwareIndexBufferSharedPtr* indexBuffer, const VertexData* vertexData,
bool createSeparateLightCap, bool isLightCap = false);
~LODShadowRenderable();
void getWorldTransforms(Matrix4* xform) const;
HardwareVertexBufferSharedPtr getPositionBuffer(void) { return mPositionBuffer; }
HardwareVertexBufferSharedPtr getWBuffer(void) { return mWBuffer; }
virtual void rebindIndexBuffer(const HardwareIndexBufferSharedPtr& indexBuffer);
};
Region* mParent;
unsigned short mLod;
Real mLodValue;
MaterialBucketMap mMaterialBucketMap;
QueuedGeometryList mQueuedGeometryList;
EdgeData* mEdgeList;
bool mVertexProgramInUse;
ShadowCaster::ShadowRenderableList mShadowRenderables;
public:
LODBucket(Region* parent, unsigned short lod, Real lodValue);
virtual ~LODBucket();
Region* getParent(void) { return mParent; }
ushort getLod(void) const { return mLod; }
Real getLodValue(void) const { return mLodValue; }
void assign(QueuedSubMesh* qsm, ushort atLod);
void build(bool stencilShadows);
void addRenderables(RenderQueue* queue, uint8 group,
Real lodValue);
typedef MapIterator<MaterialBucketMap> MaterialIterator;
MaterialIterator getMaterialIterator(void);
void dump(std::ofstream& of) const;
void visitRenderables(Renderable::Visitor* visitor, bool debugRenderables);
EdgeData* getEdgeList() const { return mEdgeList; }
ShadowCaster::ShadowRenderableList& getShadowRenderableList() { return mShadowRenderables; }
bool isVertexProgramInUse() const { return mVertexProgramInUse; }
void updateShadowRenderables(
ShadowTechnique shadowTechnique, const Vector4& lightPos,
HardwareIndexBufferSharedPtr* indexBuffer,
bool extrudeVertices, Real extrusionDistance, unsigned long flags = 0 );
};
class _OgreExport Region : public MovableObject
{
friend class MaterialBucket;
friend class GeometryBucket;
public:
typedef vector<LODBucket*>::type LODBucketList;
protected:
StaticGeometry* mParent;
SceneManager* mSceneMgr;
SceneNode* mNode;
QueuedSubMeshList mQueuedSubMeshes;
uint32 mRegionID;
Vector3 mCentre;
Mesh::LodValueList mLodValues;
AxisAlignedBox mAABB;
Real mBoundingRadius;
ushort mCurrentLod;
Real mLodValue;
LODBucketList mLodBucketList;
mutable LightList mLightList;
mutable ulong mLightListUpdated;
const LodStrategy *mLodStrategy;
Camera *mCamera;
Real mSquaredViewDepth;
public:
Region(StaticGeometry* parent, const String& name, SceneManager* mgr,
uint32 regionID, const Vector3& centre);
virtual ~Region();
// more fields can be added in subclasses
StaticGeometry* getParent(void) const { return mParent;}
void assign(QueuedSubMesh* qmesh);
void build(bool stencilShadows);
uint32 getID(void) const { return mRegionID; }
const Vector3& getCentre(void) const { return mCentre; }
const String& getMovableType(void) const;
void _notifyCurrentCamera(Camera* cam);
const AxisAlignedBox& getBoundingBox(void) const;
Real getBoundingRadius(void) const;
void _updateRenderQueue(RenderQueue* queue);
void visitRenderables(Renderable::Visitor* visitor,
bool debugRenderables = false);
bool isVisible(void) const;
uint32 getTypeFlags(void) const;
typedef VectorIterator<LODBucketList> LODIterator;
LODIterator getLODIterator(void);
ShadowRenderableListIterator getShadowVolumeRenderableIterator(
ShadowTechnique shadowTechnique, const Light* light,
HardwareIndexBufferSharedPtr* indexBuffer, size_t* indexBufferUsedSize,
bool extrudeVertices, Real extrusionDistance, unsigned long flags = 0 );
EdgeData* getEdgeList(void);
bool hasEdgeList(void);
void dump(std::ofstream& of) const;
};
typedef map<uint32, Region*>::type RegionMap;
protected:
// General state & settings
SceneManager* mOwner;
String mName;
bool mBuilt;
Real mUpperDistance;
Real mSquaredUpperDistance;
bool mCastShadows;
Vector3 mRegionDimensions;
Vector3 mHalfRegionDimensions;
Vector3 mOrigin;
bool mVisible;
uint8 mRenderQueueID;
bool mRenderQueueIDSet;
uint32 mVisibilityFlags;
QueuedSubMeshList mQueuedSubMeshes;
OptimisedSubMeshGeometryList mOptimisedSubMeshGeometryList;
SubMeshGeometryLookup mSubMeshGeometryLookup;
RegionMap mRegionMap;
virtual Region* getRegion(const AxisAlignedBox& bounds, bool autoCreate);
virtual Region* getRegion(const Vector3& point, bool autoCreate);
virtual Region* getRegion(ushort x, ushort y, ushort z, bool autoCreate);
virtual Region* getRegion(uint32 index);
virtual void getRegionIndexes(const Vector3& point,
ushort& x, ushort& y, ushort& z);
virtual uint32 packIndex(ushort x, ushort y, ushort z);
virtual Real getVolumeIntersection(const AxisAlignedBox& box,
ushort x, ushort y, ushort z);
virtual AxisAlignedBox getRegionBounds(ushort x, ushort y, ushort z);
virtual Vector3 getRegionCentre(ushort x, ushort y, ushort z);
virtual AxisAlignedBox calculateBounds(VertexData* vertexData,
const Vector3& position, const Quaternion& orientation,
const Vector3& scale);
SubMeshLodGeometryLinkList* determineGeometry(SubMesh* sm);
void splitGeometry(VertexData* vd, IndexData* id,
SubMeshLodGeometryLink* targetGeomLink);
typedef map<size_t, size_t>::type IndexRemap;
template <typename T>
void buildIndexRemap(T* pBuffer, size_t numIndexes, IndexRemap& remap)
{
remap.clear();
for (size_t i = 0; i < numIndexes; ++i)
{
// use insert since duplicates are silently discarded
remap.insert(IndexRemap::value_type(*pBuffer++, remap.size()));
// this will have mapped oldindex -> new index IF oldindex
// wasn't already there
}
}
template <typename T>
void remapIndexes(T* src, T* dst, const IndexRemap& remap,
size_t numIndexes)
{
for (size_t i = 0; i < numIndexes; ++i)
{
// look up original and map to target
IndexRemap::const_iterator ix = remap.find(*src++);
assert(ix != remap.end());
*dst++ = static_cast<T>(ix->second);
}
}
public:
StaticGeometry(SceneManager* owner, const String& name);
virtual ~StaticGeometry();
const String& getName(void) const { return mName; }
virtual void addEntity(Entity* ent, const Vector3& position,
const Quaternion& orientation = Quaternion::IDENTITY,
const Vector3& scale = Vector3::UNIT_SCALE);
virtual void addSceneNode(const SceneNode* node);
virtual void build(void);
virtual void destroy(void);
virtual void reset(void);
virtual void setRenderingDistance(Real dist) {
mUpperDistance = dist;
mSquaredUpperDistance = mUpperDistance * mUpperDistance;
}
virtual Real getRenderingDistance(void) const { return mUpperDistance; }
virtual Real getSquaredRenderingDistance(void) const
{ return mSquaredUpperDistance; }
virtual void setVisible(bool visible);
virtual bool isVisible(void) const { return mVisible; }
virtual void setCastShadows(bool castShadows);
virtual bool getCastShadows(void) { return mCastShadows; }
virtual void setRegionDimensions(const Vector3& size) {
mRegionDimensions = size;
mHalfRegionDimensions = size * 0.5;
}
virtual const Vector3& getRegionDimensions(void) const { return mRegionDimensions; }
virtual void setOrigin(const Vector3& origin) { mOrigin = origin; }
virtual const Vector3& getOrigin(void) const { return mOrigin; }
void setVisibilityFlags(uint32 flags);
uint32 getVisibilityFlags() const;
virtual void setRenderQueueGroup(uint8 queueID);
virtual uint8 getRenderQueueGroup(void) const;
void visitRenderables(Renderable::Visitor* visitor,
bool debugRenderables = false);
typedef MapIterator<RegionMap> RegionIterator;
RegionIterator getRegionIterator(void);
virtual void dump(const String& filename) const;
};
}
#include "OgreHeaderSuffix.h"
#endif
Ogre::StaticGeometry::LODBucket::mLodValue
Real mLodValue
LOD value at which this LOD starts to apply (squared)
Definition: OgreStaticGeometry.h:342
Ogre::StaticGeometry::mUpperDistance
Real mUpperDistance
Definition: OgreStaticGeometry.h:490
Ogre::ShadowRenderable
Class which represents the renderable aspects of a set of shadow volume faces.
Definition: OgreShadowCaster.h:52
Ogre::StaticGeometry::mVisibilityFlags
uint32 mVisibilityFlags
Stores the visibility flags for the regions.
Definition: OgreStaticGeometry.h:502
Ogre::VectorIterator
Concrete IteratorWrapper for nonconst access to the underlying container.
Definition: OgreIteratorWrapper.h:186
Ogre::StaticGeometry::mOwner
SceneManager * mOwner
Definition: OgreStaticGeometry.h:487
Ogre::StaticGeometry::GeometryBucket::mParent
MaterialBucket * mParent
Pointer to parent bucket.
Definition: OgreStaticGeometry.h:197
Ogre::StaticGeometry::LODBucket::LODShadowRenderable::mPositionBuffer
HardwareVertexBufferSharedPtr mPositionBuffer
Definition: OgreStaticGeometry.h:320
Ogre::StaticGeometry::MaterialBucket::mParent
LODBucket * mParent
Pointer to parent LODBucket.
Definition: OgreStaticGeometry.h:262
Ogre::StaticGeometry::QueuedGeometry::orientation
Quaternion orientation
Definition: OgreStaticGeometry.h:177
Ogre::StaticGeometry::LODBucket::getLodValue
Real getLodValue(void) const
Get the LOD value.
Definition: OgreStaticGeometry.h:360
Ogre::StaticGeometry::QueuedGeometryList
vector< QueuedGeometry * >::type QueuedGeometryList
Definition: OgreStaticGeometry.h:180
Ogre::Renderable
Abstract class defining the interface all renderable objects must implement.
Definition: OgreRenderable.h:63
Ogre::StaticGeometry::Region::LODIterator
VectorIterator< LODBucketList > LODIterator
Definition: OgreStaticGeometry.h:460
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::StaticGeometry::OptimisedSubMeshGeometryList
list< OptimisedSubMeshGeometry * >::type OptimisedSubMeshGeometryList
Definition: OgreStaticGeometry.h:148
Ogre::StaticGeometry::setRegionDimensions
virtual void setRegionDimensions(const Vector3 &size)
Sets the size of a single region of geometry.
Definition: OgreStaticGeometry.h:719
Ogre::StaticGeometry::isVisible
virtual bool isVisible(void) const
Are the batches visible?
Definition: OgreStaticGeometry.h:686
Ogre::list
Definition: OgrePrerequisites.h:505
Ogre::StaticGeometry::getSquaredRenderingDistance
virtual Real getSquaredRenderingDistance(void) const
Gets the squared distance at which batches are no longer rendered.
Definition: OgreStaticGeometry.h:679
Ogre::StaticGeometry::MaterialBucket::mCurrentGeometryMap
CurrentGeometryMap mCurrentGeometryMap
Definition: OgreStaticGeometry.h:274
Ogre::MovableObject
Abstract class defining a movable object in a scene.
Definition: OgreMovableObject.h:60
Ogre::LodStrategy
Strategy for determining level of detail.
Definition: OgreLodStrategy.h:54
Ogre::HardwareIndexBufferSharedPtr
Shared pointer implementation used to share index buffers.
Definition: OgreHardwareIndexBuffer.h:79
Ogre::StaticGeometry::Region::mLightListUpdated
ulong mLightListUpdated
The last frame that this light list was updated in.
Definition: OgreStaticGeometry.h:427
Ogre::StaticGeometry::QueuedSubMesh::materialName
String materialName
Definition: OgreStaticGeometry.h:164
Ogre::StaticGeometry::QueuedSubMesh
Structure recording a queued submesh for the build.
Definition: OgreStaticGeometry.h:159
Ogre::StaticGeometry::LODBucket::mMaterialBucketMap
MaterialBucketMap mMaterialBucketMap
Lookup of Material Buckets in this region.
Definition: OgreStaticGeometry.h:344
Ogre::StaticGeometry::QueuedSubMesh::worldBounds
AxisAlignedBox worldBounds
Pre-transformed world AABB.
Definition: OgreStaticGeometry.h:169
Ogre::vector::type
std::vector< T, A > type
Definition: OgrePrerequisites.h:494
OGRE_DELETE
#define OGRE_DELETE
Definition: OgreMemoryAllocatorConfig.h:474
OgreRenderable.h
Ogre::StaticGeometry::Region::mCamera
Camera * mCamera
Current camera.
Definition: OgreStaticGeometry.h:431
OgreMovableObject.h
Ogre::StaticGeometry::LODBucket::mVertexProgramInUse
bool mVertexProgramInUse
Is a vertex program in use somewhere in this group?
Definition: OgreStaticGeometry.h:350
Ogre::StaticGeometry::mBuilt
bool mBuilt
Definition: OgreStaticGeometry.h:489
Ogre::StaticGeometry::setOrigin
virtual void setOrigin(const Vector3 &origin)
Sets the origin of the geometry.
Definition: OgreStaticGeometry.h:736
Ogre::VertexData
Summary class collecting together vertex source information.
Definition: OgreVertexIndexData.h:49
Ogre::StaticGeometry::setRenderingDistance
virtual void setRenderingDistance(Real dist)
Sets the distance at which batches are no longer rendered.
Definition: OgreStaticGeometry.h:670
Ogre::Quaternion
Implementation of a Quaternion, i.e.
Definition: OgreQuaternion.h:57
Ogre::StaticGeometry::mQueuedSubMeshes
QueuedSubMeshList mQueuedSubMeshes
Definition: OgreStaticGeometry.h:504
Ogre::ShadowCaster::ShadowRenderableList
vector< ShadowRenderable * >::type ShadowRenderableList
Definition: OgreShadowCaster.h:136
Ogre::StaticGeometry::Region::mCentre
Vector3 mCentre
Center of the region.
Definition: OgreStaticGeometry.h:411
OgreMesh.h
Ogre::MapIterator
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:319
Ogre::Vector4
4-dimensional homogeneous vector.
Definition: OgreVector4.h:45
Ogre::StaticGeometry::MaterialBucket::getCurrentTechnique
Technique * getCurrentTechnique(void) const
Get the current Technique.
Definition: OgreStaticGeometry.h:298
Ogre::StaticGeometry::Region::getCentre
const Vector3 & getCentre(void) const
Get the centre point of the region.
Definition: OgreStaticGeometry.h:448
Ogre::StaticGeometry::mSubMeshGeometryLookup
SubMeshGeometryLookup mSubMeshGeometryLookup
Cached links from SubMeshes to (potentially optimised) geometry This is not used for deletion since t...
Definition: OgreStaticGeometry.h:514
Ogre::StaticGeometry::mName
String mName
Definition: OgreStaticGeometry.h:488
Ogre::StaticGeometry::getName
const String & getName(void) const
Get the name of this object.
Definition: OgreStaticGeometry.h:594
Ogre::StaticGeometry::GeometryBucket::mFormatString
String mFormatString
String identifying the vertex / index format.
Definition: OgreStaticGeometry.h:199
Ogre::StaticGeometry::SubMeshLodGeometryLink::vertexData
VertexData * vertexData
Definition: OgreStaticGeometry.h:153
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::StaticGeometry::GeometryBucket::copyIndexes
void copyIndexes(const T *src, T *dst, size_t count, size_t indexOffset)
Definition: OgreStaticGeometry.h:212
Ogre::StaticGeometry::GeometryBucket::mMaxVertexIndex
size_t mMaxVertexIndex
Maximum vertex indexable.
Definition: OgreStaticGeometry.h:209
Ogre::StaticGeometry::QueuedSubMeshList
vector< QueuedSubMesh * >::type QueuedSubMeshList
Definition: OgreStaticGeometry.h:171
Ogre::StaticGeometry::QueuedGeometry::scale
Vector3 scale
Definition: OgreStaticGeometry.h:178
Ogre::StaticGeometry::mRenderQueueIDSet
bool mRenderQueueIDSet
Flags whether the RenderQueue&#39;s default should be used.
Definition: OgreStaticGeometry.h:500
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:92
Ogre::IndexData
Summary class collecting together index data source information.
Definition: OgreVertexIndexData.h:242
Ogre::StaticGeometry::MaterialBucket::GeometryIterator
VectorIterator< GeometryBucketList > GeometryIterator
Iterator over geometry.
Definition: OgreStaticGeometry.h:294
Ogre::StaticGeometry::Region::mNode
SceneNode * mNode
Scene node.
Definition: OgreStaticGeometry.h:405
Ogre::StaticGeometry::GeometryBucket::mQueuedGeometry
QueuedGeometryList mQueuedGeometry
Geometry which has been queued up pre-build (not for deallocation)
Definition: OgreStaticGeometry.h:195
Ogre::StaticGeometry::LODBucket::LODShadowRenderable::getPositionBuffer
HardwareVertexBufferSharedPtr getPositionBuffer(void)
Definition: OgreStaticGeometry.h:331
Ogre::SceneNode
Class representing a node in the scene graph.
Definition: OgreSceneNode.h:58
Ogre::StaticGeometry::LODBucket::MaterialBucketMap
map< String, MaterialBucket * >::type MaterialBucketMap
Lookup of Material Buckets in this region.
Definition: OgreStaticGeometry.h:312
Ogre::StaticGeometry::SubMeshLodGeometryLink::indexData
IndexData * indexData
Definition: OgreStaticGeometry.h:154
Ogre::StaticGeometry::QueuedGeometry
Structure recording a queued geometry for low level builds.
Definition: OgreStaticGeometry.h:173
OgreLodStrategy.h
Ogre::ShadowTechnique
ShadowTechnique
An enumeration of broad shadow techniques.
Definition: OgreCommon.h:190
Ogre::StaticGeometry::getOrigin
virtual const Vector3 & getOrigin(void) const
Gets the origin of this geometry.
Definition: OgreStaticGeometry.h:738
Ogre::StaticGeometry::Region::getParent
StaticGeometry * getParent(void) const
Definition: OgreStaticGeometry.h:440
Ogre::StaticGeometry::LODBucket::MaterialIterator
MapIterator< MaterialBucketMap > MaterialIterator
Iterator over the materials in this LOD.
Definition: OgreStaticGeometry.h:369
Ogre::StaticGeometry::MaterialBucket::GeometryBucketList
vector< GeometryBucket * >::type GeometryBucketList
list of Geometry Buckets in this region
Definition: OgreStaticGeometry.h:259
Ogre::EdgeData
This class contains the information required to describe the edge connectivity of a given set of vert...
Definition: OgreEdgeListBuilder.h:52
Ogre::StaticGeometry::LODBucket::isVertexProgramInUse
bool isVertexProgramInUse() const
Definition: OgreStaticGeometry.h:377
Ogre::StaticGeometry::SubMeshGeometryLookup
map< SubMesh *, SubMeshLodGeometryLinkList * >::type SubMeshGeometryLookup
Definition: OgreStaticGeometry.h:157
Ogre::StaticGeometry::LODBucket::LODShadowRenderable
Nested class to allow shadows.
Definition: OgreStaticGeometry.h:315
Ogre::StaticGeometry::MaterialBucket::mMaterialName
String mMaterialName
Material being used.
Definition: OgreStaticGeometry.h:264
Ogre::SubMesh
Defines a part of a complete mesh.
Definition: OgreSubMesh.h:62
Ogre::StaticGeometry::LODBucket::mLod
unsigned short mLod
LOD level (0 == full LOD)
Definition: OgreStaticGeometry.h:340
Ogre::StaticGeometry::LODBucket
A LODBucket is a collection of smaller buckets with the same LOD.
Definition: OgreStaticGeometry.h:308
Ogre::StaticGeometry::SubMeshLodGeometryLink
Saved link between SubMesh at a LOD and vertex/index data May point to original or optimised geometry...
Definition: OgreStaticGeometry.h:151
Ogre::StaticGeometry::QueuedSubMesh::submesh
SubMesh * submesh
Definition: OgreStaticGeometry.h:161
Ogre::StaticGeometry::LODBucket::getShadowRenderableList
ShadowCaster::ShadowRenderableList & getShadowRenderableList()
Definition: OgreStaticGeometry.h:376
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:78
Ogre::StaticGeometry::GeometryBucket::mIndexType
HardwareIndexBuffer::IndexType mIndexType
Size of indexes.
Definition: OgreStaticGeometry.h:207
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:51
Ogre::StaticGeometry::OptimisedSubMeshGeometry::indexData
IndexData * indexData
Definition: OgreStaticGeometry.h:146
Ogre::StaticGeometry::Region::mLodValue
Real mLodValue
Current LOD value, passed on to do material LOD later.
Definition: OgreStaticGeometry.h:421
Ogre::StaticGeometry::GeometryBucket
A GeometryBucket is a the lowest level bucket where geometry with the same vertex & index format is s...
Definition: OgreStaticGeometry.h:191
Ogre::HardwareVertexBufferSharedPtr
Shared pointer implementation used to share vertex buffers.
Definition: OgreHardwareVertexBuffer.h:86
Ogre::StaticGeometry::getRenderingDistance
virtual Real getRenderingDistance(void) const
Gets the distance at which batches are no longer rendered.
Definition: OgreStaticGeometry.h:676
Ogre::StaticGeometry::Region::mRegionID
uint32 mRegionID
Unique identifier for the region.
Definition: OgreStaticGeometry.h:409
Ogre::StaticGeometry::LODBucket::LODShadowRenderable::getWBuffer
HardwareVertexBufferSharedPtr getWBuffer(void)
Definition: OgreStaticGeometry.h:332
OgrePrerequisites.h
Ogre::StaticGeometry::QueuedSubMesh::position
Vector3 position
Definition: OgreStaticGeometry.h:165
Ogre::map::type
std::map< K, V, P, A > type
Definition: OgrePrerequisites.h:536
_OgrePrivate
#define _OgrePrivate
Definition: OgrePlatform.h:258
Ogre::StaticGeometry::Region::mParent
StaticGeometry * mParent
Parent static geometry.
Definition: OgreStaticGeometry.h:401
Ogre::StaticGeometry::LODBucket::LODShadowRenderable::mParent
LODBucket * mParent
Definition: OgreStaticGeometry.h:318
Ogre::StaticGeometry::MaterialBucket::getMaterialName
const String & getMaterialName(void) const
Get the material name.
Definition: OgreStaticGeometry.h:283
Ogre::HashedVector
A hashed vector.
Definition: OgreCommon.h:332
Ogre::Renderable::Visitor
Visitor object that can be used to iterate over a collection of Renderable instances abstractly...
Definition: OgreRenderable.h:377
Ogre::StaticGeometry::MaterialBucket::CurrentGeometryMap
map< String, GeometryBucket * >::type CurrentGeometryMap
Definition: OgreStaticGeometry.h:273
Ogre::StaticGeometry::LODBucket::getParent
Region * getParent(void)
Definition: OgreStaticGeometry.h:356
Ogre::Mesh::LodValueList
vector< Real >::type LodValueList
Definition: OgreMesh.h:102
Ogre::StaticGeometry::mVisible
bool mVisible
Definition: OgreStaticGeometry.h:496
Ogre::StaticGeometry::Region::mAABB
AxisAlignedBox mAABB
Local AABB relative to region centre.
Definition: OgreStaticGeometry.h:415
Ogre::StaticGeometry::GeometryBucket::getIndexData
const IndexData * getIndexData(void) const
Get the index data for this geometry.
Definition: OgreStaticGeometry.h:234
Ogre::uint8
unsigned char uint8
Definition: OgrePlatform.h:361
Ogre::StaticGeometry::OptimisedSubMeshGeometry::~OptimisedSubMeshGeometry
~OptimisedSubMeshGeometry()
Definition: OgreStaticGeometry.h:140
Ogre::StaticGeometry::RegionMap
map< uint32, Region * >::type RegionMap
Indexed region map based on packed x/y/z region index, 10 bits for each axis.
Definition: OgreStaticGeometry.h:484
Ogre::StaticGeometry::GeometryBucket::getParent
MaterialBucket * getParent(void)
Definition: OgreStaticGeometry.h:230
Ogre::StaticGeometry::Region::mLightList
LightList mLightList
List of lights for this region.
Definition: OgreStaticGeometry.h:425
Ogre::StaticGeometry::Region::LODBucketList
vector< LODBucket * >::type LODBucketList
list of LOD Buckets in this region
Definition: OgreStaticGeometry.h:398
Ogre::StaticGeometry::LODBucket::getEdgeList
EdgeData * getEdgeList() const
Definition: OgreStaticGeometry.h:375
Ogre::StaticGeometry::LODBucket::LODShadowRenderable::mWBuffer
HardwareVertexBufferSharedPtr mWBuffer
Definition: OgreStaticGeometry.h:322
Ogre::StaticGeometry::QueuedSubMesh::scale
Vector3 scale
Definition: OgreStaticGeometry.h:167
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::StaticGeometry::mRegionMap
RegionMap mRegionMap
Map of regions.
Definition: OgreStaticGeometry.h:517
Ogre::StaticGeometry::IndexRemap
map< size_t, size_t >::type IndexRemap
Definition: OgreStaticGeometry.h:556
Ogre::Vector3::UNIT_SCALE
static const Vector3 UNIT_SCALE
Definition: OgreVector3.h:807
Ogre::StaticGeometry::LODBucket::mEdgeList
EdgeData * mEdgeList
Edge list, used if stencil shadow casting is enabled.
Definition: OgreStaticGeometry.h:348
Ogre::HardwareIndexBuffer::IndexType
IndexType
Definition: OgreHardwareIndexBuffer.h:49
Ogre::StaticGeometry::OptimisedSubMeshGeometry::OptimisedSubMeshGeometry
OptimisedSubMeshGeometry()
Definition: OgreStaticGeometry.h:139
Ogre::Camera
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:86
OgreHeaderSuffix.h
Ogre::StaticGeometry::Region::mCurrentLod
ushort mCurrentLod
The current LOD level, as determined from the last camera.
Definition: OgreStaticGeometry.h:419
Ogre::StaticGeometry::mSquaredUpperDistance
Real mSquaredUpperDistance
Definition: OgreStaticGeometry.h:491
Ogre::StaticGeometry::GeometryBucket::mVertexData
VertexData * mVertexData
Vertex information, includes current number of vertices committed to be a part of this bucket...
Definition: OgreStaticGeometry.h:202
Ogre::StaticGeometry::OptimisedSubMeshGeometry
Struct holding geometry optimised per SubMesh / LOD level, ready for copying to instances.
Definition: OgreStaticGeometry.h:136
Ogre::StaticGeometry::mOptimisedSubMeshGeometryList
OptimisedSubMeshGeometryList mOptimisedSubMeshGeometryList
List of geometry which has been optimised for SubMesh use This is the primary storage used for cleani...
Definition: OgreStaticGeometry.h:508
Ogre::StaticGeometry::OptimisedSubMeshGeometry::vertexData
VertexData * vertexData
Definition: OgreStaticGeometry.h:145
Ogre::StaticGeometry::mOrigin
Vector3 mOrigin
Definition: OgreStaticGeometry.h:495
Ogre::uint32
unsigned int uint32
Definition: OgrePlatform.h:359
Ogre::StaticGeometry::MaterialBucket
A MaterialBucket is a collection of smaller buckets with the same Material (and implicitly the same L...
Definition: OgreStaticGeometry.h:255
Ogre::StaticGeometry::GeometryBucket::mIndexData
IndexData * mIndexData
Index information, includes index type which limits the max number of vertices which are allowed in o...
Definition: OgreStaticGeometry.h:205
Ogre::StaticGeometry::MaterialBucket::getMaterial
const MaterialPtr & getMaterial(void) const
Get the material for this bucket.
Definition: OgreStaticGeometry.h:292
Ogre::StaticGeometry::MaterialBucket::mGeometryBucketList
GeometryBucketList mGeometryBucketList
list of Geometry Buckets in this region
Definition: OgreStaticGeometry.h:271
Ogre::StaticGeometry::getRegionDimensions
virtual const Vector3 & getRegionDimensions(void) const
Gets the size of a single batch of geometry.
Definition: OgreStaticGeometry.h:724
Ogre::StaticGeometry::QueuedSubMesh::orientation
Quaternion orientation
Definition: OgreStaticGeometry.h:166
Ogre::StaticGeometry::Region::getID
uint32 getID(void) const
Get the region ID of this region.
Definition: OgreStaticGeometry.h:446
Ogre::StaticGeometry::mCastShadows
bool mCastShadows
Definition: OgreStaticGeometry.h:492
Ogre::StaticGeometry::SubMeshLodGeometryLinkList
vector< SubMeshLodGeometryLink >::type SubMeshLodGeometryLinkList
Definition: OgreStaticGeometry.h:156
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::StaticGeometry::mRenderQueueID
uint8 mRenderQueueID
The render queue to use when rendering this object.
Definition: OgreStaticGeometry.h:498
Ogre::StaticGeometry::RegionIterator
MapIterator< RegionMap > RegionIterator
Iterator for iterating over contained regions.
Definition: OgreStaticGeometry.h:765
Ogre::StaticGeometry
Pre-transforms and batches up meshes for efficient use as static geometry in a scene.
Definition: OgreStaticGeometry.h:121
Ogre::StaticGeometry::LODBucket::mQueuedGeometryList
QueuedGeometryList mQueuedGeometryList
Geometry queued for a single LOD (deallocated here)
Definition: OgreStaticGeometry.h:346
Ogre::StaticGeometry::getCastShadows
virtual bool getCastShadows(void)
Will the geometry from this object cast shadows?
Definition: OgreStaticGeometry.h:707
Ogre::StaticGeometry::LODBucket::mParent
Region * mParent
Pointer to parent region.
Definition: OgreStaticGeometry.h:338
Ogre::SharedPtr< Material >
Ogre::vector
Definition: OgrePrerequisites.h:491
Ogre::ulong
unsigned long ulong
Definition: OgrePrerequisites.h:115
OgreHeaderPrefix.h
Ogre::StaticGeometry::mRegionDimensions
Vector3 mRegionDimensions
Definition: OgreStaticGeometry.h:493
Ogre::StaticGeometry::remapIndexes
void remapIndexes(T *src, T *dst, const IndexRemap &remap, size_t numIndexes)
Method for altering indexes based on a remap.
Definition: OgreStaticGeometry.h:575
Ogre::StaticGeometry::MaterialBucket::mTechnique
Technique * mTechnique
Active technique.
Definition: OgreStaticGeometry.h:268
Ogre::RenderOperation
&#39;New&#39; rendering operation using vertex buffers.
Definition: OgreRenderOperation.h:45
Ogre::Technique
Class representing an approach to rendering this particular Material.
Definition: OgreTechnique.h:53
Ogre::Entity
Defines an instance of a discrete, movable object based on a Mesh.
Definition: OgreEntity.h:82
Ogre::StaticGeometry::GeometryBucket::getVertexData
const VertexData * getVertexData(void) const
Get the vertex data for this geometry.
Definition: OgreStaticGeometry.h:232
Ogre::StaticGeometry::QueuedGeometry::position
Vector3 position
Definition: OgreStaticGeometry.h:176
Ogre::map
Definition: OgrePrerequisites.h:533
Ogre::StaticGeometry::Region::mLodValues
Mesh::LodValueList mLodValues
LOD values as built up - use the max at each level.
Definition: OgreStaticGeometry.h:413
Ogre::StaticGeometry::Region
The details of a topological region which is the highest level of partitioning for this class...
Definition: OgreStaticGeometry.h:392
Ogre::StaticGeometry::LODBucket::getLod
ushort getLod(void) const
Get the LOD index.
Definition: OgreStaticGeometry.h:358
Ogre::ushort
unsigned short ushort
Definition: OgrePrerequisites.h:113
Ogre::Quaternion::IDENTITY
static const Quaternion IDENTITY
Definition: OgreQuaternion.h:301
Ogre::StaticGeometry::MaterialBucket::getParent
LODBucket * getParent(void)
Definition: OgreStaticGeometry.h:281
Ogre::StaticGeometry::Region::mSquaredViewDepth
Real mSquaredViewDepth
Cached squared view depth value to avoid recalculation by GeometryBucket.
Definition: OgreStaticGeometry.h:433
Ogre::AxisAlignedBox
A 3D box aligned with the x/y/z axes.
Definition: OgreAxisAlignedBox.h:54
Ogre::SceneManager
Manages the organisation and rendering of a &#39;scene&#39; i.e.
Definition: OgreSceneManager.h:143
Ogre::StaticGeometry::QueuedSubMesh::geometryLodList
SubMeshLodGeometryLinkList * geometryLodList
Link to LOD list of geometry, potentially optimised.
Definition: OgreStaticGeometry.h:163
Ogre::StaticGeometry::Region::mLodStrategy
const LodStrategy * mLodStrategy
LOD strategy reference.
Definition: OgreStaticGeometry.h:429
Ogre::StaticGeometry::Region::mLodBucketList
LODBucketList mLodBucketList
List of LOD buckets.
Definition: OgreStaticGeometry.h:423
Ogre::StaticGeometry::mHalfRegionDimensions
Vector3 mHalfRegionDimensions
Definition: OgreStaticGeometry.h:494
Ogre::StaticGeometry::LODBucket::mShadowRenderables
ShadowCaster::ShadowRenderableList mShadowRenderables
List of shadow renderables.
Definition: OgreStaticGeometry.h:352
Ogre::Light
Representation of a dynamic light source in the scene.
Definition: OgreLight.h:73
Ogre::StaticGeometry::Region::mQueuedSubMeshes
QueuedSubMeshList mQueuedSubMeshes
Local list of queued meshes (not used for deallocation)
Definition: OgreStaticGeometry.h:407
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:58
Ogre::StaticGeometry::QueuedGeometry::geometry
SubMeshLodGeometryLink * geometry
Definition: OgreStaticGeometry.h:175
Ogre::StaticGeometry::Region::mBoundingRadius
Real mBoundingRadius
Local bounding radius.
Definition: OgreStaticGeometry.h:417
Ogre::StaticGeometry::Region::mSceneMgr
SceneManager * mSceneMgr
Scene manager link.
Definition: OgreStaticGeometry.h:403
Ogre::StaticGeometry::buildIndexRemap
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...
Definition: OgreStaticGeometry.h:562
Ogre::StaticGeometry::MaterialBucket::mMaterial
MaterialPtr mMaterial
Pointer to material being used.
Definition: OgreStaticGeometry.h:266

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