Go to the documentation of this file.
28 #ifndef __InstanceBatch_H__
29 #define __InstanceBatch_H__
143 virtual void setupVertices(
const SubMesh* baseSubMesh ) = 0;
144 virtual void setupIndices(
const SubMesh* baseSubMesh ) = 0;
145 virtual void createAllInstancedEntities(
void);
146 virtual void deleteAllInstancedEntities(
void);
147 virtual void deleteUnusedInstancedEntities(
void);
155 void makeMatrixCameraRelative3x4(
float *mat3x4,
size_t numFloats );
158 virtual bool checkSubMeshCompatibility(
const SubMesh* baseSubMesh );
160 void updateVisibility(
void);
175 const String &batchName );
182 void _setInstancesPerBatch(
size_t instancesPerBatch );
195 void _updateBounds(
void);
207 virtual size_t calculateMaxNumInstances(
const SubMesh *baseSubMesh,
uint16 flags )
const = 0;
247 bool isBatchUnused(
void)
const {
return mUnusedEntities.size() == mInstancedEntities.size(); }
252 void getInstancedEntitiesInUse( InstancedEntityVec &outEntities, CustomParamsVec &outParams );
267 void _defragmentBatch(
bool optimizeCulling, InstancedEntityVec &usedEntities,
268 CustomParamsVec &usedParams );
275 void _defragmentBatchDiscard(
void);
280 virtual void _boundsDirty(
void);
338 Real getSquaredViewDepth(
const Camera* cam )
const;
340 const LightList& getLights(
void )
const;
345 const String& getMovableType(
void)
const;
347 void _notifyCurrentCamera(
Camera* cam );
351 Real getBoundingRadius(
void)
const;
353 virtual void _updateRenderQueue(
RenderQueue* queue);
364 #endif // __InstanceBatch_H__
vector< unsigned short >::type IndexMap
RenderOperation mRenderOperation
virtual bool useBoneWorldMatrices() const
Tells whether world bone matrices need to be calculated.
bool isBatchUnused(void) const
Returns true if it no instanced entity has been requested or all of them have been removed.
A viewpoint from which the scene will be rendered.
const Mesh::IndexMap * mIndexToBoneMap
vector< Vector4 >::type CustomParamsVec
This is the main starting point for the new instancing system.
Abstract class defining a movable object in a scene.
bool _supportsSkeletalAnimation() const
Returns true if this technique supports skeletal animation.
Class representing an approach to rendering this particular Material.
bool mRemoveOwnVertexData
When true remove the memory of the VertexData we've created because no one else will.
virtual const OGRE_DEPRECATED Any & getUserAny(void) const
InstanceManager * mCreator
Defines a part of a complete mesh.
InstancedEntityVec mUnusedEntities
InstancedEntityVec mInstancedEntities
const Ogre::MeshPtr & _getMeshReference(void) const
A 3D box aligned with the x/y/z axes.
bool isBatchFull(void) const
unsigned short mMaterialLodIndex
virtual void setStaticAndUpdate(bool bStatic)
Tells this batch to stop updating animations, positions, rotations, and display all it's active insta...
bool mTechnSupportsSkeletal
False if a technique doesn't support skeletal animation.
void getRenderOperation(RenderOperation &op)
vector< InstancedEntity * >::type InstancedEntityVec
const MaterialPtr & getMaterial(void) const
size_t mInstancesPerBatch
4-dimensional homogeneous vector.
bool mRemoveOwnIndexData
When true remove the memory of the IndexData we've created because no one else will.
virtual OGRE_DEPRECATED void setUserAny(const Any &anything)
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
const Camera * mCachedCamera
The camera for which the cached distance is valid.
Abstract class defining the interface all renderable objects must implement.
float Real
Software floating point type.
InstanceBatch forms part of the new Instancing system This is an abstract class that must be derived ...
const Mesh::IndexMap * _getIndexToBoneMap() const
CustomParamsVec mCustomParams
Real mCachedCameraDist
Cached distance to last camera for getSquaredViewDepth.
virtual bool isStatic() const
Returns true if this batch was set as static.
bool mTransformSharingDirty
Tells that the list of entity instances with shared transforms has changed.
AxisAlignedBox mFullBoundingBox
This bbox contains all (visible) instanced entities.
void _markTransformSharingDirty()
Tells that the list of entity instances with shared transforms has changed.
'New' rendering operation using vertex buffers.
Class to manage the scene object rendering queue.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.