OgreStaticGeometry.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __StaticGeometry_H__
29 #define __StaticGeometry_H__
30 
31 #include "OgrePrerequisites.h"
32 #include "OgreMovableObject.h"
33 #include "OgreRenderable.h"
34 #include "OgreMesh.h"
35 #include "OgreLodStrategy.h"
36 #include "OgreHeaderPrefix.h"
37 
38 namespace Ogre {
39 
121  class _OgreExport StaticGeometry : public BatchedGeometryAlloc
122  {
123  public:
136  class _OgrePrivate OptimisedSubMeshGeometry : public BatchedGeometryAlloc
137  {
138  public:
139  OptimisedSubMeshGeometry() :vertexData(0), indexData(0) {}
141  {
142  OGRE_DELETE vertexData;
143  OGRE_DELETE indexData;
144  }
147  };
152  {
155  };
160  {
170  };
174  {
179  };
181 
182  // forward declarations
183  class LODBucket;
184  class MaterialBucket;
185  class Region;
186 
191  class _OgreExport GeometryBucket : public Renderable, public BatchedGeometryAlloc
192  {
193  protected:
210 
211  template<typename T>
212  void copyIndexes(const T* src, T* dst, size_t count, size_t indexOffset)
213  {
214  if (indexOffset == 0)
215  {
216  memcpy(dst, src, sizeof(T) * count);
217  }
218  else
219  {
220  while(count--)
221  {
222  *dst++ = static_cast<T>(*src++ + indexOffset);
223  }
224  }
225  }
226  public:
227  GeometryBucket(MaterialBucket* parent, const String& formatString,
228  const VertexData* vData, const IndexData* iData);
229  virtual ~GeometryBucket();
230  MaterialBucket* getParent(void) { return mParent; }
232  const VertexData* getVertexData(void) const { return mVertexData; }
234  const IndexData* getIndexData(void) const { return mIndexData; }
236  const MaterialPtr& getMaterial(void) const;
237  Technique* getTechnique(void) const;
238  void getRenderOperation(RenderOperation& op);
239  void getWorldTransforms(Matrix4* xform) const;
240  Real getSquaredViewDepth(const Camera* cam) const;
241  const LightList& getLights(void) const;
242  bool getCastsShadows(void) const;
243 
247  bool assign(QueuedGeometry* qsm);
249  void build(bool stencilShadows);
251  void dump(std::ofstream& of) const;
252  };
255  class _OgreExport MaterialBucket : public BatchedGeometryAlloc
256  {
257  public:
260  protected:
269 
272  // index to current Geometry Buckets for a given geometry format
276  String getGeometryFormatString(SubMeshLodGeometryLink* geom);
277 
278  public:
279  MaterialBucket(LODBucket* parent, const String& materialName);
280  virtual ~MaterialBucket();
281  LODBucket* getParent(void) { return mParent; }
283  const String& getMaterialName(void) const { return mMaterialName; }
285  void assign(QueuedGeometry* qsm);
287  void build(bool stencilShadows);
289  void addRenderables(RenderQueue* queue, uint8 group,
290  Real lodValue);
292  const MaterialPtr& getMaterial(void) const { return mMaterial; }
296  GeometryIterator getGeometryIterator(void);
298  Technique* getCurrentTechnique(void) const { return mTechnique; }
300  void dump(std::ofstream& of) const;
301  void visitRenderables(Renderable::Visitor* visitor, bool debugRenderables);
302  };
308  class _OgreExport LODBucket : public BatchedGeometryAlloc
309  {
310  public:
313  protected:
315  class _OgreExport LODShadowRenderable : public ShadowRenderable
316  {
317  protected:
319  // Shared link to position buffer
321  // Shared link to w-coord buffer (optional)
323 
324  public:
326  HardwareIndexBufferSharedPtr* indexBuffer, const VertexData* vertexData,
327  bool createSeparateLightCap, bool isLightCap = false);
330  void getWorldTransforms(Matrix4* xform) const;
331  HardwareVertexBufferSharedPtr getPositionBuffer(void) { return mPositionBuffer; }
332  HardwareVertexBufferSharedPtr getWBuffer(void) { return mWBuffer; }
334  virtual void rebindIndexBuffer(const HardwareIndexBufferSharedPtr& indexBuffer);
335 
336  };
340  unsigned short mLod;
353  public:
354  LODBucket(Region* parent, unsigned short lod, Real lodValue);
355  virtual ~LODBucket();
356  Region* getParent(void) { return mParent; }
358  ushort getLod(void) const { return mLod; }
360  Real getLodValue(void) const { return mLodValue; }
362  void assign(QueuedSubMesh* qsm, ushort atLod);
364  void build(bool stencilShadows);
366  void addRenderables(RenderQueue* queue, uint8 group,
367  Real lodValue);
371  MaterialIterator getMaterialIterator(void);
373  void dump(std::ofstream& of) const;
374  void visitRenderables(Renderable::Visitor* visitor, bool debugRenderables);
375  EdgeData* getEdgeList() const { return mEdgeList; }
377  bool isVertexProgramInUse() const { return mVertexProgramInUse; }
378  void updateShadowRenderables(
379  ShadowTechnique shadowTechnique, const Vector4& lightPos,
380  HardwareIndexBufferSharedPtr* indexBuffer,
381  bool extrudeVertices, Real extrusionDistance, unsigned long flags = 0 );
382 
383  };
392  class _OgreExport Region : public MovableObject
393  {
394  friend class MaterialBucket;
395  friend class GeometryBucket;
396  public:
399  protected:
434 
435  public:
436  Region(StaticGeometry* parent, const String& name, SceneManager* mgr,
437  uint32 regionID, const Vector3& centre);
438  virtual ~Region();
439  // more fields can be added in subclasses
440  StaticGeometry* getParent(void) const { return mParent;}
442  void assign(QueuedSubMesh* qmesh);
444  void build(bool stencilShadows);
446  uint32 getID(void) const { return mRegionID; }
448  const Vector3& getCentre(void) const { return mCentre; }
449  const String& getMovableType(void) const;
450  void _notifyCurrentCamera(Camera* cam);
451  const AxisAlignedBox& getBoundingBox(void) const;
452  Real getBoundingRadius(void) const;
453  void _updateRenderQueue(RenderQueue* queue);
455  void visitRenderables(Renderable::Visitor* visitor,
456  bool debugRenderables = false);
457  bool isVisible(void) const;
458  uint32 getTypeFlags(void) const;
459 
462  LODIterator getLODIterator(void);
464  ShadowRenderableListIterator getShadowVolumeRenderableIterator(
465  ShadowTechnique shadowTechnique, const Light* light,
466  HardwareIndexBufferSharedPtr* indexBuffer, size_t* indexBufferUsedSize,
467  bool extrudeVertices, Real extrusionDistance, unsigned long flags = 0 );
469  EdgeData* getEdgeList(void);
471  bool hasEdgeList(void);
472 
474  void dump(std::ofstream& of) const;
475 
476  };
485  protected:
486  // General state & settings
489  bool mBuilt;
496  bool mVisible;
503 
505 
509 
515 
518 
522  virtual Region* getRegion(const AxisAlignedBox& bounds, bool autoCreate);
524  virtual Region* getRegion(const Vector3& point, bool autoCreate);
526  virtual Region* getRegion(ushort x, ushort y, ushort z, bool autoCreate);
528  virtual Region* getRegion(uint32 index);
531  virtual void getRegionIndexes(const Vector3& point,
532  ushort& x, ushort& y, ushort& z);
535  virtual uint32 packIndex(ushort x, ushort y, ushort z);
538  virtual Real getVolumeIntersection(const AxisAlignedBox& box,
539  ushort x, ushort y, ushort z);
542  virtual AxisAlignedBox getRegionBounds(ushort x, ushort y, ushort z);
545  virtual Vector3 getRegionCentre(ushort x, ushort y, ushort z);
547  virtual AxisAlignedBox calculateBounds(VertexData* vertexData,
548  const Vector3& position, const Quaternion& orientation,
549  const Vector3& scale);
551  SubMeshLodGeometryLinkList* determineGeometry(SubMesh* sm);
553  void splitGeometry(VertexData* vd, IndexData* id,
554  SubMeshLodGeometryLink* targetGeomLink);
555 
561  template <typename T>
562  void buildIndexRemap(T* pBuffer, size_t numIndexes, IndexRemap& remap)
563  {
564  remap.clear();
565  for (size_t i = 0; i < numIndexes; ++i)
566  {
567  // use insert since duplicates are silently discarded
568  remap.insert(IndexRemap::value_type(*pBuffer++, remap.size()));
569  // this will have mapped oldindex -> new index IF oldindex
570  // wasn't already there
571  }
572  }
574  template <typename T>
575  void remapIndexes(T* src, T* dst, const IndexRemap& remap,
576  size_t numIndexes)
577  {
578  for (size_t i = 0; i < numIndexes; ++i)
579  {
580  // look up original and map to target
581  IndexRemap::const_iterator ix = remap.find(*src++);
582  assert(ix != remap.end());
583  *dst++ = static_cast<T>(ix->second);
584  }
585  }
586 
587  public:
589  StaticGeometry(SceneManager* owner, const String& name);
591  virtual ~StaticGeometry();
592 
594  const String& getName(void) const { return mName; }
613  virtual void addEntity(Entity* ent, const Vector3& position,
614  const Quaternion& orientation = Quaternion::IDENTITY,
615  const Vector3& scale = Vector3::UNIT_SCALE);
616 
635  virtual void addSceneNode(const SceneNode* node);
636 
647  virtual void build(void);
648 
654  virtual void destroy(void);
655 
659  virtual void reset(void);
660 
670  virtual void setRenderingDistance(Real dist) {
671  mUpperDistance = dist;
672  mSquaredUpperDistance = mUpperDistance * mUpperDistance;
673  }
674 
676  virtual Real getRenderingDistance(void) const { return mUpperDistance; }
677 
679  virtual Real getSquaredRenderingDistance(void) const
680  { return mSquaredUpperDistance; }
681 
683  virtual void setVisible(bool visible);
684 
686  virtual bool isVisible(void) const { return mVisible; }
687 
705  virtual void setCastShadows(bool castShadows);
707  virtual bool getCastShadows(void) { return mCastShadows; }
708 
719  virtual void setRegionDimensions(const Vector3& size) {
720  mRegionDimensions = size;
721  mHalfRegionDimensions = size * 0.5;
722  }
724  virtual const Vector3& getRegionDimensions(void) const { return mRegionDimensions; }
736  virtual void setOrigin(const Vector3& origin) { mOrigin = origin; }
738  virtual const Vector3& getOrigin(void) const { return mOrigin; }
739 
741  void setVisibilityFlags(uint32 flags);
743  uint32 getVisibilityFlags() const;
744 
756  virtual void setRenderQueueGroup(uint8 queueID);
757 
759  virtual uint8 getRenderQueueGroup(void) const;
761  void visitRenderables(Renderable::Visitor* visitor,
762  bool debugRenderables = false);
763 
767  RegionIterator getRegionIterator(void);
768 
772  virtual void dump(const String& filename) const;
773 
774 
775  };
779 }
780 
781 #include "OgreHeaderSuffix.h"
782 
783 #endif
784 
OgreHeaderSuffix.h
Ogre::HashedVector< Light * >
Ogre::StaticGeometry::LODBucket::mQueuedGeometryList
QueuedGeometryList mQueuedGeometryList
Geometry queued for a single LOD (deallocated here)
Definition: OgreStaticGeometry.h:346
Ogre::StaticGeometry::mOrigin
Vector3 mOrigin
Definition: OgreStaticGeometry.h:495
Ogre::Vector3::UNIT_SCALE
static const Vector3 UNIT_SCALE
Definition: OgreVector3.h:807
Ogre::StaticGeometry::IndexRemap
map< size_t, size_t >::type IndexRemap
Definition: OgreStaticGeometry.h:556
Ogre::Mesh::LodValueList
vector< Real >::type LodValueList
Definition: OgreMesh.h:102
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:58
Ogre
Definition: OgreAndroidLogListener.h:34
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::QueuedSubMesh::position
Vector3 position
Definition: OgreStaticGeometry.h:165
Ogre::StaticGeometry::GeometryBucket::mFormatString
String mFormatString
String identifying the vertex / index format.
Definition: OgreStaticGeometry.h:199
Ogre::StaticGeometry::LODBucket::mShadowRenderables
ShadowCaster::ShadowRenderableList mShadowRenderables
List of shadow renderables.
Definition: OgreStaticGeometry.h:352
Ogre::map
Definition: OgrePrerequisites.h:533
Ogre::ShadowCaster::ShadowRenderableList
vector< ShadowRenderable * >::type ShadowRenderableList
Definition: OgreShadowCaster.h:136
OgreMesh.h
Ogre::ushort
unsigned short ushort
Definition: OgrePrerequisites.h:113
Ogre::Camera
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:86
Ogre::StaticGeometry::LODBucket::LODShadowRenderable::mWBuffer
HardwareVertexBufferSharedPtr mWBuffer
Definition: OgreStaticGeometry.h:322
Ogre::StaticGeometry::Region::getParent
StaticGeometry * getParent(void) const
Definition: OgreStaticGeometry.h:440
Ogre::StaticGeometry::GeometryBucket::mQueuedGeometry
QueuedGeometryList mQueuedGeometry
Geometry which has been queued up pre-build (not for deallocation)
Definition: OgreStaticGeometry.h:195
Ogre::StaticGeometry::LODBucket::MaterialIterator
MapIterator< MaterialBucketMap > MaterialIterator
Iterator over the materials in this LOD.
Definition: OgreStaticGeometry.h:369
Ogre::StaticGeometry::QueuedSubMesh::geometryLodList
SubMeshLodGeometryLinkList * geometryLodList
Link to LOD list of geometry, potentially optimised.
Definition: OgreStaticGeometry.h:163
Ogre::StaticGeometry::RegionIterator
MapIterator< RegionMap > RegionIterator
Iterator for iterating over contained regions.
Definition: OgreStaticGeometry.h:765
Ogre::ShadowRenderable
Class which represents the renderable aspects of a set of shadow volume faces.
Definition: OgreShadowCaster.h:52
Ogre::StaticGeometry::QueuedGeometry::geometry
SubMeshLodGeometryLink * geometry
Definition: OgreStaticGeometry.h:175
OGRE_DELETE
#define OGRE_DELETE
Definition: OgreMemoryAllocatorConfig.h:474
Ogre::StaticGeometry::Region::getID
uint32 getID(void) const
Get the region ID of this region.
Definition: OgreStaticGeometry.h:446
Ogre::ShadowTechnique
ShadowTechnique
An enumeration of broad shadow techniques.
Definition: OgreCommon.h:190
Ogre::VectorIterator
Concrete IteratorWrapper for nonconst access to the underlying container.
Definition: OgreIteratorWrapper.h:186
Ogre::Light
Representation of a dynamic light source in the scene.
Definition: OgreLight.h:73
Ogre::StaticGeometry::LODBucket::getParent
Region * getParent(void)
Definition: OgreStaticGeometry.h:356
Ogre::StaticGeometry::Region::mCentre
Vector3 mCentre
Center of the region.
Definition: OgreStaticGeometry.h:411
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::QueuedSubMesh::submesh
SubMesh * submesh
Definition: OgreStaticGeometry.h:161
Ogre::StaticGeometry::MaterialBucket::CurrentGeometryMap
map< String, GeometryBucket * >::type CurrentGeometryMap
Definition: OgreStaticGeometry.h:273
Ogre::StaticGeometry::OptimisedSubMeshGeometry
Struct holding geometry optimised per SubMesh / LOD level, ready for copying to instances.
Definition: OgreStaticGeometry.h:136
Ogre::StaticGeometry::LODBucket::getShadowRenderableList
ShadowCaster::ShadowRenderableList & getShadowRenderableList()
Definition: OgreStaticGeometry.h:376
Ogre::MovableObject
Abstract class defining a movable object in a scene.
Definition: OgreMovableObject.h:60
Ogre::StaticGeometry::getRegionDimensions
virtual const Vector3 & getRegionDimensions(void) const
Gets the size of a single batch of geometry.
Definition: OgreStaticGeometry.h:724
Ogre::HardwareIndexBufferSharedPtr
Shared pointer implementation used to share index buffers.
Definition: OgreHardwareIndexBuffer.h:79
Ogre::StaticGeometry::SubMeshLodGeometryLinkList
vector< SubMeshLodGeometryLink >::type SubMeshLodGeometryLinkList
Definition: OgreStaticGeometry.h:156
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::mRenderQueueID
uint8 mRenderQueueID
The render queue to use when rendering this object.
Definition: OgreStaticGeometry.h:498
Ogre::StaticGeometry::GeometryBucket::mIndexType
HardwareIndexBuffer::IndexType mIndexType
Size of indexes.
Definition: OgreStaticGeometry.h:207
Ogre::uint32
unsigned int uint32
Definition: OgrePlatform.h:359
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::Region::mParent
StaticGeometry * mParent
Parent static geometry.
Definition: OgreStaticGeometry.h:401
Ogre::StaticGeometry::mHalfRegionDimensions
Vector3 mHalfRegionDimensions
Definition: OgreStaticGeometry.h:494
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::QueuedSubMesh::scale
Vector3 scale
Definition: OgreStaticGeometry.h:167
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::StaticGeometry::mSquaredUpperDistance
Real mSquaredUpperDistance
Definition: OgreStaticGeometry.h:491
Ogre::StaticGeometry::getCastShadows
virtual bool getCastShadows(void)
Will the geometry from this object cast shadows?
Definition: OgreStaticGeometry.h:707
Ogre::StaticGeometry
Pre-transforms and batches up meshes for efficient use as static geometry in a scene.
Definition: OgreStaticGeometry.h:121
Ogre::StaticGeometry::GeometryBucket::mMaxVertexIndex
size_t mMaxVertexIndex
Maximum vertex indexable.
Definition: OgreStaticGeometry.h:209
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::Technique
Class representing an approach to rendering this particular Material.
Definition: OgreTechnique.h:53
Ogre::StaticGeometry::QueuedSubMesh::orientation
Quaternion orientation
Definition: OgreStaticGeometry.h:166
Ogre::StaticGeometry::OptimisedSubMeshGeometry::vertexData
VertexData * vertexData
Definition: OgreStaticGeometry.h:145
Ogre::StaticGeometry::GeometryBucket::copyIndexes
void copyIndexes(const T *src, T *dst, size_t count, size_t indexOffset)
Definition: OgreStaticGeometry.h:212
Ogre::StaticGeometry::mRegionDimensions
Vector3 mRegionDimensions
Definition: OgreStaticGeometry.h:493
Ogre::StaticGeometry::mCastShadows
bool mCastShadows
Definition: OgreStaticGeometry.h:492
Ogre::Entity
Defines an instance of a discrete, movable object based on a Mesh.
Definition: OgreEntity.h:82
Ogre::SceneNode
Class representing a node in the scene graph.
Definition: OgreSceneNode.h:58
Ogre::StaticGeometry::Region::mLodBucketList
LODBucketList mLodBucketList
List of LOD buckets
Definition: OgreStaticGeometry.h:423
Ogre::StaticGeometry::Region::mCamera
Camera * mCamera
Current camera.
Definition: OgreStaticGeometry.h:431
Ogre::StaticGeometry::LODBucket::getEdgeList
EdgeData * getEdgeList() const
Definition: OgreStaticGeometry.h:375
Ogre::VertexData
Summary class collecting together vertex source information.
Definition: OgreVertexIndexData.h:49
Ogre::StaticGeometry::GeometryBucket::mParent
MaterialBucket * mParent
Pointer to parent bucket.
Definition: OgreStaticGeometry.h:197
Ogre::Quaternion
Implementation of a Quaternion, i.e.
Definition: OgreQuaternion.h:57
Ogre::LodStrategy
Strategy for determining level of detail.
Definition: OgreLodStrategy.h:54
Ogre::StaticGeometry::MaterialBucket::getMaterial
const MaterialPtr & getMaterial(void) const
Get the material for this bucket.
Definition: OgreStaticGeometry.h:292
Ogre::vector::type
std::vector< T, A > type
Definition: OgrePrerequisites.h:494
Ogre::StaticGeometry::OptimisedSubMeshGeometry::OptimisedSubMeshGeometry
OptimisedSubMeshGeometry()
Definition: OgreStaticGeometry.h:139
OgreHeaderPrefix.h
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:78
Ogre::StaticGeometry::OptimisedSubMeshGeometry::~OptimisedSubMeshGeometry
~OptimisedSubMeshGeometry()
Definition: OgreStaticGeometry.h:140
Ogre::StaticGeometry::MaterialBucket::mCurrentGeometryMap
CurrentGeometryMap mCurrentGeometryMap
Definition: OgreStaticGeometry.h:274
Ogre::list
Definition: OgrePrerequisites.h:505
Ogre::StaticGeometry::Region::mNode
SceneNode * mNode
Scene node.
Definition: OgreStaticGeometry.h:405
Ogre::StaticGeometry::mVisibilityFlags
uint32 mVisibilityFlags
Stores the visibility flags for the regions.
Definition: OgreStaticGeometry.h:502
Ogre::StaticGeometry::OptimisedSubMeshGeometry::indexData
IndexData * indexData
Definition: OgreStaticGeometry.h:146
Ogre::SceneManager
Manages the organisation and rendering of a 'scene' i.e.
Definition: OgreSceneManager.h:143
Ogre::StaticGeometry::mUpperDistance
Real mUpperDistance
Definition: OgreStaticGeometry.h:490
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::LODBucket::LODShadowRenderable::mPositionBuffer
HardwareVertexBufferSharedPtr mPositionBuffer
Definition: OgreStaticGeometry.h:320
Ogre::StaticGeometry::LODBucket
A LODBucket is a collection of smaller buckets with the same LOD.
Definition: OgreStaticGeometry.h:308
OgrePrerequisites.h
Ogre::StaticGeometry::LODBucket::isVertexProgramInUse
bool isVertexProgramInUse() const
Definition: OgreStaticGeometry.h:377
Ogre::HardwareVertexBufferSharedPtr
Shared pointer implementation used to share vertex buffers.
Definition: OgreHardwareVertexBuffer.h:86
Ogre::StaticGeometry::mOwner
SceneManager * mOwner
Definition: OgreStaticGeometry.h:487
Ogre::SubMesh
Defines a part of a complete mesh.
Definition: OgreSubMesh.h:62
Ogre::StaticGeometry::LODBucket::mParent
Region * mParent
Pointer to parent region.
Definition: OgreStaticGeometry.h:338
Ogre::StaticGeometry::QueuedSubMesh
Structure recording a queued submesh for the build.
Definition: OgreStaticGeometry.h:159
Ogre::StaticGeometry::OptimisedSubMeshGeometryList
list< OptimisedSubMeshGeometry * >::type OptimisedSubMeshGeometryList
Definition: OgreStaticGeometry.h:148
Ogre::StaticGeometry::LODBucket::MaterialBucketMap
map< String, MaterialBucket * >::type MaterialBucketMap
Lookup of Material Buckets in this region.
Definition: OgreStaticGeometry.h:312
Ogre::StaticGeometry::MaterialBucket::getCurrentTechnique
Technique * getCurrentTechnique(void) const
Get the current Technique.
Definition: OgreStaticGeometry.h:298
Ogre::StaticGeometry::QueuedGeometry::orientation
Quaternion orientation
Definition: OgreStaticGeometry.h:177
Ogre::StaticGeometry::MaterialBucket::mTechnique
Technique * mTechnique
Active technique.
Definition: OgreStaticGeometry.h:268
Ogre::StaticGeometry::Region::LODBucketList
vector< LODBucket * >::type LODBucketList
list of LOD Buckets in this region
Definition: OgreStaticGeometry.h:398
Ogre::HardwareIndexBuffer::IndexType
IndexType
Definition: OgreHardwareIndexBuffer.h:49
Ogre::AxisAlignedBox
A 3D box aligned with the x/y/z axes.
Definition: OgreAxisAlignedBox.h:54
Ogre::StaticGeometry::QueuedSubMesh::materialName
String materialName
Definition: OgreStaticGeometry.h:164
Ogre::StaticGeometry::Region::LODIterator
VectorIterator< LODBucketList > LODIterator
Definition: OgreStaticGeometry.h:460
Ogre::StaticGeometry::LODBucket::getLod
ushort getLod(void) const
Get the LOD index.
Definition: OgreStaticGeometry.h:358
Ogre::StaticGeometry::MaterialBucket::GeometryIterator
VectorIterator< GeometryBucketList > GeometryIterator
Iterator over geometry.
Definition: OgreStaticGeometry.h:294
Ogre::StaticGeometry::LODBucket::mLod
unsigned short mLod
LOD level (0 == full LOD)
Definition: OgreStaticGeometry.h:340
Ogre::StaticGeometry::MaterialBucket::mMaterialName
String mMaterialName
Material being used.
Definition: OgreStaticGeometry.h:264
Ogre::StaticGeometry::setOrigin
virtual void setOrigin(const Vector3 &origin)
Sets the origin of the geometry.
Definition: OgreStaticGeometry.h:736
Ogre::StaticGeometry::MaterialBucket::getParent
LODBucket * getParent(void)
Definition: OgreStaticGeometry.h:281
Ogre::ulong
unsigned long ulong
Definition: OgrePrerequisites.h:115
Ogre::StaticGeometry::isVisible
virtual bool isVisible(void) const
Are the batches visible?
Definition: OgreStaticGeometry.h:686
Ogre::StaticGeometry::QueuedGeometry::scale
Vector3 scale
Definition: OgreStaticGeometry.h:178
Ogre::StaticGeometry::MaterialBucket::mMaterial
MaterialPtr mMaterial
Pointer to material being used.
Definition: OgreStaticGeometry.h:266
Ogre::StaticGeometry::getOrigin
virtual const Vector3 & getOrigin(void) const
Gets the origin of this geometry.
Definition: OgreStaticGeometry.h:738
Ogre::SharedPtr< Material >
Ogre::StaticGeometry::Region::mAABB
AxisAlignedBox mAABB
Local AABB relative to region centre.
Definition: OgreStaticGeometry.h:415
Ogre::StaticGeometry::QueuedSubMeshList
vector< QueuedSubMesh * >::type QueuedSubMeshList
Definition: OgreStaticGeometry.h:171
Ogre::uint8
unsigned char uint8
Definition: OgrePlatform.h:361
Ogre::StaticGeometry::getName
const String & getName(void) const
Get the name of this object.
Definition: OgreStaticGeometry.h:594
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::MapIterator
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:319
OgreRenderable.h
Ogre::StaticGeometry::GeometryBucket::getParent
MaterialBucket * getParent(void)
Definition: OgreStaticGeometry.h:230
Ogre::StaticGeometry::Region::mCurrentLod
ushort mCurrentLod
The current LOD level, as determined from the last camera.
Definition: OgreStaticGeometry.h:419
OgreMovableObject.h
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::map::type
std::map< K, V, P, A > type
Definition: OgrePrerequisites.h:536
Ogre::StaticGeometry::QueuedGeometryList
vector< QueuedGeometry * >::type QueuedGeometryList
Definition: OgreStaticGeometry.h:180
Ogre::Vector4
4-dimensional homogeneous vector.
Definition: OgreVector4.h:45
Ogre::StaticGeometry::mQueuedSubMeshes
QueuedSubMeshList mQueuedSubMeshes
Definition: OgreStaticGeometry.h:504
Ogre::StaticGeometry::QueuedGeometry
Structure recording a queued geometry for low level builds.
Definition: OgreStaticGeometry.h:173
Ogre::StaticGeometry::LODBucket::LODShadowRenderable::getPositionBuffer
HardwareVertexBufferSharedPtr getPositionBuffer(void)
Definition: OgreStaticGeometry.h:331
Ogre::StaticGeometry::GeometryBucket::getIndexData
const IndexData * getIndexData(void) const
Get the index data for this geometry.
Definition: OgreStaticGeometry.h:234
Ogre::StaticGeometry::setRegionDimensions
virtual void setRegionDimensions(const Vector3 &size)
Sets the size of a single region of geometry.
Definition: OgreStaticGeometry.h:719
Ogre::Renderable::Visitor
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
Definition: OgreRenderable.h:377
Ogre::StaticGeometry::Region::getCentre
const Vector3 & getCentre(void) const
Get the centre point of the region.
Definition: OgreStaticGeometry.h:448
Ogre::StaticGeometry::LODBucket::mEdgeList
EdgeData * mEdgeList
Edge list, used if stencil shadow casting is enabled.
Definition: OgreStaticGeometry.h:348
Ogre::StaticGeometry::Region::mRegionID
uint32 mRegionID
Unique identifier for the region.
Definition: OgreStaticGeometry.h:409
Ogre::Renderable
Abstract class defining the interface all renderable objects must implement.
Definition: OgreRenderable.h:63
Ogre::StaticGeometry::MaterialBucket::mParent
LODBucket * mParent
Pointer to parent LODBucket.
Definition: OgreStaticGeometry.h:262
Ogre::StaticGeometry::setRenderingDistance
virtual void setRenderingDistance(Real dist)
Sets the distance at which batches are no longer rendered.
Definition: OgreStaticGeometry.h:670
Ogre::StaticGeometry::Region::mLightListUpdated
ulong mLightListUpdated
The last frame that this light list was updated in.
Definition: OgreStaticGeometry.h:427
Ogre::StaticGeometry::QueuedSubMesh::worldBounds
AxisAlignedBox worldBounds
Pre-transformed world AABB.
Definition: OgreStaticGeometry.h:169
Ogre::StaticGeometry::mBuilt
bool mBuilt
Definition: OgreStaticGeometry.h:489
Ogre::StaticGeometry::LODBucket::getLodValue
Real getLodValue(void) const
Get the LOD value.
Definition: OgreStaticGeometry.h:360
Ogre::StaticGeometry::Region::mQueuedSubMeshes
QueuedSubMeshList mQueuedSubMeshes
Local list of queued meshes (not used for deallocation)
Definition: OgreStaticGeometry.h:407
Ogre::Quaternion::IDENTITY
static const Quaternion IDENTITY
Definition: OgreQuaternion.h:301
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
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::mName
String mName
Definition: OgreStaticGeometry.h:488
Ogre::StaticGeometry::Region::mLodValue
Real mLodValue
Current LOD value, passed on to do material LOD later.
Definition: OgreStaticGeometry.h:421
Ogre::StaticGeometry::MaterialBucket::getMaterialName
const String & getMaterialName(void) const
Get the material name.
Definition: OgreStaticGeometry.h:283
Ogre::StaticGeometry::mVisible
bool mVisible
Definition: OgreStaticGeometry.h:496
OgreLodStrategy.h
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::mLodValue
Real mLodValue
LOD value at which this LOD starts to apply (squared)
Definition: OgreStaticGeometry.h:342
Ogre::StaticGeometry::GeometryBucket::getVertexData
const VertexData * getVertexData(void) const
Get the vertex data for this geometry.
Definition: OgreStaticGeometry.h:232
Ogre::StaticGeometry::getRenderingDistance
virtual Real getRenderingDistance(void) const
Gets the distance at which batches are no longer rendered.
Definition: OgreStaticGeometry.h:676
Ogre::StaticGeometry::QueuedGeometry::position
Vector3 position
Definition: OgreStaticGeometry.h:176
Ogre::StaticGeometry::mRenderQueueIDSet
bool mRenderQueueIDSet
Flags whether the RenderQueue's default should be used.
Definition: OgreStaticGeometry.h:500
Ogre::StaticGeometry::LODBucket::LODShadowRenderable
Nested class to allow shadows.
Definition: OgreStaticGeometry.h:315
Ogre::StaticGeometry::Region::mBoundingRadius
Real mBoundingRadius
Local bounding radius.
Definition: OgreStaticGeometry.h:417
Ogre::StaticGeometry::Region::mLodValues
Mesh::LodValueList mLodValues
LOD values as built up - use the max at each level.
Definition: OgreStaticGeometry.h:413
Ogre::StaticGeometry::LODBucket::mVertexProgramInUse
bool mVertexProgramInUse
Is a vertex program in use somewhere in this group?
Definition: OgreStaticGeometry.h:350
Ogre::vector
Definition: OgrePrerequisites.h:491
Ogre::StaticGeometry::Region::mLodStrategy
const LodStrategy * mLodStrategy
LOD strategy reference.
Definition: OgreStaticGeometry.h:429
Ogre::StaticGeometry::LODBucket::LODShadowRenderable::mParent
LODBucket * mParent
Definition: OgreStaticGeometry.h:318
Ogre::IndexData
Summary class collecting together index data source information.
Definition: OgreVertexIndexData.h:242
Ogre::StaticGeometry::mRegionMap
RegionMap mRegionMap
Map of regions.
Definition: OgreStaticGeometry.h:517
Ogre::StaticGeometry::MaterialBucket::mGeometryBucketList
GeometryBucketList mGeometryBucketList
list of Geometry Buckets in this region
Definition: OgreStaticGeometry.h:271
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:51
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::StaticGeometry::Region::mSceneMgr
SceneManager * mSceneMgr
Scene manager link.
Definition: OgreStaticGeometry.h:403
Ogre::RenderOperation
'New' rendering operation using vertex buffers.
Definition: OgreRenderOperation.h:45
Ogre::StaticGeometry::Region::mSquaredViewDepth
Real mSquaredViewDepth
Cached squared view depth value to avoid recalculation by GeometryBucket.
Definition: OgreStaticGeometry.h:433
Ogre::StaticGeometry::MaterialBucket::GeometryBucketList
vector< GeometryBucket * >::type GeometryBucketList
list of Geometry Buckets in this region
Definition: OgreStaticGeometry.h:259
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:92
Ogre::StaticGeometry::SubMeshGeometryLookup
map< SubMesh *, SubMeshLodGeometryLinkList * >::type SubMeshGeometryLookup
Definition: OgreStaticGeometry.h:157
Ogre::StaticGeometry::LODBucket::mMaterialBucketMap
MaterialBucketMap mMaterialBucketMap
Lookup of Material Buckets in this region.
Definition: OgreStaticGeometry.h:344
Ogre::StaticGeometry::Region::mLightList
LightList mLightList
List of lights for this region.
Definition: OgreStaticGeometry.h:425
Ogre::StaticGeometry::LODBucket::LODShadowRenderable::getWBuffer
HardwareVertexBufferSharedPtr getWBuffer(void)
Definition: OgreStaticGeometry.h:332

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15