OgreInstancedGeometry.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 __InstancedGeometry_H__
29 #define __InstancedGeometry_H__
30 
31 #include "OgrePrerequisites.h"
32 #include "OgreMovableObject.h"
33 #include "OgreSimpleRenderable.h"
34 #include "OgreSkeleton.h"
35 #include "OgreSkeletonInstance.h"
36 #include "OgreAnimationTrack.h"
37 #include "OgreBone.h"
38 #include "OgreIteratorWrappers.h"
39 #include "OgreMesh.h"
40 #include "OgreHeaderPrefix.h"
41 
42 namespace Ogre {
43 
106  {
107  public:
121  {
122  public:
123  OptimisedSubMeshGeometry() :vertexData(0), indexData(0) {}
125  {
126  delete vertexData;
127  delete indexData;
128  }
131  };
136  {
139  };
144  {
154  unsigned int ID;
155  };
160  {
165  unsigned int ID;
166  };
168 
169  // forward declarations
170  class LODBucket;
171  class MaterialBucket;
172  class BatchInstance;
173  class InstancedObject;
174 
180  {
181  protected:
182 
202  unsigned short mTexCoordIndex;
204 
205  template<typename T>
206  void copyIndexes(const T* src, T* dst, size_t count, size_t indexOffset)
207  {
208  if (indexOffset == 0)
209  {
210  memcpy(dst, src, sizeof(T) * count);
211  }
212  else
213  {
214  while(count--)
215  {
216  *dst++ = static_cast<T>(*src++ + indexOffset);
217  }
218  }
219  }
220 
221  void _initGeometryBucket(const VertexData* vData, const IndexData* iData);
223 
224  public:
225  GeometryBucket(MaterialBucket* parent, const String& formatString,
226  const VertexData* vData, const IndexData* iData);
227  GeometryBucket(const String& name, MaterialBucket* parent, const String& formatString,
228  const VertexData* vData, const IndexData* iData);
229  GeometryBucket(MaterialBucket* parent,const String& formatString,GeometryBucket*bucket);
230  GeometryBucket(const String& name, MaterialBucket* parent,const String& formatString,GeometryBucket*bucket);
231  virtual ~GeometryBucket();
232  MaterialBucket* getParent(void) { return mParent; }
233  Real getBoundingRadius(void) const;
235  const VertexData* getVertexData(void) const { return mVertexData; }
237  const IndexData* getIndexData(void) const { return mIndexData; }
239  const MaterialPtr& getMaterial(void) const;
240  Technique* getTechnique(void) const;
241  void getWorldTransforms(Matrix4* xform) const;
242  virtual unsigned short getNumWorldTransforms(void) const ;
243  Real getSquaredViewDepth(const Camera* cam) const;
244  const LightList& getLights(void) const;
245  bool getCastsShadows(void) const;
246  String getFormatString(void) const;
250  bool assign(QueuedGeometry* qsm);
252  void build();
254  void dump(std::ofstream& of) const;
256  AxisAlignedBox & getAABB(void){return mAABB;}
258  void visitRenderables(Renderable::Visitor* visitor, bool debugRenderables);
259 
260  };
262  {
263  friend class GeometryBucket;
264  public:
266  {
272  TS_WORLD
273  };
276  protected:
278  unsigned short mIndex;
290  unsigned short mNumBoneMatrices;
293  public:
294  InstancedObject(unsigned short index);
295  InstancedObject(unsigned short index,SkeletonInstance *skeleton,AnimationStateSet*animations);
297  void setPosition( Vector3 position);
298  const Vector3& getPosition(void) const;
299  void yaw(const Radian& angle);
300  void pitch(const Radian& angle);
301  void roll(const Radian& angle);
302  void rotate(const Quaternion& q);
303  void setScale(const Vector3& scale);
304  const Vector3& getScale() const;
305  void setOrientation(const Quaternion& q);
309  void needUpdate();
310  GeometryBucketList&getGeometryBucketList(void){return mGeometryBucketList;}
311  void translate(const Matrix3& axes, const Vector3& move);
312  void translate(const Vector3& d);
313  Matrix3 getLocalAxes(void) const;
314  void updateAnimation(void);
316  SkeletonInstance*getSkeletonInstance(void){return mSkeletonInstance;}
317 
318  };
322  {
323  public:
326  protected:
338  // index to current Geometry Buckets for a given geometry format
343 
344  public:
345  MaterialBucket(LODBucket* parent, const String& materialName);
346  virtual ~MaterialBucket();
347  LODBucket* getParent(void) { return mParent; }
349  const String& getMaterialName(void) const { return mMaterialName; }
351  void assign(QueuedGeometry* qsm);
353  void build();
355  void addRenderables(RenderQueue* queue, uint8 group,
356  Real lodValue);
358  const MaterialPtr& getMaterial(void) const { return mMaterial; }
364  Technique* getCurrentTechnique(void) const { return mTechnique; }
366  void dump(std::ofstream& of) const;
372  void updateContainers(GeometryBucket* bucket, const String &format);
373  void setLastIndex(int index){mLastIndex=index;}
374  int getLastIndex(){return mLastIndex;}
375  void setMaterial(const String & name);
376  void visitRenderables(Renderable::Visitor* visitor, bool debugRenderables);
377 
378  };
385  {
386  public:
389  protected:
393  unsigned short mLod;
400  public:
401  LODBucket(BatchInstance* parent, unsigned short lod, Real lodValue);
402  virtual ~LODBucket();
403  BatchInstance* getParent(void) { return mParent; }
405  ushort getLod(void) const { return mLod; }
407  Real getLodValue(void) const { return mLodValue; }
409  void assign(QueuedSubMesh* qsm, ushort atLod);
411  void build();
413  void addRenderables(RenderQueue* queue, uint8 group,
414  Real lodValue);
420  void dump(std::ofstream& of) const;
422  void updateContainers(MaterialBucket* bucket, String& name );
423  void visitRenderables(Renderable::Visitor* visitor, bool debugRenderables);
424 
425  };
435  {
436  friend class MaterialBucket;
437  public:
438 
439 
444  protected:
445 
456 
458  public:
473  protected:
478 
479  public:
480  BatchInstance(InstancedGeometry* parent, const String& name, SceneManager* mgr,
481  uint32 BatchInstanceID);
482  virtual ~BatchInstance();
483  // more fields can be added in subclasses
484  InstancedGeometry* getParent(void) const { return mParent;}
486  void assign(QueuedSubMesh* qmesh);
488  void build();
490  uint32 getID(void) const { return mBatchInstanceID; }
492 // const Vector3& getCentre(void) const { return mCentre; }
493  const String& getMovableType(void) const;
495  const AxisAlignedBox& getBoundingBox(void) const;
497  Real getBoundingRadius(void) const;
499  bool isVisible(void) const;
502  bool debugRenderables = false);
503 
504  // uint32 getTypeFlags(void) const;
505 
510  const LightList& getLights(void) const;
511 
514 
516  void dump(std::ofstream& of) const;
518  void updateContainers(LODBucket* bucket );
521  void addInstancedObject(unsigned short index, InstancedObject* object);
524  SceneNode*getSceneNode(void){return mNode;}
525  ObjectsMap& getInstancesMap(void){return mInstancesMap;}
527 
528  };
539  protected:
540  // General state & settings
543  bool mBuilt;
550  bool mVisible;
558  unsigned int mObjectCount;
573 
579 
589  virtual BatchInstance* getBatchInstance(const AxisAlignedBox& bounds, bool autoCreate);
591  virtual BatchInstance* getBatchInstance(const Vector3& point, bool autoCreate);
593  virtual BatchInstance* getBatchInstance(ushort x, ushort y, ushort z, bool autoCreate);
598  virtual void getBatchInstanceIndexes(const Vector3& point,
599  ushort& x, ushort& y, ushort& z);
605  virtual uint32 packIndex(ushort x, ushort y, ushort z);
609  ushort x, ushort y, ushort z);
618  const Vector3& position, const Quaternion& orientation,
619  const Vector3& scale);
624  SubMeshLodGeometryLink* targetGeomLink);
625 
631  template <typename T>
632  void buildIndexRemap(T* pBuffer, size_t numIndexes, IndexRemap& remap)
633  {
634  remap.clear();
635  for (size_t i = 0; i < numIndexes; ++i)
636  {
637  // use insert since duplicates are silently discarded
638  remap.insert(IndexRemap::value_type(*pBuffer++, remap.size()));
639  // this will have mapped oldindex -> new index IF oldindex
640  // wasn't already there
641  }
642  }
644  template <typename T>
645  void remapIndexes(T* src, T* dst, const IndexRemap& remap,
646  size_t numIndexes)
647  {
648  for (size_t i = 0; i < numIndexes; ++i)
649  {
650  // look up original and map to target
651  IndexRemap::const_iterator ix = remap.find(*src++);
652  assert(ix != remap.end());
653  *dst++ = static_cast<T>(ix->second);
654  }
655  }
656 
657  public:
659  InstancedGeometry(SceneManager* owner, const String& name);
662 
664  const String& getName(void) const { return mName; }
684  virtual void addEntity(Entity* ent, const Vector3& position,
685  const Quaternion& orientation = Quaternion::IDENTITY,
686  const Vector3& scale = Vector3::UNIT_SCALE);
687 
707  virtual void addSceneNode(const SceneNode* node);
708 
719  virtual void build(void);
728  void addBatchInstance(void);
734  virtual void destroy(void);
735 
739  virtual void reset(void);
740 
750  virtual void setRenderingDistance(Real dist) {
751  mUpperDistance = dist;
752  mSquaredUpperDistance = mUpperDistance * mUpperDistance;
753  }
754 
756  virtual Real getRenderingDistance(void) const { return mUpperDistance; }
757 
759  virtual Real getSquaredRenderingDistance(void) const
760  { return mSquaredUpperDistance; }
761 
763  virtual void setVisible(bool visible);
764 
766  virtual bool isVisible(void) const { return mVisible; }
767 
785  virtual void setCastShadows(bool castShadows);
787  virtual bool getCastShadows(void) { return mCastShadows; }
788 
799  virtual void setBatchInstanceDimensions(const Vector3& size) {
800  mBatchInstanceDimensions = size;
801  mHalfBatchInstanceDimensions = size * 0.5;
802  }
804  virtual const Vector3& getBatchInstanceDimensions(void) const { return mBatchInstanceDimensions; }
816  virtual void setOrigin(const Vector3& origin) { mOrigin = origin; }
818  virtual const Vector3& getOrigin(void) const { return mOrigin; }
819 
831  virtual void setRenderQueueGroup(uint8 queueID);
832 
834  virtual uint8 getRenderQueueGroup(void) const;
843  bool debugRenderables = false);
844 
848  virtual void dump(const String& filename) const;
853  SkeletonInstance *getBaseSkeletonInstance(void){return mSkeletonInstance;}
858  SkeletonPtr getBaseSkeleton(void){return mBaseSkeleton;}
863  AnimationStateSet* getBaseAnimationState(void){return mAnimationState;}
868  unsigned int getObjectCount(void){return mObjectCount;}
869 
876  virtual void setProvideWorldInverses(bool flag);
877 
883  virtual bool getProvideWorldInverses(void) const { return mProvideWorldInverses; }
884  };
885 
888 }
889 
890 #include "OgreHeaderSuffix.h"
891 
892 #endif
893 
Ogre::InstancedGeometry::BatchInstance::mLodValues
Mesh::LodValueList mLodValues
LOD values as built up - use the max at each level.
Definition: OgreInstancedGeometry.h:460
OgreHeaderSuffix.h
Ogre::HashedVector< Light * >
Ogre::InstancedGeometry::MaterialBucket::CurrentGeometryMap
map< String, GeometryBucket * >::type CurrentGeometryMap
Definition: OgreInstancedGeometry.h:339
Ogre::InstancedGeometry::GeometryBucket::getTechnique
Technique * getTechnique(void) const
Retrieves a pointer to the Material Technique this renderable object uses.
Ogre::InstancedGeometry::mInstancedGeometryInstance
BatchInstance * mInstancedGeometryInstance
Definition: OgreInstancedGeometry.h:560
Ogre::InstancedGeometry::getBatchInstanceCentre
virtual Vector3 getBatchInstanceCentre(ushort x, ushort y, ushort z)
Get the centre of an indexed BatchInstance.
Ogre::InstancedGeometry::GeometryBucket::GeometryBucket
GeometryBucket(MaterialBucket *parent, const String &formatString, GeometryBucket *bucket)
Ogre::InstancedGeometry::BatchInstance::mLodStrategy
const LodStrategy * mLodStrategy
LOD strategy reference.
Definition: OgreInstancedGeometry.h:477
Ogre::InstancedGeometry::LODBucket::assign
void assign(QueuedSubMesh *qsm, ushort atLod)
Assign a queued submesh to this bucket, using specified mesh LOD.
Ogre::InstancedGeometry::GeometryBucket::getCastsShadows
bool getCastsShadows(void) const
Method which reports whether this renderable would normally cast a shadow.
Ogre::InstancedGeometry::InstancedGeometry
InstancedGeometry(SceneManager *owner, const String &name)
Constructor; do not use directly (.
Ogre::Vector3::UNIT_SCALE
static const Vector3 UNIT_SCALE
Definition: OgreVector3.h:807
Ogre::InstancedGeometry::MaterialBucket::getLastIndex
int getLastIndex()
Definition: OgreInstancedGeometry.h:374
Ogre::InstancedGeometry::LODBucket::build
void build()
Build.
Ogre::InstancedGeometry::InstancedObject::mNumBoneMatrices
unsigned short mNumBoneMatrices
Definition: OgreInstancedGeometry.h:290
Ogre::InstancedGeometry::GeometryBucket::mIndexData
IndexData * mIndexData
Index information, includes index type which limits the max number of vertices which are allowed in o...
Definition: OgreInstancedGeometry.h:196
Ogre::InstancedGeometry::BatchInstanceMap
map< uint32, BatchInstance * >::type BatchInstanceMap
Indexed BatchInstance map based on packed x/y/z BatchInstance index, 10 bits for each axis.
Definition: OgreInstancedGeometry.h:532
Ogre::Mesh::LodValueList
vector< Real >::type LodValueList
Definition: OgreMesh.h:102
Ogre::InstancedGeometry::getBatchInstanceIterator
BatchInstanceIterator getBatchInstanceIterator(void)
Get an iterator over the BatchInstances in this geometry.
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:59
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::InstancedGeometry::getName
const String & getName(void) const
Get the name of this object.
Definition: OgreInstancedGeometry.h:664
Ogre::InstancedGeometry::MaterialBucket::GeometryIterator
VectorIterator< GeometryBucketList > GeometryIterator
Iterator over geometry.
Definition: OgreInstancedGeometry.h:360
Ogre::InstancedGeometry::OptimisedSubMeshGeometryList
list< OptimisedSubMeshGeometry * >::type OptimisedSubMeshGeometryList
Definition: OgreInstancedGeometry.h:132
Ogre::InstancedGeometry::InstancedObject::getGeometryBucketList
GeometryBucketList & getGeometryBucketList(void)
Definition: OgreInstancedGeometry.h:310
Ogre::InstancedGeometry::mVisible
bool mVisible
Definition: OgreInstancedGeometry.h:550
Ogre::InstancedGeometry::mBuilt
bool mBuilt
Definition: OgreInstancedGeometry.h:543
Ogre::InstancedGeometry::QueuedSubMeshOriginList
vector< String >::type QueuedSubMeshOriginList
Definition: OgreInstancedGeometry.h:157
Ogre::InstancedGeometry::InstancedObject::translate
void translate(const Vector3 &d)
Ogre::InstancedGeometry::MaterialBucket::~MaterialBucket
virtual ~MaterialBucket()
Ogre::InstancedGeometry::determineGeometry
SubMeshLodGeometryLinkList * determineGeometry(SubMesh *sm)
Look up or calculate the geometry data to use for this SubMesh.
Ogre::map
Definition: OgrePrerequisites.h:534
Ogre::InstancedGeometry::visitRenderables
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables=false)
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject ...
Ogre::InstancedGeometry::MaterialBucket::getMaterial
const MaterialPtr & getMaterial(void) const
Get the material for this bucket.
Definition: OgreInstancedGeometry.h:358
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:87
Ogre::InstancedGeometry::getBatchInstance
virtual BatchInstance * getBatchInstance(uint32 index)
Get the BatchInstance using a packed index, returns null if it doesn't exist.
Ogre::InstancedGeometry::BatchInstance::mCamera
Camera * mCamera
Current camera, passed on to do material LOD later.
Definition: OgreInstancedGeometry.h:470
Ogre::InstancedGeometry::MaterialBucket::getParent
LODBucket * getParent(void)
Definition: OgreInstancedGeometry.h:347
Ogre::InstancedGeometry::InstancedObject::mBoneWorldMatrices
Matrix4 * mBoneWorldMatrices
Cached bone matrices, including any world transform.
Definition: OgreInstancedGeometry.h:285
Ogre::InstancedGeometry::getVolumeIntersection
virtual Real getVolumeIntersection(const AxisAlignedBox &box, ushort x, ushort y, ushort z)
Get the volume intersection for an indexed BatchInstance with some bounds.
Ogre::InstancedGeometry::QueuedSubMesh::submesh
SubMesh * submesh
Definition: OgreInstancedGeometry.h:145
Ogre::InstancedGeometry::BatchInstance::InstancedObjectIterator
MapIterator< ObjectsMap > InstancedObjectIterator
Definition: OgreInstancedGeometry.h:443
Ogre::InstancedGeometry::GeometryBucket::getBoundingRadius
Real getBoundingRadius(void) const
Retrieves the radius of the origin-centered bounding sphere for this object.
Ogre::InstancedGeometry::LODBucket::MaterialIterator
MapIterator< MaterialBucketMap > MaterialIterator
Iterator over the materials in this LOD.
Definition: OgreInstancedGeometry.h:416
Ogre::InstancedGeometry::mProvideWorldInverses
bool mProvideWorldInverses
Flags to indicate whether the World Transform Inverse matrices are passed to the shaders.
Definition: OgreInstancedGeometry.h:552
Ogre::InstancedGeometry::MaterialBucket::build
void build()
Build.
Ogre::InstancedGeometry::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: OgreInstancedGeometry.h:632
Ogre::InstancedGeometry::QueuedSubMesh
Structure recording a queued submesh for the build.
Definition: OgreInstancedGeometry.h:144
Ogre::InstancedGeometry::GeometryBucket::mParent
MaterialBucket * mParent
Pointer to parent bucket.
Definition: OgreInstancedGeometry.h:188
Ogre::InstancedGeometry::destroy
virtual void destroy(void)
Destroys all the built geometry state (reverse of build).
Ogre::InstancedGeometry::GeometryBucket::getNumWorldTransforms
virtual unsigned short getNumWorldTransforms(void) const
Returns the number of world transform matrices this renderable requires.
Ogre::InstancedGeometry::getProvideWorldInverses
virtual bool getProvideWorldInverses(void) const
Definition: OgreInstancedGeometry.h:883
Ogre::InstancedGeometry::BatchInstance::BatchInstance
BatchInstance(InstancedGeometry *parent, const String &name, SceneManager *mgr, uint32 BatchInstanceID)
Ogre::InstancedGeometry::MaterialBucket::getGeometryFormatString
String getGeometryFormatString(SubMeshLodGeometryLink *geom)
Get a packed string identifying the geometry format.
Ogre::InstancedGeometry::InstancedObject::mIndex
unsigned short mIndex
Definition: OgreInstancedGeometry.h:278
Ogre::InstancedGeometry::QueuedGeometry::scale
Vector3 scale
Definition: OgreInstancedGeometry.h:164
Ogre::InstancedGeometry::BatchInstance::mAABB
AxisAlignedBox mAABB
Local AABB relative to BatchInstance centre.
Definition: OgreInstancedGeometry.h:462
Ogre::InstancedGeometry::InstancedObject::getOrientation
Quaternion & getOrientation(void)
Ogre::InstancedGeometry::InstancedObject::setOrientation
void setOrientation(const Quaternion &q)
Ogre::InstancedGeometry::setBatchInstanceDimensions
virtual void setBatchInstanceDimensions(const Vector3 &size)
Sets the size of a single BatchInstance of geometry.
Definition: OgreInstancedGeometry.h:799
Ogre::InstancedGeometry::MaterialBucket::dump
void dump(std::ofstream &of) const
Dump contents for diagnostics.
Ogre::InstancedGeometry::InstancedObject::~InstancedObject
~InstancedObject()
Ogre::VectorIterator
Concrete IteratorWrapper for nonconst access to the underlying container.
Definition: OgreIteratorWrapper.h:186
Ogre::InstancedGeometry::getBatchInstance
virtual BatchInstance * getBatchInstance(ushort x, ushort y, ushort z, bool autoCreate)
Get the BatchInstance using indexes.
Ogre::InstancedGeometry::LODBucket::addRenderables
void addRenderables(RenderQueue *queue, uint8 group, Real lodValue)
Add children to the render queue.
Ogre::Matrix3
A 3x3 matrix which can represent rotations around axes.
Definition: OgreMatrix3.h:69
Ogre::InstancedGeometry::mOptimisedSubMeshGeometryList
OptimisedSubMeshGeometryList mOptimisedSubMeshGeometryList
List of geometry which has been optimised for SubMesh use This is the primary storage used for cleani...
Definition: OgreInstancedGeometry.h:572
Ogre::InstancedGeometry::BatchInstance::_updateRenderQueue
void _updateRenderQueue(RenderQueue *queue)
Internal method by which the movable object must add Renderable subclass instances to the rendering q...
Ogre::InstancedGeometry::BatchInstance::mSquaredViewDepth
Real mSquaredViewDepth
Cached squared view depth value to avoid recalculation by GeometryBucket.
Definition: OgreInstancedGeometry.h:472
Ogre::InstancedGeometry::InstancedObject::setPosition
void setPosition(Vector3 position)
Ogre::MovableObject
Abstract class defining a movable object in a scene.
Definition: OgreMovableObject.h:61
Ogre::InstancedGeometry::LODBucket::getLod
ushort getLod(void) const
Get the LOD index.
Definition: OgreInstancedGeometry.h:405
Ogre::InstancedGeometry::MaterialBucket::mMaterialName
String mMaterialName
Material being used.
Definition: OgreInstancedGeometry.h:330
Ogre::InstancedGeometry::addBatchInstance
void addBatchInstance(void)
Add a new batch instance.
OgreSimpleRenderable.h
Ogre::InstancedGeometry::mQueuedSubMeshes
QueuedSubMeshList mQueuedSubMeshes
Definition: OgreInstancedGeometry.h:559
Ogre::InstancedGeometry::InstancedObject::mOrientation
Quaternion mOrientation
Definition: OgreInstancedGeometry.h:280
Ogre::InstancedGeometry::InstancedObject::mScale
Vector3 mScale
Definition: OgreInstancedGeometry.h:281
Ogre::InstancedGeometry::GeometryBucket::mAABB
AxisAlignedBox mAABB
Definition: OgreInstancedGeometry.h:203
Ogre::InstancedGeometry::BatchInstance::getSceneNode
SceneNode * getSceneNode(void)
Definition: OgreInstancedGeometry.h:524
Ogre::InstancedGeometry::InstancedObject::roll
void roll(const Radian &angle)
Ogre::InstancedGeometry::mOwner
SceneManager * mOwner
Definition: OgreInstancedGeometry.h:541
Ogre::InstancedGeometry::getRenderingDistance
virtual Real getRenderingDistance(void) const
Gets the distance at which batches are no longer rendered.
Definition: OgreInstancedGeometry.h:756
Ogre::uint32
unsigned int uint32
Definition: OgrePlatform.h:359
Ogre::InstancedGeometry::remapIndexes
void remapIndexes(T *src, T *dst, const IndexRemap &remap, size_t numIndexes)
Method for altering indexes based on a remap.
Definition: OgreInstancedGeometry.h:645
Ogre::InstancedGeometry::setRenderingDistance
virtual void setRenderingDistance(Real dist)
Sets the distance at which batches are no longer rendered.
Definition: OgreInstancedGeometry.h:750
OgreSkeletonInstance.h
Ogre::InstancedGeometry::MaterialBucket::getMaterialName
const String & getMaterialName(void) const
Get the material name.
Definition: OgreInstancedGeometry.h:349
Ogre::InstancedGeometry::mObjectCount
unsigned int mObjectCount
number of objects in the batch
Definition: OgreInstancedGeometry.h:558
Ogre::InstancedGeometry::MaterialBucket::mMaterial
MaterialPtr mMaterial
Pointer to material being used.
Definition: OgreInstancedGeometry.h:332
Ogre::InstancedGeometry::InstancedObject::TS_LOCAL
@ TS_LOCAL
Transform is relative to the local space.
Definition: OgreInstancedGeometry.h:268
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::InstancedGeometry::QueuedGeometry::position
Vector3 position
Definition: OgreInstancedGeometry.h:162
Ogre::InstancedGeometry::BatchInstance::updateBoundingBox
void updateBoundingBox()
update the bounding box of the BatchInstance according to the positions of the objects
Ogre::InstancedGeometry::GeometryBucket::_initGeometryBucket
void _initGeometryBucket(GeometryBucket *bucket)
Ogre::Technique
Class representing an approach to rendering this particular Material.
Definition: OgreTechnique.h:54
Ogre::InstancedGeometry::getBatchInstanceBounds
virtual AxisAlignedBox getBatchInstanceBounds(ushort x, ushort y, ushort z)
Get the bounds of an indexed BatchInstance.
Ogre::InstancedGeometry::BatchInstance::getObjectIterator
InstancedObjectIterator getObjectIterator()
Ogre::InstancedGeometry::QueuedSubMesh::position
Vector3 position
Definition: OgreInstancedGeometry.h:149
Ogre::InstancedGeometry::build
virtual void build(void)
Build the geometry.
Ogre::InstancedGeometry::GeometryBucket::~GeometryBucket
virtual ~GeometryBucket()
Ogre::InstancedGeometry::getBaseSkeleton
SkeletonPtr getBaseSkeleton(void)
Definition: OgreInstancedGeometry.h:858
Ogre::InstancedGeometry::OptimisedSubMeshGeometry::indexData
IndexData * indexData
Definition: OgreInstancedGeometry.h:130
Ogre::InstancedGeometry::OptimisedSubMeshGeometry::OptimisedSubMeshGeometry
OptimisedSubMeshGeometry()
Definition: OgreInstancedGeometry.h:123
Ogre::InstancedGeometry::InstancedObject::addBucketToList
void addBucketToList(GeometryBucket *bucket)
Ogre::InstancedGeometry::getRenderOperationVector
RenderOperationVector & getRenderOperationVector()
get the mRenderOps vector.
Definition: OgreInstancedGeometry.h:840
Ogre::InstancedGeometry::getBatchInstanceIndexes
virtual void getBatchInstanceIndexes(const Vector3 &point, ushort &x, ushort &y, ushort &z)
Get the BatchInstance indexes for a point.
Ogre::InstancedGeometry::BatchInstance::mBoundingRadius
Real mBoundingRadius
Local bounding radius.
Definition: OgreInstancedGeometry.h:464
Ogre::Entity
Defines an instance of a discrete, movable object based on a Mesh.
Definition: OgreEntity.h:83
Ogre::InstancedGeometry::LODBucket::visitRenderables
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables)
Ogre::AnimationState
Represents the state of an animation and the weight of its influence.
Definition: OgreAnimationState.h:55
Ogre::SceneNode
Class representing a node in the scene graph.
Definition: OgreSceneNode.h:59
Ogre::InstancedGeometry::LODBucket::updateContainers
void updateContainers(MaterialBucket *bucket, String &name)
fill the map
Ogre::InstancedGeometry::MaterialBucket::mTechnique
Technique * mTechnique
Active technique.
Definition: OgreInstancedGeometry.h:334
Ogre::InstancedGeometry::GeometryBucket::mFormatString
String mFormatString
String identifying the vertex / index format.
Definition: OgreInstancedGeometry.h:190
Ogre::InstancedGeometry::LODBucket::mLod
unsigned short mLod
LOD level (0 == full LOD)
Definition: OgreInstancedGeometry.h:393
Ogre::InstancedGeometry::BatchInstance::getLights
const LightList & getLights(void) const
Shared set of lights for all GeometryBuckets.
Ogre::InstancedGeometry::InstancedObject::mGeometryBucketList
GeometryBucketList mGeometryBucketList
Definition: OgreInstancedGeometry.h:277
Ogre::InstancedGeometry
Pre-transforms and batches up meshes for efficient use as instanced geometry in a scene.
Definition: OgreInstancedGeometry.h:106
Ogre::InstancedGeometry::BatchInstance::mLodBucketList
LODBucketList mLodBucketList
List of LOD buckets
Definition: OgreInstancedGeometry.h:475
Ogre::InstancedGeometry::BatchInstance::mNode
SceneNode * mNode
Scene node.
Definition: OgreInstancedGeometry.h:451
Ogre::InstancedGeometry::QueuedGeometryList
vector< QueuedGeometry * >::type QueuedGeometryList
Definition: OgreInstancedGeometry.h:167
Ogre::InstancedGeometry::LODBucket::mLodValue
Real mLodValue
LOD value at which this LOD starts to apply (squared)
Definition: OgreInstancedGeometry.h:395
Ogre::VertexData
Summary class collecting together vertex source information.
Definition: OgreVertexIndexData.h:50
Ogre::InstancedGeometry::MaterialBucket::GeometryBucketList
vector< GeometryBucket * >::type GeometryBucketList
list of Geometry Buckets in this BatchInstance
Definition: OgreInstancedGeometry.h:325
Ogre::InstancedGeometry::BatchInstance::mCurrentLod
ushort mCurrentLod
The current LOD level, as determined from the last camera.
Definition: OgreInstancedGeometry.h:466
Ogre::InstancedGeometry::InstancedObject::InstancedObject
InstancedObject(unsigned short index)
Ogre::InstancedGeometry::InstancedObject::setScale
void setScale(const Vector3 &scale)
Ogre::InstancedGeometry::isVisible
virtual bool isVisible(void) const
Are the batches visible?
Definition: OgreInstancedGeometry.h:766
Ogre::Quaternion
Implementation of a Quaternion, i.e.
Definition: OgreQuaternion.h:58
Ogre::LodStrategy
Strategy for determining level of detail.
Definition: OgreLodStrategy.h:55
Ogre::InstancedGeometry::QueuedSubMesh::geometryLodList
SubMeshLodGeometryLinkList * geometryLodList
Link to LOD list of geometry, potentially optimised.
Definition: OgreInstancedGeometry.h:147
Ogre::InstancedGeometry::LODBucket::MaterialBucketMap
map< String, MaterialBucket * >::type MaterialBucketMap
Lookup of Material Buckets in this BatchInstance.
Definition: OgreInstancedGeometry.h:388
Ogre::InstancedGeometry::BatchInstance::attachToScene
void attachToScene()
attach the BatchInstance to the scene
Ogre::vector::type
std::vector< T, A > type
Definition: OgrePrerequisites.h:494
Ogre::InstancedGeometry::getBaseAnimationState
AnimationStateSet * getBaseAnimationState(void)
Definition: OgreInstancedGeometry.h:863
Ogre::InstancedGeometry::MaterialBucket::getCurrentTechnique
Technique * getCurrentTechnique(void) const
Get the current Technique.
Definition: OgreInstancedGeometry.h:364
Ogre::InstancedGeometry::InstancedObject::getSkeletonInstance
SkeletonInstance * getSkeletonInstance(void)
Definition: OgreInstancedGeometry.h:316
Ogre::InstancedGeometry::setProvideWorldInverses
virtual void setProvideWorldInverses(bool flag)
Ogre::InstancedGeometry::MaterialBucket::addRenderables
void addRenderables(RenderQueue *queue, uint8 group, Real lodValue)
Add children to the render queue.
Ogre::InstancedGeometry::MaterialBucket
A MaterialBucket is a collection of smaller buckets with the same Material (and implicitly the same L...
Definition: OgreInstancedGeometry.h:322
OgreHeaderPrefix.h
Ogre::InstancedGeometry::InstancedObject::yaw
void yaw(const Radian &angle)
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:79
Ogre::InstancedGeometry::InstancedObject::updateAnimation
void updateAnimation(void)
Ogre::list
Definition: OgrePrerequisites.h:506
Ogre::InstancedGeometry::QueuedGeometry
Structure recording a queued geometry for low level builds.
Definition: OgreInstancedGeometry.h:160
Ogre::InstancedGeometry::GeometryBucket::_initGeometryBucket
void _initGeometryBucket(const VertexData *vData, const IndexData *iData)
Ogre::InstancedGeometry::mRenderQueueID
uint8 mRenderQueueID
The render queue to use when rendering this object.
Definition: OgreInstancedGeometry.h:554
Ogre::InstancedGeometry::BatchInstance::assign
void assign(QueuedSubMesh *qmesh)
Assign a queued mesh to this BatchInstance, read for final build.
Ogre::InstancedGeometry::setOrigin
virtual void setOrigin(const Vector3 &origin)
Sets the origin of the geometry.
Definition: OgreInstancedGeometry.h:816
Ogre::InstancedGeometry::LODBucket::dump
void dump(std::ofstream &of) const
Dump contents for diagnostics.
Ogre::SceneManager
Manages the organisation and rendering of a 'scene' i.e.
Definition: OgreSceneManager.h:144
Ogre::InstancedGeometry::BatchInstance::mParent
InstancedGeometry * mParent
Parent static geometry.
Definition: OgreInstancedGeometry.h:447
Ogre::InstancedGeometry::BatchInstance::mBatchInstanceID
uint32 mBatchInstanceID
Unique identifier for the BatchInstance.
Definition: OgreInstancedGeometry.h:455
Ogre::InstancedGeometry::MaterialBucket::MaterialBucket
MaterialBucket(LODBucket *parent, const String &materialName)
Ogre::InstancedGeometry::mOrigin
Vector3 mOrigin
Definition: OgreInstancedGeometry.h:549
Ogre::InstancedGeometry::calculateBounds
virtual AxisAlignedBox calculateBounds(VertexData *vertexData, const Vector3 &position, const Quaternion &orientation, const Vector3 &scale)
Calculate world bounds from a set of vertex data.
Ogre::InstancedGeometry::MaterialBucket::mGeometryBucketList
GeometryBucketList mGeometryBucketList
list of Geometry Buckets in this BatchInstance
Definition: OgreInstancedGeometry.h:337
Ogre::InstancedGeometry::LODBucket
A LODBucket is a collection of smaller buckets with the same LOD.
Definition: OgreInstancedGeometry.h:385
Ogre::InstancedGeometry::QueuedGeometry::ID
unsigned int ID
Definition: OgreInstancedGeometry.h:165
Ogre::InstancedGeometry::InstancedObject::translate
void translate(const Matrix3 &axes, const Vector3 &move)
Ogre::InstancedGeometry::mCastShadows
bool mCastShadows
Definition: OgreInstancedGeometry.h:546
OgrePrerequisites.h
Ogre::InstancedGeometry::InstancedObject::mAnimationState
AnimationStateSet * mAnimationState
State of animation for animable meshes.
Definition: OgreInstancedGeometry.h:289
Ogre::InstancedGeometry::dump
virtual void dump(const String &filename) const
Dump the contents of this InstancedGeometry to a file for diagnostic purposes.
Ogre::InstancedGeometry::getObjectCount
unsigned int getObjectCount(void)
Definition: OgreInstancedGeometry.h:868
Ogre::InstancedGeometry::BatchInstance::addInstancedObject
void addInstancedObject(unsigned short index, InstancedObject *object)
Ogre::SubMesh
Defines a part of a complete mesh.
Definition: OgreSubMesh.h:63
Ogre::InstancedGeometry::getBatchInstance
virtual BatchInstance * getBatchInstance(const AxisAlignedBox &bounds, bool autoCreate)
Virtual method for getting a BatchInstance most suitable for the passed in bounds.
Ogre::InstancedGeometry::InstancedObject::mTransformation
Matrix4 mTransformation
Definition: OgreInstancedGeometry.h:279
Ogre::InstancedGeometry::MaterialBucket::mCurrentGeometryMap
CurrentGeometryMap mCurrentGeometryMap
Definition: OgreInstancedGeometry.h:340
Ogre::InstancedGeometry::GeometryBucket::getFormatString
String getFormatString(void) const
Ogre::InstancedGeometry::mName
String mName
Definition: OgreInstancedGeometry.h:542
Ogre::InstancedGeometry::BatchInstance::getBoundingRadius
Real getBoundingRadius(void) const
Retrieves the radius of the origin-centered bounding sphere for this object.
Ogre::InstancedGeometry::GeometryBucket::mVertexData
VertexData * mVertexData
Vertex information, includes current number of vertices committed to be a part of this bucket.
Definition: OgreInstancedGeometry.h:193
Ogre::InstancedGeometry::mSquaredUpperDistance
Real mSquaredUpperDistance
Definition: OgreInstancedGeometry.h:545
Ogre::InstancedGeometry::InstancedObject::mPosition
Vector3 mPosition
Definition: OgreInstancedGeometry.h:282
Ogre::InstancedGeometry::BatchInstance::getID
uint32 getID(void) const
Get the BatchInstance ID of this BatchInstance.
Definition: OgreInstancedGeometry.h:490
Ogre::InstancedGeometry::MaterialBucket::visitRenderables
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables)
Ogre::InstancedGeometry::GeometryBucket::mTexCoordIndex
unsigned short mTexCoordIndex
Index of the Texcoord where the index is stored.
Definition: OgreInstancedGeometry.h:202
Ogre::InstancedGeometry::BatchInstance::build
void build()
Build this BatchInstance.
Ogre::InstancedGeometry::GeometryBucket::getLights
const LightList & getLights(void) const
Gets a list of lights, ordered relative to how close they are to this renderable.
Ogre::InstancedGeometry::IndexRemap
map< size_t, size_t >::type IndexRemap
Definition: OgreInstancedGeometry.h:626
Ogre::InstancedGeometry::GeometryBucket::getVertexData
const VertexData * getVertexData(void) const
Get the vertex data for this geometry.
Definition: OgreInstancedGeometry.h:235
Ogre::Radian
Wrapper class which indicates a given angle value is in Radians.
Definition: OgreMath.h:48
Ogre::InstancedGeometry::LODBucket::getMaterialIterator
MaterialIterator getMaterialIterator(void)
Get an iterator over the materials in this LOD.
Ogre::InstancedGeometry::BatchInstance::LODIterator
VectorIterator< LODBucketList > LODIterator
Definition: OgreInstancedGeometry.h:506
Ogre::InstancedGeometry::LODBucket::mParent
BatchInstance * mParent
Pointer to parent BatchInstance.
Definition: OgreInstancedGeometry.h:391
Ogre::InstancedGeometry::GeometryBucket::visitRenderables
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables)
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject ...
Ogre::InstancedGeometry::InstancedObject::TransformSpace
TransformSpace
Definition: OgreInstancedGeometry.h:266
Ogre::InstancedGeometry::mSkeletonInstance
SkeletonInstance * mSkeletonInstance
Definition: OgreInstancedGeometry.h:565
Ogre::HardwareIndexBuffer::IndexType
IndexType
Definition: OgreHardwareIndexBuffer.h:49
Ogre::InstancedGeometry::BatchInstance::~BatchInstance
virtual ~BatchInstance()
Ogre::InstancedGeometry::GeometryBucket::mQueuedGeometry
QueuedGeometryList mQueuedGeometry
Geometry which has been queued up pre-build (not for deallocation)
Definition: OgreInstancedGeometry.h:184
Ogre::AxisAlignedBox
A 3D box aligned with the x/y/z axes.
Definition: OgreAxisAlignedBox.h:55
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::InstancedGeometry::InstancedObject::getLocalAxes
Matrix3 getLocalAxes(void) const
Ogre::InstancedGeometry::GeometryBucket::mBatch
InstancedGeometry * mBatch
Pointer to the Batch.
Definition: OgreInstancedGeometry.h:186
Ogre::InstancedGeometry::BatchInstance::getLODIterator
LODIterator getLODIterator(void)
Get an iterator over the LODs in this BatchInstance.
Ogre::InstancedGeometry::BatchInstance::mInstancesMap
ObjectsMap mInstancesMap
Definition: OgreInstancedGeometry.h:457
Ogre::InstancedGeometry::MaterialBucket::getGeometryBucketList
MaterialBucket::GeometryBucketList * getGeometryBucketList(void) const
Return the geometry list.
Ogre::InstancedGeometry::QueuedGeometry::geometry
SubMeshLodGeometryLink * geometry
Definition: OgreInstancedGeometry.h:161
Ogre::InstancedGeometry::MaterialBucket::assign
void assign(QueuedGeometry *qsm)
Assign geometry to this bucket.
Ogre::InstancedGeometry::BatchInstance::LODBucketList
vector< LODBucket * >::type LODBucketList
list of LOD Buckets in this BatchInstance
Definition: OgreInstancedGeometry.h:441
Ogre::InstancedGeometry::reset
virtual void reset(void)
Clears any of the entities / nodes added to this geometry and destroys anything which has already bee...
Ogre::InstancedGeometry::BatchInstanceIterator
MapIterator< BatchInstanceMap > BatchInstanceIterator
Iterator for iterating over contained BatchInstances.
Definition: OgreInstancedGeometry.h:836
Ogre::InstancedGeometry::GeometryBucket::getSquaredViewDepth
Real getSquaredViewDepth(const Camera *cam) const
Returns the camera-relative squared depth of this renderable.
Ogre::InstancedGeometry::QueuedSubMeshList
vector< QueuedSubMesh * >::type QueuedSubMeshList
Definition: OgreInstancedGeometry.h:156
OgreAnimationTrack.h
Ogre::InstancedGeometry::BatchInstance::getMovableType
const String & getMovableType(void) const
Get the centre point of the BatchInstance.
Ogre::InstancedGeometry::GeometryBucket::getWorldTransforms
void getWorldTransforms(Matrix4 *xform) const
Gets the world transform matrix / matrices for this renderable object.
Ogre::InstancedGeometry::mHalfBatchInstanceDimensions
Vector3 mHalfBatchInstanceDimensions
Definition: OgreInstancedGeometry.h:548
Ogre::InstancedGeometry::GeometryBucket::getAABB
AxisAlignedBox & getAABB(void)
Return the BoundingBox information. Useful when cloning the batch instance.
Definition: OgreInstancedGeometry.h:256
Ogre::InstancedGeometry::InstancedObject::GeometryBucketList
vector< GeometryBucket * >::type GeometryBucketList
list of Geometry Buckets that contains the instanced object
Definition: OgreInstancedGeometry.h:275
Ogre::InstancedGeometry::InstancedObject::pitch
void pitch(const Radian &angle)
Ogre::InstancedGeometry::mBaseSkeleton
SkeletonPtr mBaseSkeleton
this is just a pointer to the base skeleton that will be used for each animated object in the batches...
Definition: OgreInstancedGeometry.h:564
Ogre::InstancedGeometry::packIndex
virtual uint32 packIndex(ushort x, ushort y, ushort z)
Pack 3 indexes into a single index value.
Ogre::InstancedGeometry::GeometryBucket::GeometryBucket
GeometryBucket(const String &name, MaterialBucket *parent, const String &formatString, const VertexData *vData, const IndexData *iData)
Ogre::InstancedGeometry::MaterialBucket::mParent
LODBucket * mParent
Pointer to parent LODBucket.
Definition: OgreInstancedGeometry.h:328
Ogre::SharedPtr< Material >
Ogre::InstancedGeometry::GeometryBucket::copyIndexes
void copyIndexes(const T *src, T *dst, size_t count, size_t indexOffset)
Definition: OgreInstancedGeometry.h:206
Ogre::InstancedGeometry::MaterialBucket::getMaterialBucketMap
MaterialBucket::CurrentGeometryMap * getMaterialBucketMap(void) const
Return the geometry map.
Ogre::InstancedGeometry::LODBucket::mQueuedGeometryList
QueuedGeometryList mQueuedGeometryList
Geometry queued for a single LOD (deallocated here)
Definition: OgreInstancedGeometry.h:399
Ogre::InstancedGeometry::GeometryBucket::mMaxVertexIndex
size_t mMaxVertexIndex
Maximum vertex indexable.
Definition: OgreInstancedGeometry.h:200
Ogre::uint8
unsigned char uint8
Definition: OgrePlatform.h:361
Ogre::MapIterator
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:319
Ogre::InstancedGeometry::MaterialBucket::setMaterial
void setMaterial(const String &name)
Ogre::AnimationStateSet
Class encapsulating a set of AnimationState objects.
Definition: OgreAnimationState.h:197
OgreIteratorWrappers.h
OgreMovableObject.h
Ogre::InstancedGeometry::GeometryBucket
A GeometryBucket is a the lowest level bucket where geometry with the same vertex & index format is s...
Definition: OgreInstancedGeometry.h:180
Ogre::InstancedGeometry::mAnimationState
AnimationStateSet * mAnimationState
This is the main animation state.
Definition: OgreInstancedGeometry.h:569
Ogre::InstancedGeometry::getBatchInstanceDimensions
virtual const Vector3 & getBatchInstanceDimensions(void) const
Gets the size of a single batch of geometry.
Definition: OgreInstancedGeometry.h:804
Ogre::InstancedGeometry::mRenderOps
RenderOperationVector mRenderOps
This vector stores all the renderOperation used in the batch.
Definition: OgreInstancedGeometry.h:585
Ogre::InstancedGeometry::InstancedObject::mFrameAnimationLastUpdated
unsigned long mFrameAnimationLastUpdated
Records the last frame in which animation was updated.
Definition: OgreInstancedGeometry.h:292
Ogre::map::type
std::map< K, V, P, A > type
Definition: OgrePrerequisites.h:536
Ogre::InstancedGeometry::mBatchInstanceDimensions
Vector3 mBatchInstanceDimensions
Definition: OgreInstancedGeometry.h:547
Ogre::InstancedGeometry::GeometryBucket::dump
void dump(std::ofstream &of) const
Dump contents for diagnostics.
Ogre::SkeletonInstance
A SkeletonInstance is a single instance of a Skeleton used by a world object.
Definition: OgreSkeletonInstance.h:54
Ogre::InstancedGeometry::QueuedSubMesh::ID
unsigned int ID
Definition: OgreInstancedGeometry.h:154
Ogre::InstancedGeometry::BatchInstance::visitRenderables
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables=false)
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject ...
Ogre::InstancedGeometry::GeometryBucket::mIndexType
HardwareIndexBuffer::IndexType mIndexType
Size of indexes.
Definition: OgreInstancedGeometry.h:198
Ogre::InstancedGeometry::QueuedSubMesh::worldBounds
AxisAlignedBox worldBounds
Pre-transformed world AABB.
Definition: OgreInstancedGeometry.h:153
Ogre::InstancedGeometry::BatchInstance::dump
void dump(std::ofstream &of) const
Dump contents for diagnostics.
Ogre::InstancedGeometry::GeometryBucket::assign
bool assign(QueuedGeometry *qsm)
Try to assign geometry to this bucket.
Ogre::InstancedGeometry::InstancedObject::rotate
void rotate(const Quaternion &q)
Ogre::InstancedGeometry::BatchInstance::_notifyCurrentCamera
void _notifyCurrentCamera(Camera *cam)
Internal method to notify the object of the camera to be used for the next rendering operation.
Ogre::Renderable::Visitor
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
Definition: OgreRenderable.h:378
Ogre::InstancedGeometry::QueuedSubMesh::orientation
Quaternion orientation
Definition: OgreInstancedGeometry.h:150
Ogre::InstancedGeometry::InstancedObject::mBoneMatrices
Matrix4 * mBoneMatrices
Cached bone matrices in skeleton local space.
Definition: OgreInstancedGeometry.h:287
Ogre::InstancedGeometry::QueuedSubMesh::scale
Vector3 scale
Definition: OgreInstancedGeometry.h:151
Ogre::InstancedGeometry::getSquaredRenderingDistance
virtual Real getSquaredRenderingDistance(void) const
Gets the squared distance at which batches are no longer rendered.
Definition: OgreInstancedGeometry.h:759
Ogre::InstancedGeometry::splitGeometry
void splitGeometry(VertexData *vd, IndexData *id, SubMeshLodGeometryLink *targetGeomLink)
Split some shared geometry into dedicated geometry.
_OgrePrivate
#define _OgrePrivate
Definition: OgrePlatform.h:258
Ogre::InstancedGeometry::setRenderQueueGroup
virtual void setRenderQueueGroup(uint8 queueID)
Sets the render queue group this object will be rendered through.
Ogre::InstancedGeometry::BatchInstance
The details of a topological BatchInstance which is the highest level of partitioning for this class.
Definition: OgreInstancedGeometry.h:435
Ogre::InstancedGeometry::addSceneNode
virtual void addSceneNode(const SceneNode *node)
Adds all the Entity objects attached to a SceneNode and all it's children to the static geometry.
Ogre::InstancedGeometry::GeometryBucket::GeometryBucket
GeometryBucket(MaterialBucket *parent, const String &formatString, const VertexData *vData, const IndexData *iData)
Ogre::SimpleRenderable
Simple implementation of MovableObject and Renderable for single-part custom objects.
Definition: OgreSimpleRenderable.h:51
Ogre::InstancedGeometry::BatchInstance::getInstancesMap
ObjectsMap & getInstancesMap(void)
Definition: OgreInstancedGeometry.h:525
Ogre::InstancedGeometry::LODBucket::mMaterialBucketMap
MaterialBucketMap mMaterialBucketMap
Lookup of Material Buckets in this BatchInstance.
Definition: OgreInstancedGeometry.h:397
Ogre::Quaternion::IDENTITY
static const Quaternion IDENTITY
Definition: OgreQuaternion.h:301
Ogre::InstancedGeometry::InstancedObject::mSkeletonInstance
SkeletonInstance * mSkeletonInstance
Definition: OgreInstancedGeometry.h:283
Ogre::InstancedGeometry::LODBucket::getLodValue
Real getLodValue(void) const
Get the LOD value.
Definition: OgreInstancedGeometry.h:407
Ogre::InstancedGeometry::~InstancedGeometry
virtual ~InstancedGeometry()
Destructor.
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::InstancedGeometry::QueuedSubMesh::materialName
String materialName
Definition: OgreInstancedGeometry.h:148
Ogre::InstancedGeometry::GeometryBucket::build
void build()
Build.
Ogre::InstancedGeometry::BatchInstance::mQueuedSubMeshes
QueuedSubMeshList mQueuedSubMeshes
Local list of queued meshes (not used for deallocation)
Definition: OgreInstancedGeometry.h:453
Ogre::InstancedGeometry::setCastShadows
virtual void setCastShadows(bool castShadows)
Sets whether this geometry should cast shadows.
Ogre::InstancedGeometry::MaterialBucket::setLastIndex
void setLastIndex(int index)
Definition: OgreInstancedGeometry.h:373
Ogre::InstancedGeometry::getRenderQueueGroup
virtual uint8 getRenderQueueGroup(void) const
Gets the queue group for this entity, see setRenderQueueGroup for full details.
Ogre::InstancedGeometry::GeometryBucket::getIndexData
const IndexData * getIndexData(void) const
Get the index data for this geometry.
Definition: OgreInstancedGeometry.h:237
Ogre::InstancedGeometry::BatchInstance::updateContainers
void updateContainers(LODBucket *bucket)
fill in the list
Ogre::InstancedGeometry::setVisible
virtual void setVisible(bool visible)
Hides or shows all the batches.
Ogre::InstancedGeometry::BatchInstance::getParent
InstancedGeometry * getParent(void) const
Definition: OgreInstancedGeometry.h:484
Ogre::InstancedGeometry::getBaseSkeletonInstance
SkeletonInstance * getBaseSkeletonInstance(void)
Definition: OgreInstancedGeometry.h:853
Ogre::InstancedGeometry::InstancedObject::TS_PARENT
@ TS_PARENT
Transform is relative to the space of the parent node.
Definition: OgreInstancedGeometry.h:270
Ogre::InstancedGeometry::getCastShadows
virtual bool getCastShadows(void)
Will the geometry from this object cast shadows?
Definition: OgreInstancedGeometry.h:787
Ogre::InstancedGeometry::MaterialBucket::updateContainers
void updateContainers(GeometryBucket *bucket, const String &format)
fill in the map and the list
Ogre::InstancedGeometry::SubMeshLodGeometryLinkList
vector< SubMeshLodGeometryLink >::type SubMeshLodGeometryLinkList
Definition: OgreInstancedGeometry.h:140
Ogre::InstancedGeometry::InstancedObject
Definition: OgreInstancedGeometry.h:262
Ogre::InstancedGeometry::GeometryBucket::getParent
MaterialBucket * getParent(void)
Definition: OgreInstancedGeometry.h:232
Ogre::vector
Definition: OgrePrerequisites.h:492
Ogre::InstancedGeometry::OptimisedSubMeshGeometry::vertexData
VertexData * vertexData
Definition: OgreInstancedGeometry.h:129
OgreBone.h
Ogre::InstancedGeometry::InstancedObject::getScale
const Vector3 & getScale() const
Ogre::InstancedGeometry::addEntity
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.
OgreSkeleton.h
Ogre::InstancedGeometry::InstancedObject::getPosition
const Vector3 & getPosition(void) const
Ogre::InstancedGeometry::OptimisedSubMeshGeometry
Struct holding geometry optimised per SubMesh / LOD level, ready for copying to instances.
Definition: OgreInstancedGeometry.h:121
Ogre::InstancedGeometry::SubMeshGeometryLookup
map< SubMesh *, SubMeshLodGeometryLinkList * >::type SubMeshGeometryLookup
Definition: OgreInstancedGeometry.h:141
Ogre::InstancedGeometry::mRenderQueueIDSet
bool mRenderQueueIDSet
Flags whether the RenderQueue's default should be used.
Definition: OgreInstancedGeometry.h:556
Ogre::InstancedGeometry::BatchInstance::ObjectsMap
map< unsigned short, InstancedObject * >::type ObjectsMap
Definition: OgreInstancedGeometry.h:442
Ogre::InstancedGeometry::RenderOperationVector
vector< RenderOperation * >::type RenderOperationVector
Simple vectors where are stored all the render operations of the Batch.
Definition: OgreInstancedGeometry.h:538
Ogre::InstancedGeometry::getInstancedGeometryInstance
virtual BatchInstance * getInstancedGeometryInstance(void)
get the first BatchInstance or create on if it does not exists.
Ogre::InstancedGeometry::BatchInstance::isInstancedObjectPresent
InstancedObject * isInstancedObjectPresent(unsigned short index)
Ogre::InstancedGeometry::LODBucket::getParent
BatchInstance * getParent(void)
Definition: OgreInstancedGeometry.h:403
Ogre::InstancedGeometry::getOrigin
virtual const Vector3 & getOrigin(void) const
Gets the origin of this geometry.
Definition: OgreInstancedGeometry.h:818
Ogre::InstancedGeometry::MaterialBucket::mLastIndex
int mLastIndex
Definition: OgreInstancedGeometry.h:335
Ogre::InstancedGeometry::InstancedObject::setPositionAndOrientation
void setPositionAndOrientation(Vector3 p, const Quaternion &q)
Ogre::InstancedGeometry::BatchInstance::isVisible
bool isVisible(void) const
Returns whether or not this object is supposed to be visible or not.
Ogre::InstancedGeometry::getBatchInstance
virtual BatchInstance * getBatchInstance(const Vector3 &point, bool autoCreate)
Get the BatchInstance within which a point lies.
Ogre::InstancedGeometry::LODBucket::LODBucket
LODBucket(BatchInstance *parent, unsigned short lod, Real lodValue)
Ogre::InstancedGeometry::InstancedObject::getAnimationState
AnimationState * getAnimationState(const String &name) const
Ogre::InstancedGeometry::MaterialBucket::getGeometryIterator
GeometryIterator getGeometryIterator(void)
Get an iterator over the contained geometry.
Ogre::IndexData
Summary class collecting together index data source information.
Definition: OgreVertexIndexData.h:243
Ogre::InstancedGeometry::InstancedObject::InstancedObject
InstancedObject(unsigned short index, SkeletonInstance *skeleton, AnimationStateSet *animations)
Ogre::InstancedGeometry::mBatchInstanceMap
BatchInstanceMap mBatchInstanceMap
Map of BatchInstances.
Definition: OgreInstancedGeometry.h:581
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:52
Ogre::InstancedGeometry::mUpperDistance
Real mUpperDistance
Definition: OgreInstancedGeometry.h:544
Ogre::InstancedGeometry::BatchInstance::mLodValue
Real mLodValue
Current LOD value, passed on to do material LOD later.
Definition: OgreInstancedGeometry.h:468
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:93
Ogre::InstancedGeometry::QueuedGeometry::orientation
Quaternion orientation
Definition: OgreInstancedGeometry.h:163
Ogre::InstancedGeometry::BatchInstance::mSceneMgr
SceneManager * mSceneMgr
Scene manager link.
Definition: OgreInstancedGeometry.h:449
Ogre::InstancedGeometry::OptimisedSubMeshGeometry::~OptimisedSubMeshGeometry
~OptimisedSubMeshGeometry()
Definition: OgreInstancedGeometry.h:124
Ogre::InstancedGeometry::mSubMeshGeometryLookup
SubMeshGeometryLookup mSubMeshGeometryLookup
Cached links from SubMeshes to (potentially optimised) geometry This is not used for deletion since t...
Definition: OgreInstancedGeometry.h:578
Ogre::InstancedGeometry::GeometryBucket::GeometryBucket
GeometryBucket(const String &name, MaterialBucket *parent, const String &formatString, GeometryBucket *bucket)
Ogre::InstancedGeometry::BatchInstance::setBoundingBox
void setBoundingBox(AxisAlignedBox &box)
Ogre::InstancedGeometry::GeometryBucket::getMaterial
const MaterialPtr & getMaterial(void) const
Retrieves a weak reference to the material this renderable object uses.
Ogre::InstancedGeometry::InstancedObject::needUpdate
void needUpdate()
Ogre::InstancedGeometry::LODBucket::~LODBucket
virtual ~LODBucket()
Ogre::InstancedGeometry::BatchInstance::getBoundingBox
const AxisAlignedBox & getBoundingBox(void) const
Retrieves the local axis-aligned bounding box for this object.

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