OGRE: Scene

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Scene
Core

## Classes
class | Ogre::AxisAlignedBoxSceneQuery
| Specialises the SceneQuery class for querying within an axis aligned box. More...
class | Ogre::BaseInstanceBatchVTF
| Instancing implementation using vertex texture through Vertex Texture Fetch (VTF) This implementation has the following advantages: More...
class | Ogre::Camera
| A viewpoint from which the scene will be rendered. More...
class | Ogre::DebugDrawer
| Interface for visualising debugging the SceneManager state. More...
class | Ogre::DefaultAxisAlignedBoxSceneQuery
| Default implementation of AxisAlignedBoxSceneQuery. More...
class | Ogre::DefaultIntersectionSceneQuery
| Default implementation of IntersectionSceneQuery. More...
class | Ogre::DefaultPlaneBoundedVolumeListSceneQuery
| Default implementation of PlaneBoundedVolumeListSceneQuery. More...
class | Ogre::DefaultRaySceneQuery
| Default implementation of RaySceneQuery. More...
class | Ogre::DefaultShadowCameraSetup
| Implements default shadow camera setup. More...
class | Ogre::DefaultSphereSceneQuery
| Default implementation of SphereSceneQuery. More...
class | Ogre::Entity
| Defines an instance of a discrete, movable object based on a Mesh. More...
class | Ogre::FocusedShadowCameraSetup
| Implements the uniform shadow mapping algorithm in focused mode. More...
class | Ogre::Frustum
| A frustum represents a pyramid, capped at the near and far end which is used to represent either a visible area or a projection area. More...
class | Ogre::InstanceBatch
| InstanceBatch forms part of the new Instancing system This is an abstract class that must be derived to implement different instancing techniques (InstanceManager::InstancingTechnique) OGRE wasn't truly thought for instancing. More...
class | Ogre::InstanceBatchHW
| This is technique requires true instancing hardware support. More...
class | Ogre::InstanceBatchHW_VTF
| Instancing implementation using vertex texture through Vertex Texture Fetch (VTF) and hardware instancing. More...
class | Ogre::InstanceBatchShader
| Basically it creates a large vertex buffer with many repeating entities, and sends per instance data through shader constants. More...
class | Ogre::InstanceBatchVTF
class | Ogre::InstancedEntity
class | Ogre::InstanceManager
| This is the main starting point for the manual instancing system. More...
class | Ogre::IntersectionSceneQuery
| Separate SceneQuery class to query for pairs of objects which are possibly intersecting one another. More...
class | Ogre::IntersectionSceneQueryListener
| Alternative listener class for dealing with IntersectionSceneQuery. More...
struct | Ogre::IntersectionSceneQueryResult
| Holds the results of an intersection scene query (pair values). More...
class | Ogre::Light
| Representation of a dynamic light source in the scene. More...
class | Ogre::LiSPSMShadowCameraSetup
| Implements the Light Space Perspective Shadow Mapping Algorithm [WSP04]. More...
class | Ogre::ManualObject
| Class providing a much simplified interface to generating manual objects with custom geometry. More...
class | Ogre::MovableObject
| Abstract class defining a movable object in a scene. More...
class | Ogre::MovableObjectFactory
| Interface definition for a factory class which produces a certain kind of MovableObject, and can be registered with Root in order to allow all clients to produce new instances of this object, integrated with the standard Ogre processing. More...
class | Ogre::MovablePlane
| Definition of a Plane that may be attached to a node, and the derived details of it retrieved simply. More...
class | Ogre::Node
| Class representing a general-purpose node an articulated scene graph. More...
class | Ogre::PlaneBoundedVolumeListSceneQuery
| Specialises the SceneQuery class for querying within a plane-bounded volume. More...
class | Ogre::PlaneOptimalShadowCameraSetup
| Implements the plane optimal shadow camera algorithm. More...
class | Ogre::PSSMShadowCameraSetup
| Parallel Split Shadow Map (PSSM) shadow camera setup. More...
class | Ogre::RaySceneQuery
| Specialises the SceneQuery class for querying along a ray. More...
class | Ogre::RaySceneQueryListener
| Alternative listener class for dealing with RaySceneQuery. More...
struct | Ogre::RaySceneQueryResultEntry
| This struct allows a single comparison of result data no matter what the type. More...
class | Ogre::Rectangle2D
| Allows the rendering of a simple 2D rectangle This class renders a simple 2D rectangle; this rectangle has no depth and therefore is best used with specific render queue and depth settings, like RENDER_QUEUE_BACKGROUND and 'depth_write off' for backdrops, and RENDER_QUEUE_OVERLAY and 'depth_check off' for fullscreen quads. More...
class | Ogre::RegionSceneQuery
| Abstract class defining a query which returns single results from a region. More...
class | Ogre::Renderable
| Abstract class defining the interface all renderable objects must implement. More...
class | Ogre::SceneManager
| Manages the organisation and rendering of a 'scene': a collection of objects and potentially world geometry. More...
class | Ogre::SceneManagerFactory
| Class which will create instances of a given SceneManager. More...
class | Ogre::SceneNode
| Class representing a node in the scene graph. More...
class | Ogre::SceneQuery
| A class for performing queries on a scene. More...
class | Ogre::SceneQueryListener
| This optional class allows you to receive per-result callbacks from SceneQuery executions instead of a single set of consolidated results. More...
struct | Ogre::SceneQueryResult
| Holds the results of a scene query. More...
class | Ogre::ShadowCameraSetup
| This class allows you to plug in new ways to define the camera setup when rendering and projecting shadow textures. More...
class | Ogre::ShadowCaster
| This class defines the interface that must be implemented by shadow casters. More...
class | Ogre::ShadowRenderable
| Class which represents the renderable aspects of a set of shadow volume faces. More...
struct | Ogre::ShadowTextureConfig
| Structure containing the configuration for one shadow texture. More...
struct | Ogre::ShadowTextureListener
class | Ogre::SimpleRenderable
| Simple implementation of MovableObject and Renderable for single-part custom objects. More...
class | Ogre::SkeletonInstance
| A SkeletonInstance is a single instance of a Skeleton used by a world object. More...
class | Ogre::SphereSceneQuery
| Specialises the SceneQuery class for querying within a sphere. More...
struct | Ogre::StaticFaceGroup
| Collects a group of static i.e. More...
class | Ogre::StaticGeometry
| Pre-transforms and batches up meshes on the CPU for efficient use as static geometry in a scene. More...
class | Ogre::SubEntity
| Utility class which defines the sub-parts of an Entity. More...
class | Ogre::UserObjectBindings
| Class that provides convenient interface to establish a linkage between custom user application objects and Ogre core classes. More...
struct | Ogre::ViewPoint
| Structure for holding a position & orientation pair. More...
struct | Ogre::VisibleObjectsBoundsInfo
| Structure collecting together information about the visible objects that have been discovered in a scene. More...
class | Ogre::WireBoundingBox
| Allows the rendering of a wireframe bounding box. More...

## Typedefs
typedef ConstVectorIterator< ShadowTextureConfigList > | Ogre::ConstShadowTextureConfigIterator
typedef std::vector< Vector4f > | Ogre::InstanceBatch::CustomParamsVec
typedef ConstVectorIterator< InstanceBatchVec > | Ogre::InstanceManager::InstanceBatchIterator
typedef ConstMapIterator< InstanceBatchMap > | Ogre::InstanceManager::InstanceBatchMapIterator
typedef std::vector< InstancedEntity * > | Ogre::InstanceBatch::InstancedEntityVec
typedef std::vector< RaySceneQueryResultEntry > | Ogre::RaySceneQueryResult
typedef std::list< SceneQueryMovableObjectPair > | Ogre::SceneQueryMovableIntersectionList
typedef std::pair< MovableObject *, MovableObject * > | Ogre::SceneQueryMovableObjectPair
typedef std::pair< MovableObject *, SceneQuery::WorldFragment * > | Ogre::SceneQueryMovableObjectWorldFragmentPair
typedef std::list< SceneQueryMovableObjectWorldFragmentPair > | Ogre::SceneQueryMovableWorldFragmentIntersectionList
typedef std::list< MovableObject * > | Ogre::SceneQueryResultMovableList
typedef std::list< SceneQuery::WorldFragment * > | Ogre::SceneQueryResultWorldFragmentList
typedef std::vector< ShadowRenderable * > | Ogre::ShadowRenderableList
typedef std::vector< ShadowTextureConfig > | Ogre::ShadowTextureConfigList
typedef std::vector< TexturePtr > | Ogre::ShadowTextureList

## Enumerations
enum | Ogre::InstanceManager::BatchSettingId { Ogre::InstanceManager::CAST_SHADOWS = 0 , Ogre::InstanceManager::SHOW_BOUNDINGBOX , Ogre::InstanceManager::NUM_SETTINGS }
| Values to be used in setSetting() & BatchSettings::setting. More...
enum | Ogre::FaceGroupType { Ogre::FGT_FACE_LIST , Ogre::FGT_PATCH , Ogre::FGT_UNKNOWN }
| A type of face group, i.e. More...
enum | Ogre::FrustumPlane : uint8 { Ogre::FRUSTUM_PLANE_NEAR = 0 , Ogre::FRUSTUM_PLANE_FAR = 1 , Ogre::FRUSTUM_PLANE_LEFT = 2 , Ogre::FRUSTUM_PLANE_RIGHT = 3 , Ogre::FRUSTUM_PLANE_TOP = 4 , Ogre::FRUSTUM_PLANE_BOTTOM = 5 }
| Worldspace clipping planes. More...
enum | Ogre::InstanceManager::InstancingTechnique { Ogre::InstanceManager::ShaderBased , Ogre::InstanceManager::TextureVTF , Ogre::InstanceManager::HWInstancingBasic , Ogre::InstanceManager::HWInstancingVTF , Ogre::InstanceManager::InstancingTechniquesCount }
enum | Ogre::ProjectionType : uint8 { Ogre::PT_ORTHOGRAPHIC , Ogre::PT_PERSPECTIVE }
| Specifies perspective (realistic) or orthographic (architectural) projection. More...
enum | Ogre::ShadowRenderableFlags { Ogre::SRF_INCLUDE_LIGHT_CAP = 0x00000001 , Ogre::SRF_INCLUDE_DARK_CAP = 0x00000002 , Ogre::SRF_EXTRUDE_TO_INFINITY = 0x00000004 , Ogre::SRF_EXTRUDE_IN_SOFTWARE = 0x00000008 }
| A set of flags that can be used to influence ShadowRenderable creation. More...

## Functions
| Ogre::BaseInstanceBatchVTF::BaseInstanceBatchVTF (InstanceManager *creator, MeshPtr &meshReference, const MaterialPtr &material, size_t instancesPerBatch, const Mesh::IndexMap *indexToBoneMap, const String &batchName)
| Ogre::InstanceManager::BatchSettings::BatchSettings ()
| Ogre::InstanceBatch::InstanceBatch (InstanceManager *creator, MeshPtr &meshReference, const MaterialPtr &material, size_t instancesPerBatch, const Mesh::IndexMap *indexToBoneMap, const String &batchName)
| Ogre::InstanceBatchHW::InstanceBatchHW (InstanceManager *creator, MeshPtr &meshReference, const MaterialPtr &material, size_t instancesPerBatch, const Mesh::IndexMap *indexToBoneMap, const String &batchName)
| Ogre::InstanceBatchHW_VTF::InstanceBatchHW_VTF (InstanceManager *creator, MeshPtr &meshReference, const MaterialPtr &material, size_t instancesPerBatch, const Mesh::IndexMap *indexToBoneMap, const String &batchName)
| Ogre::InstanceBatchShader::InstanceBatchShader (InstanceManager *creator, MeshPtr &meshReference, const MaterialPtr &material, size_t instancesPerBatch, const Mesh::IndexMap *indexToBoneMap, const String &batchName)
| Ogre::InstanceBatchVTF::InstanceBatchVTF (InstanceManager *creator, MeshPtr &meshReference, const MaterialPtr &material, size_t instancesPerBatch, const Mesh::IndexMap *indexToBoneMap, const String &batchName)
| Ogre::InstancedEntity::InstancedEntity (InstanceBatch *batchOwner, uint32 instanceID, InstancedEntity *sharedTransformEntity=NULL)
| Ogre::InstanceManager::InstanceManager (const String &customName, SceneManager *sceneManager, const String &meshName, const String &groupName, InstancingTechnique instancingTechnique, uint16 instancingFlags, size_t instancesPerBatch, unsigned short subMeshIdx, bool useBoneMatrixLookup=false)
virtual | Ogre::BaseInstanceBatchVTF::~BaseInstanceBatchVTF ()
virtual | Ogre::InstanceBatch::~InstanceBatch ()
virtual | Ogre::InstanceBatchHW::~InstanceBatchHW ()
virtual | Ogre::InstanceBatchHW_VTF::~InstanceBatchHW_VTF ()
virtual | Ogre::InstanceBatchVTF::~InstanceBatchVTF ()
virtual | Ogre::InstancedEntity::~InstancedEntity ()
| Ogre::InstanceManager::~InstanceManager ()
void | Ogre::InstanceManager::_addDirtyBatch (InstanceBatch *dirtyBatch)
| Called by an InstanceBatch when it requests their bounds to be updated for proper culling.
virtual void | Ogre::InstanceBatch::_boundsDirty (void)
| Called by InstancedEntity(s) to tell us we need to update the bounds (we touch the SceneNode so the SceneManager aknowledges such change).
void | Ogre::InstanceBatchHW::_boundsDirty (void) override
| Overloaded so that we don't perform needless updates when in static mode.
void | Ogre::InstanceBatchHW_VTF::_boundsDirty (void) override
| Overloaded so that we don't perform needless updates when in static mode.
void | Ogre::InstanceBatch::_defragmentBatch (bool optimizeCulling, InstancedEntityVec &usedEntities, CustomParamsVec &usedParams)
void | Ogre::InstanceBatch::_defragmentBatchDiscard (void)
const Vector4f & | Ogre::InstanceBatch::_getCustomParam (InstancedEntity *instancedEntity, unsigned char idx)
const Vector3 & | Ogre::InstancedEntity::_getDerivedPosition () const
| Returns the derived position of the instanced entity including local transform.
const Mesh::IndexMap * | Ogre::InstanceBatch::_getIndexToBoneMap () const
MeshPtr & | Ogre::InstanceBatch::_getMeshRef ()
const Ogre::MeshPtr & | Ogre::InstanceBatch::_getMeshReference (void) const
InstanceBatch * | Ogre::InstancedEntity::_getOwner () const
const Affine3 & | Ogre::InstancedEntity::_getParentNodeFullTransform (void) const override
| Returns the world transform of the instanced entity including local transform.
void | Ogre::InstanceBatch::_markTransformSharingDirty ()
| Tells that the list of entity instances with shared transforms has changed.
void | Ogre::InstancedEntity::_notifyAttached (Node *parent, bool isTagPoint=false) override
| Internal method called to notify the object that it has been attached to a node.
void | Ogre::InstanceBatch::_notifyCurrentCamera (Camera *cam) override
| Internal method to notify the object of the camera to be used for the next rendering operation.
void | Ogre::InstancedEntity::_notifyMoved (void) override
| Overridden so we can tell the InstanceBatch it needs to update it's bounds.
void | Ogre::InstanceBatch::_setCustomParam (InstancedEntity *instancedEntity, unsigned char idx, const Vector4f &newParam)
void | Ogre::InstanceBatch::_setInstancesPerBatch (size_t instancesPerBatch)
| Raises an exception if trying to change it after being built.
bool | Ogre::InstanceBatch::_supportsSkeletalAnimation () const
| Returns true if this technique supports skeletal animation.
virtual bool | Ogre::InstancedEntity::_updateAnimation (void)
| Called by InstanceBatch in his _updateRenderQueue to tell us we need to calculate our bone matrices.
void | Ogre::InstanceBatch::_updateBounds (void)
void | Ogre::InstanceManager::_updateDirtyBatches (void)
| Called by SceneManager when we told it we have at least one dirty batch.
void | Ogre::BaseInstanceBatchVTF::_updateRenderQueue (RenderQueue *queue) override
| Overloaded to be able to updated the vertex texture.
void | Ogre::InstanceBatch::_updateRenderQueue (RenderQueue *queue) override
| Internal method by which the movable object must add Renderable subclass instances to the rendering queue.
void | Ogre::InstanceBatchHW::_updateRenderQueue (RenderQueue *queue) override
| Overloaded to avoid updating skeletons (which we don't support), check visibility on a per unit basis and finally updated the vertex buffer.
void | Ogre::InstanceBatchHW_VTF::_updateRenderQueue (RenderQueue *queue) override
| Overloaded to visibility on a per unit basis and finally updated the vertex texture.
void | Ogre::InstancedEntity::_updateRenderQueue (RenderQueue *queue) override
| Do nothing, InstanceBatch takes care of this.
virtual RenderOperation | Ogre::InstanceBatch::build (const SubMesh *baseSubMesh)
| Constructs all the data needed to use this batch, as well as the InstanceEntities.
void | Ogre::BaseInstanceBatchVTF::buildFrom (const SubMesh *baseSubMesh, const RenderOperation &renderOperation) override
virtual void | Ogre::InstanceBatch::buildFrom (const SubMesh *baseSubMesh, const RenderOperation &renderOperation)
| Instancing consumes significantly more GPU memory than regular rendering methods.
void | Ogre::InstanceBatchHW::buildFrom (const SubMesh *baseSubMesh, const RenderOperation &renderOperation) override
void | Ogre::InstanceBatchShader::buildFrom (const SubMesh *baseSubMesh, const RenderOperation &renderOperation) override
virtual size_t | Ogre::InstanceBatch::calculateMaxNumInstances (const SubMesh *baseSubMesh, uint16 flags) const =0
| Some techniques have a limit on how many instances can be done.
size_t | Ogre::InstanceBatchHW::calculateMaxNumInstances (const SubMesh *baseSubMesh, uint16 flags) const override
size_t | Ogre::InstanceBatchHW_VTF::calculateMaxNumInstances (const SubMesh *baseSubMesh, uint16 flags) const override
size_t | Ogre::InstanceBatchShader::calculateMaxNumInstances (const SubMesh *baseSubMesh, uint16 flags) const override
size_t | Ogre::InstanceBatchVTF::calculateMaxNumInstances (const SubMesh *baseSubMesh, uint16 flags) const override
void | Ogre::InstanceManager::cleanupEmptyBatches (void)
| This function can be useful to improve CPU speed after having too many instances created, which where now removed, thus freeing many batches with zero used Instanced Entities However the batches aren't automatically removed from memory until the InstanceManager is destroyed, or this function is called.
InstancedEntity * | Ogre::InstanceBatch::createInstancedEntity ()
| Returns a pointer to a new InstancedEntity ready to use Note it's actually preallocated, so no memory allocation happens at this point.
InstancedEntity * | Ogre::InstanceManager::createInstancedEntity (const String &materialName)
| Creates an InstancedEntity.
void | Ogre::InstanceManager::defragmentBatches (bool optimizeCulling)
| After creating many entities (which turns in many batches) and then removing entities that are in the middle of these batches, there might be many batches with many free entities.
bool | Ogre::BaseInstanceBatchVTF::forceOneWeight () const
AnimationStateSet * | Ogre::InstancedEntity::getAllAnimationStates (void) const
AnimationState * | Ogre::InstancedEntity::getAnimationState (const String &name) const
const AxisAlignedBox & | Ogre::InstanceBatch::getBoundingBox (void) const override
| Retrieves the local axis-aligned bounding box for this object.
const AxisAlignedBox & | Ogre::InstancedEntity::getBoundingBox (void) const override
| Retrieves the local axis-aligned bounding box for this object.
Real | Ogre::InstanceBatch::getBoundingRadius (void) const override
| Retrieves the radius of the origin-centered bounding sphere for this object.
Real | Ogre::InstancedEntity::getBoundingRadius (void) const override
| Retrieves the radius of the origin-centered bounding sphere for this object.
const Vector4f & | Ogre::InstancedEntity::getCustomParam (unsigned char idx)
InstanceBatchIterator | Ogre::InstanceManager::getInstanceBatchIterator (const String &materialName) const
| Get non-updateable iterator over instance batches for given material.
InstanceBatchMapIterator | Ogre::InstanceManager::getInstanceBatchMapIterator (void) const
| Get non-updateable iterator over instance batches per material.
void | Ogre::InstanceBatch::getInstancedEntitiesInUse (InstancedEntityVec &outEntities, CustomParamsVec &outParams)
| Fills the input vector with the instances that are currently being used or were requested.
InstancingTechnique | Ogre::InstanceManager::getInstancingTechnique () const
const LightList & | Ogre::InstanceBatch::getLights (void) const override
| Gets a list of lights, ordered relative to how close they are to this renderable.
const MaterialPtr & | Ogre::InstanceBatch::getMaterial (void) const override
| Retrieves a weak reference to the material this renderable object uses.
virtual size_t | Ogre::BaseInstanceBatchVTF::getMaxLookupTableInstances () const
size_t | Ogre::InstanceManager::getMaxOrBestNumInstancesPerBatch (const String &materialName, size_t suggestedSize, uint16 flags)
| Calculates the maximum (or the best amount, depending on flags) of instances per batch given the suggested size for the technique this manager was created for.
Real | Ogre::InstancedEntity::getMaxScaleCoef () const
| Returns the maximum derived scale coefficient among the xyz values.
const String & | Ogre::InstanceBatch::getMovableType (void) const override
| Returns the type name of this object.
const String & | Ogre::InstancedEntity::getMovableType (void) const override
| Returns the type name of this object.
const String & | Ogre::InstanceManager::getName () const
unsigned char | Ogre::InstanceManager::getNumCustomParams () const
unsigned short | Ogre::InstanceBatchShader::getNumWorldTransforms (void) const override
| Returns the number of world transform matrices this renderable requires.
const Quaternion & | Ogre::InstancedEntity::getOrientation () const
| Retrieve the orientation.
const Vector3 & | Ogre::InstancedEntity::getPosition () const
| Retrieve the position.
void | Ogre::InstanceBatch::getRenderOperation (RenderOperation &op) override
| Gets the render operation required to send this object to the frame buffer.
const Vector3 & | Ogre::InstancedEntity::getScale () const
| Retrieve the local scale.
SceneManager * | Ogre::InstanceManager::getSceneManager () const
bool | Ogre::InstanceManager::getSetting (BatchSettingId id, const String &materialName) const
| If settings for the given material didn't exist, default value is returned.
SkeletonInstance * | Ogre::InstancedEntity::getSkeleton (void) const
Real | Ogre::InstanceBatch::getSquaredViewDepth (const Camera *cam) const override
| Returns the squared distance between the camera and this renderable.
Real | Ogre::InstancedEntity::getSquaredViewDepth (const Camera *cam) const
| This is used by our batch owner to get the closest entity's depth, returns infinity when not attached to a scene node.
void | Ogre::BaseInstanceBatchVTF::getWorldTransforms (Matrix4 *xform) const override
| Gets the world transform matrix / matrices for this renderable object.
void | Ogre::InstanceBatchHW::getWorldTransforms (Matrix4 *xform) const override
| Gets the world transform matrix / matrices for this renderable object.
void | Ogre::InstanceBatchShader::getWorldTransforms (Matrix4 *xform) const override
| Gets the world transform matrix / matrices for this renderable object.
bool | Ogre::InstanceManager::hasSettings (const String &materialName) const
| Returns true if settings were already created for the given material name.
bool | Ogre::InstancedEntity::hasSkeleton (void) const
bool | Ogre::InstanceBatch::isBatchFull (void) const
bool | Ogre::InstanceBatch::isBatchUnused (void) const
| Returns true if it no instanced entity has been requested or all of them have been removed.
bool | Ogre::InstancedEntity::isInScene (void) const override
| Returns true if this object is attached to a SceneNode or TagPoint, and this SceneNode / TagPoint is currently in an active part of the scene graph.
bool | Ogre::InstancedEntity::isInUse () const
| Tells if the entity is in use.
virtual bool | Ogre::InstanceBatch::isStatic () const
| Returns true if this batch was set as static.
bool | Ogre::InstanceBatchHW::isStatic () const override
| Returns true if this batch was set as static.
bool | Ogre::InstanceBatchHW_VTF::isStatic () const override
| Returns true if this batch was set as static.
_OgreExport bool | Ogre::operator!= (const ShadowTextureConfig &lhs, const ShadowTextureConfig &rhs)
_OgreExport bool | Ogre::operator== (const ShadowTextureConfig &lhs, const ShadowTextureConfig &rhs)
void | Ogre::InstanceBatch::removeInstancedEntity (InstancedEntity *instancedEntity)
| Removes an InstancedEntity from the scene retrieved with getNewInstancedEntity, putting back into a queue.
void | Ogre::InstanceManager::setBatchesAsStaticAndUpdate (bool bStatic)
| Tells this batch to stop updating animations, positions, rotations, and display all it's active instances.
void | Ogre::BaseInstanceBatchVTF::setBoneDualQuaternions (bool enable)
void | Ogre::BaseInstanceBatchVTF::setBoneMatrixLookup (bool enable, size_t maxLookupTableInstances)
| Sets the state of the usage of bone matrix lookup.
void | Ogre::InstancedEntity::setCustomParam (unsigned char idx, const Vector4f &newParam)
| Sets the custom parameter for this instance.
void | Ogre::BaseInstanceBatchVTF::setForceOneWeight (bool enable)
void | Ogre::InstanceManager::setInstancesPerBatch (size_t instancesPerBatch)
| Raises an exception if trying to change it after creating the first InstancedEntity The actual value may be less if the technique doesn't support having so much.
void | Ogre::InstancedEntity::setInUse (bool used)
| Sets whether the entity is in use.
void | Ogre::InstanceManager::setMaxLookupTableInstances (size_t maxLookupTableInstances)
| Sets the size of the lookup table for techniques supporting bone lookup table.
void | Ogre::InstanceManager::setNumCustomParams (unsigned char numCustomParams)
| Sets the number of custom parameters per instance.
void | Ogre::InstancedEntity::setOrientation (const Quaternion &orientation, bool doUpdate=true)
| Set the orientation or the offset from the parent node if a parent node exists.
void | Ogre::InstancedEntity::setPosition (const Vector3 &position, bool doUpdate=true)
| Set the position or the offset from the parent node if a parent node exists.
void | Ogre::InstancedEntity::setScale (const Vector3 &scale, bool doUpdate=true)
| Set the scale or the offset from the parent node if a parent node exists.
void | Ogre::InstanceManager::setSetting (BatchSettingId id, bool enabled, const String &materialName=BLANKSTRING)
| Applies a setting for all batches using the same material.
virtual void | Ogre::InstanceBatch::setStaticAndUpdate (bool bStatic)
| Tells this batch to stop updating animations, positions, rotations, and display all it's active instances.
void | Ogre::InstanceBatchHW::setStaticAndUpdate (bool bStatic) override
void | Ogre::InstanceBatchHW_VTF::setStaticAndUpdate (bool bStatic) override
void | Ogre::InstancedEntity::setTransformLookupNumber (uint16 num)
| Sets the transformation look up number.
void | Ogre::BaseInstanceBatchVTF::setUseOneWeight (bool enable)
bool | Ogre::InstancedEntity::shareTransformWith (InstancedEntity *slave)
| Shares the entire transformation with another InstancedEntity.
void | Ogre::InstancedEntity::stopSharingTransform ()
void | Ogre::InstancedEntity::updateTransforms ()
| Update the world transform and derived values.
bool | Ogre::BaseInstanceBatchVTF::useBoneDualQuaternions () const
bool | Ogre::BaseInstanceBatchVTF::useBoneMatrixLookup () const
| Tells whether to use bone matrix lookup.
bool | Ogre::BaseInstanceBatchVTF::useBoneWorldMatrices () const override
virtual bool | Ogre::InstanceBatch::useBoneWorldMatrices () const
| Tells whether world bone matrices need to be calculated.
bool | Ogre::BaseInstanceBatchVTF::useOneWeight () const
void | Ogre::InstanceBatch::visitRenderables (Renderable::Visitor *visitor, bool debugRenderables=false) override
| Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject will add to the render queue when asked, if any.
void | Ogre::InstancedEntity::visitRenderables (Renderable::Visitor *visitor, bool debugRenderables=false) override
| Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject will add to the render queue when asked, if any.

## Variables
bool | Ogre::InstanceManager::BatchSettings::setting [NUM_SETTINGS]
_OgreExport const String | Ogre::SMT_DEFAULT
| Default scene manager type name.

## Detailed Description

## Typedef Documentation

## ◆ InstancedEntityVec

typedef std::vector<InstancedEntity*> Ogre::InstanceBatch::InstancedEntityVec

## ◆ CustomParamsVec

typedef std::vector<Vector4f> Ogre::InstanceBatch::CustomParamsVec

## ◆ InstanceBatchMapIterator

typedef ConstMapIterator<InstanceBatchMap> Ogre::InstanceManager::InstanceBatchMapIterator

## ◆ InstanceBatchIterator

typedef ConstVectorIterator<InstanceBatchVec> Ogre::InstanceManager::InstanceBatchIterator

## ◆ ShadowTextureList

typedef std::vector<TexturePtr> Ogre::ShadowTextureList

## ◆ ShadowTextureConfigList

typedef std::vector<ShadowTextureConfig> Ogre::ShadowTextureConfigList

## ◆ ConstShadowTextureConfigIterator

typedef ConstVectorIterator<ShadowTextureConfigList> Ogre::ConstShadowTextureConfigIterator

## ◆ SceneQueryResultMovableList

typedef std::list<MovableObject*> Ogre::SceneQueryResultMovableList

## ◆ SceneQueryResultWorldFragmentList

typedef std::list<SceneQuery::WorldFragment*> Ogre::SceneQueryResultWorldFragmentList

## ◆ RaySceneQueryResult

typedef std::vector<RaySceneQueryResultEntry> Ogre::RaySceneQueryResult

## ◆ SceneQueryMovableObjectPair

typedef std::pair<MovableObject*, MovableObject*> Ogre::SceneQueryMovableObjectPair

## ◆ SceneQueryMovableObjectWorldFragmentPair

typedef std::pair<MovableObject*, SceneQuery::WorldFragment*> Ogre::SceneQueryMovableObjectWorldFragmentPair

## ◆ SceneQueryMovableIntersectionList

typedef std::list<SceneQueryMovableObjectPair> Ogre::SceneQueryMovableIntersectionList

## ◆ SceneQueryMovableWorldFragmentIntersectionList

typedef std::list<SceneQueryMovableObjectWorldFragmentPair> Ogre::SceneQueryMovableWorldFragmentIntersectionList

## ◆ ShadowRenderableList

typedef std::vector<ShadowRenderable*> Ogre::ShadowRenderableList

## Enumeration Type Documentation

## ◆ ProjectionType

enum Ogre::ProjectionType : uint8

Specifies perspective (realistic) or orthographic (architectural) projection.

Enumerator
PT_ORTHOGRAPHIC |
PT_PERSPECTIVE |

## ◆ FrustumPlane

enum Ogre::FrustumPlane : uint8

Worldspace clipping planes.

Enumerator
FRUSTUM_PLANE_NEAR |
FRUSTUM_PLANE_FAR |
FRUSTUM_PLANE_LEFT |
FRUSTUM_PLANE_RIGHT |
FRUSTUM_PLANE_TOP |
FRUSTUM_PLANE_BOTTOM |

## ◆ InstancingTechnique

enum Ogre::InstanceManager::InstancingTechnique

Enumerator
ShaderBased | Any SM 2.0+ InstanceBatchShader
TextureVTF | Needs Vertex Texture Fetch & SM 3.0+ InstanceBatchVTF.
HWInstancingBasic | Needs SM 3.0+ and HW instancing support InstanceBatchHW.
HWInstancingVTF | Needs SM 3.0+, HW instancing support & VTF InstanceBatchHW_VTF.
InstancingTechniquesCount |

## ◆ BatchSettingId

enum Ogre::InstanceManager::BatchSettingId

Values to be used in setSetting() & BatchSettings::setting.

Enumerator
CAST_SHADOWS | Makes all batches from same material cast shadows.
SHOW_BOUNDINGBOX | Makes each batch to display it's bounding box. Useful for debugging or profiling.
NUM_SETTINGS |

## ◆ ShadowRenderableFlags

enum Ogre::ShadowRenderableFlags

A set of flags that can be used to influence ShadowRenderable creation.

Enumerator
SRF_INCLUDE_LIGHT_CAP | For shadow volume techniques only, generate a light cap on the volume.
SRF_INCLUDE_DARK_CAP | For shadow volume techniques only, generate a dark cap on the volume.
SRF_EXTRUDE_TO_INFINITY | For shadow volume techniques only, indicates volume is extruded to infinity.
SRF_EXTRUDE_IN_SOFTWARE | For shadow volume techniques only, indicates hardware extrusion is not supported.

## ◆ FaceGroupType

enum Ogre::FaceGroupType

A type of face group, i.e.

face list of procedural etc

Enumerator
FGT_FACE_LIST |
FGT_PATCH |
FGT_UNKNOWN |

## Function Documentation

## ◆ InstanceBatch()

Ogre::InstanceBatch::InstanceBatch | ( | InstanceManager * | creator,
|  | MeshPtr & | meshReference,
|  | const MaterialPtr & | material,
|  | size_t | instancesPerBatch,
|  | const Mesh::IndexMap * | indexToBoneMap,
|  | const String & | batchName )

## ◆ ~InstanceBatch()

virtual Ogre::InstanceBatch::~InstanceBatch | ( |  | ) |
| virtual

## ◆ _getMeshRef()

MeshPtr & Ogre::InstanceBatch::_getMeshRef | ( |  | ) |
| inline

## ◆ _setInstancesPerBatch()

void Ogre::InstanceBatch::_setInstancesPerBatch | ( | size_t | instancesPerBatch | ) |

Raises an exception if trying to change it after being built.

## ◆ _getIndexToBoneMap()

const Mesh::IndexMap * Ogre::InstanceBatch::_getIndexToBoneMap | ( |  | ) | const
| inline

## ◆ _supportsSkeletalAnimation()

bool Ogre::InstanceBatch::_supportsSkeletalAnimation | ( |  | ) | const
| inline

Returns true if this technique supports skeletal animation.

A virtual function could have been used, but using a simple variable overridden by the derived class is faster than virtual call overhead. And both are clean ways of implementing it.

## ◆ _updateBounds()

void Ogre::InstanceBatch::_updateBounds | ( | void |  | ) |

See also
  InstanceManager::updateDirtyBatches

## ◆ calculateMaxNumInstances() [1/5]

virtual size_t Ogre::InstanceBatch::calculateMaxNumInstances | ( | const SubMesh * | baseSubMesh,
|  | uint16 | flags ) const
| pure virtual

Some techniques have a limit on how many instances can be done.

Sometimes even depends on the material being used.

  Note this is a helper function, as such it takes a submesh base to compute the parameters, instead of using the object's own. This allows querying for a technique without requiring to actually build it.

Parameters

  baseSubMesh | The base submesh that will be using to build it.
  flags | Flags to pass to the InstanceManager.

See also
  InstanceManagerFlags

Returns
  The max instances limit

Implemented in Ogre::InstanceBatchHW, Ogre::InstanceBatchHW_VTF, Ogre::InstanceBatchShader, and Ogre::InstanceBatchVTF.

## ◆ build()

virtual RenderOperation Ogre::InstanceBatch::build | ( | const SubMesh * | baseSubMesh | ) |
| virtual

Constructs all the data needed to use this batch, as well as the InstanceEntities.

Placed here because in the constructor virtual tables may not have been yet filled.

Note
  Call this only ONCE. This is done automatically by Ogre::InstanceManager Caller is responsible for freeing buffers in this RenderOperation Buffers inside the RenderOp may be null if the built failed.

Parameters

  baseSubMesh | A sub mesh which the instances will be based upon from

Returns
  A render operation which is very useful to pass to other InstanceBatches (see buildFrom()) so that they share the same vertex buffers and indices, when possible

## ◆ buildFrom() [1/4]

virtual void Ogre::InstanceBatch::buildFrom | ( | const SubMesh * | baseSubMesh,
|  | const RenderOperation & | renderOperation )
| virtual

Instancing consumes significantly more GPU memory than regular rendering methods.

However, multiple batches can share most, if not all, of the vertex & index buffers to save memory. Derived classes are free to overload this method to manipulate what to reference from Render Op. For example, Hardware based instancing uses it's own vertex buffer for the last source binding, but shares the other sources.

Parameters

  baseSubMesh | A sub mesh which the instances will be based upon from
  renderOperation | The RenderOp to reference.

Note
  Caller is responsible for freeing buffers passed as input arguments This function replaces the need to call build()

Reimplemented in Ogre::BaseInstanceBatchVTF, Ogre::InstanceBatchHW, and Ogre::InstanceBatchShader.

## ◆ _getMeshReference()

const Ogre::MeshPtr & Ogre::InstanceBatch::_getMeshReference | ( | void |  | ) | const
| inline

## ◆ isBatchFull()

bool Ogre::InstanceBatch::isBatchFull | ( | void |  | ) | const
| inline

Returns
  true if it can not create more InstancedEntities (Num InstancedEntities == mInstancesPerBatch)

## ◆ isBatchUnused()

bool Ogre::InstanceBatch::isBatchUnused | ( | void |  | ) | const
| inline

Returns true if it no instanced entity has been requested or all of them have been removed.

## ◆ getInstancedEntitiesInUse()

void Ogre::InstanceBatch::getInstancedEntitiesInUse | ( | InstancedEntityVec & | outEntities,
|  | CustomParamsVec & | outParams )

Fills the input vector with the instances that are currently being used or were requested.

Used for defragmentation,

See also
  InstanceManager::defragmentBatches

## ◆ _defragmentBatch()

void Ogre::InstanceBatch::_defragmentBatch | ( | bool | optimizeCulling,
|  | InstancedEntityVec & | usedEntities,
|  | CustomParamsVec & | usedParams )

See also
  InstanceManager::defragmentBatches This function takes InstancedEntities and pushes back all entities it can fit here Extra entities in mUnusedEntities are destroyed (so that used + unused = mInstancedEntities.size())

Parameters

  optimizeCulling | true will call the DoCull version, false the NoCull
  usedEntities | Array of InstancedEntities to parent with this batch. Those reparented are removed from this input vector
  usedParams | Array of Custom parameters correlated with the InstancedEntities in usedEntities. They follow the fate of the entities in that vector.

Remarks
  : This function assumes caller holds data to mInstancedEntities! Otherwise you can get memory leaks. Don't call this directly if you don't know what you're doing!

## ◆ _defragmentBatchDiscard()

void Ogre::InstanceBatch::_defragmentBatchDiscard | ( | void |  | ) |

See also
  InstanceManager::_defragmentBatchDiscard Destroys unused entities and clears the mInstancedEntity container which avoids leaving dangling pointers from reparented InstancedEntities Usually called before deleting this pointer. Don't call directly!

## ◆ _boundsDirty() [1/3]

virtual void Ogre::InstanceBatch::_boundsDirty | ( | void |  | ) |
| virtual

Called by InstancedEntity(s) to tell us we need to update the bounds (we touch the SceneNode so the SceneManager aknowledges such change).

Reimplemented in Ogre::InstanceBatchHW, and Ogre::InstanceBatchHW_VTF.

## ◆ setStaticAndUpdate() [1/3]

virtual void Ogre::InstanceBatch::setStaticAndUpdate | ( | bool | bStatic | ) |
| inlinevirtual

Tells this batch to stop updating animations, positions, rotations, and display all it's active instances.

Currently only InstanceBatchHW & InstanceBatchHW_VTF support it. This option makes the batch behave pretty much like Static Geometry, but with the GPU RAM memory advantages (less VRAM, less bandwidth) and not LOD support. Very useful for billboards of trees, repeating vegetation, etc.

Note
  This function moves a lot of processing time from the CPU to the GPU. If the GPU is already a bottleneck, you may see a decrease in performance instead! Call this function again (with bStatic=true) if you've made a change to an InstancedEntity and wish this change to take effect. Be sure to call this after you've set all your instances

Reimplemented in Ogre::InstanceBatchHW, and Ogre::InstanceBatchHW_VTF.

## ◆ isStatic() [1/3]

virtual bool Ogre::InstanceBatch::isStatic | ( |  | ) | const
| inlinevirtual

Returns true if this batch was set as static.

See also
  setStaticAndUpdate

Reimplemented in Ogre::InstanceBatchHW, and Ogre::InstanceBatchHW_VTF.

## ◆ createInstancedEntity() [1/2]

InstancedEntity * Ogre::InstanceBatch::createInstancedEntity | ( |  | ) |

Returns a pointer to a new InstancedEntity ready to use Note it's actually preallocated, so no memory allocation happens at this point.

Note
  Returns NULL if all instances are being used

## ◆ removeInstancedEntity()

void Ogre::InstanceBatch::removeInstancedEntity | ( | InstancedEntity * | instancedEntity | ) |

Removes an InstancedEntity from the scene retrieved with getNewInstancedEntity, putting back into a queue.

Note
  Throws an exception if the instanced entity wasn't created by this batch Removed instanced entities save little CPU time, but not GPU

## ◆ useBoneWorldMatrices() [1/2]

virtual bool Ogre::InstanceBatch::useBoneWorldMatrices | ( |  | ) | const
| inlinevirtual

Tells whether world bone matrices need to be calculated.

This does not include bone matrices which are calculated regardless

Reimplemented in Ogre::BaseInstanceBatchVTF.

## ◆ _markTransformSharingDirty()

void Ogre::InstanceBatch::_markTransformSharingDirty | ( |  | ) |
| inline

Tells that the list of entity instances with shared transforms has changed.

## ◆ _setCustomParam()

void Ogre::InstanceBatch::_setCustomParam | ( | InstancedEntity * | instancedEntity,
|  | unsigned char | idx,
|  | const Vector4f & | newParam )

See also
  InstancedEntity::setCustomParam

## ◆ _getCustomParam()

const Vector4f & Ogre::InstanceBatch::_getCustomParam | ( | InstancedEntity * | instancedEntity,
|  | unsigned char | idx )

See also
  InstancedEntity::getCustomParam

## ◆ getMaterial()

const MaterialPtr & Ogre::InstanceBatch::getMaterial | ( | void |  | ) | const
| inlineoverridevirtual

Retrieves a weak reference to the material this renderable object uses.

Note that the Renderable also has the option to override the getTechnique method to specify a particular Technique to use instead of the best one available.

Implements Ogre::Renderable.

## ◆ getRenderOperation()

void Ogre::InstanceBatch::getRenderOperation | ( | RenderOperation & | op | ) |
| inlineoverridevirtual

Gets the render operation required to send this object to the frame buffer.

Implements Ogre::Renderable.

## ◆ getSquaredViewDepth() [1/2]

Real Ogre::InstanceBatch::getSquaredViewDepth | ( | const Camera * | cam | ) | const
| overridevirtual

Returns the squared distance between the camera and this renderable.

Used to sort transparent objects. Squared distance is used to avoid having to perform a square root on the result.

Implements Ogre::Renderable.

## ◆ getLights()

const LightList & Ogre::InstanceBatch::getLights | ( | void |  | ) | const
| overridevirtual

Gets a list of lights, ordered relative to how close they are to this renderable.

Directional lights, which have no position, will always be first on this list.

Implements Ogre::Renderable.

## ◆ getMovableType() [1/2]

const String & Ogre::InstanceBatch::getMovableType | ( | void |  | ) | const
| overridevirtual

Returns the type name of this object.

Implements Ogre::MovableObject.

## ◆ _notifyCurrentCamera()

void Ogre::InstanceBatch::_notifyCurrentCamera | ( | Camera * | cam | ) |
| overridevirtual

Internal method to notify the object of the camera to be used for the next rendering operation.

Certain objects may want to do specific processing based on the camera position. This method notifies them in case they wish to do this.

Reimplemented from Ogre::MovableObject.

## ◆ getBoundingBox() [1/2]

const AxisAlignedBox & Ogre::InstanceBatch::getBoundingBox | ( | void |  | ) | const
| overridevirtual

Retrieves the local axis-aligned bounding box for this object.

This bounding box is in local coordinates.

Implements Ogre::MovableObject.

## ◆ getBoundingRadius() [1/2]

Real Ogre::InstanceBatch::getBoundingRadius | ( | void |  | ) | const
| overridevirtual

Retrieves the radius of the origin-centered bounding sphere for this object.

Implements Ogre::MovableObject.

## ◆ _updateRenderQueue() [1/5]

void Ogre::InstanceBatch::_updateRenderQueue | ( | RenderQueue * | queue | ) |
| overridevirtual

Internal method by which the movable object must add Renderable subclass instances to the rendering queue.

The engine will call this method when this object is to be rendered. The object must then create one or more Renderable subclass instances which it places on the passed in Queue for rendering.

Implements Ogre::MovableObject.

Reimplemented in Ogre::InstanceBatchHW, and Ogre::InstanceBatchHW_VTF.

## ◆ visitRenderables() [1/2]

void Ogre::InstanceBatch::visitRenderables | ( | Renderable::Visitor * | visitor,
|  | bool | debugRenderables = false )
| overridevirtual

Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject will add to the render queue when asked, if any.

Parameters

  visitor | Pointer to a class implementing the Renderable::Visitor interface which will be called back for each Renderable which will be queued. Bear in mind that the state of the Renderable instances may not be finalised depending on when you call this.
  debugRenderables | If false, only regular renderables will be visited (those for normal display). If true, debug renderables will be included too.

Implements Ogre::MovableObject.

References Ogre::Renderable::getUserAny(), and Ogre::Renderable::setUserAny().

## ◆ InstanceBatchHW()

Ogre::InstanceBatchHW::InstanceBatchHW | ( | InstanceManager * | creator,
|  | MeshPtr & | meshReference,
|  | const MaterialPtr & | material,
|  | size_t | instancesPerBatch,
|  | const Mesh::IndexMap * | indexToBoneMap,
|  | const String & | batchName )

## ◆ ~InstanceBatchHW()

virtual Ogre::InstanceBatchHW::~InstanceBatchHW | ( |  | ) |
| virtual

## ◆ calculateMaxNumInstances() [2/5]

size_t Ogre::InstanceBatchHW::calculateMaxNumInstances | ( | const SubMesh * | baseSubMesh,
|  | uint16 | flags ) const
| overridevirtual

See also
  InstanceBatch::calculateMaxNumInstances

Implements Ogre::InstanceBatch.

## ◆ buildFrom() [2/4]

void Ogre::InstanceBatchHW::buildFrom | ( | const SubMesh * | baseSubMesh,
|  | const RenderOperation & | renderOperation )
| overridevirtual

See also
  InstanceBatch::buildFrom

Reimplemented from Ogre::InstanceBatch.

## ◆ _boundsDirty() [2/3]

void Ogre::InstanceBatchHW::_boundsDirty | ( | void |  | ) |
| overridevirtual

Overloaded so that we don't perform needless updates when in static mode.

Also doing that could cause glitches with shadow mapping (since Ogre thinks we're small/bigger than we really are when displaying, or that we're somewhere else)

Reimplemented from Ogre::InstanceBatch.

## ◆ setStaticAndUpdate() [2/3]

void Ogre::InstanceBatchHW::setStaticAndUpdate | ( | bool | bStatic | ) |
| overridevirtual

See also
  InstanceBatch::setStaticAndUpdate. While this flag is true, no individual per-entity cull check is made. This means if the camera is looking at only one instance, all instances are sent to the vertex shader (unlike when this flag is false). This saves a lot of CPU power and a bit of bus bandwidth.

Reimplemented from Ogre::InstanceBatch.

## ◆ isStatic() [2/3]

bool Ogre::InstanceBatchHW::isStatic | ( |  | ) | const
| inlineoverridevirtual

Returns true if this batch was set as static.

See also
  setStaticAndUpdate

Reimplemented from Ogre::InstanceBatch.

## ◆ getWorldTransforms() [1/3]

void Ogre::InstanceBatchHW::getWorldTransforms | ( | Matrix4 * | xform | ) | const
| overridevirtual

Gets the world transform matrix / matrices for this renderable object.

If the object has any derived transforms, these are expected to be up to date as long as all the SceneNode structures have been updated before this is called.

Note
  Internal Ogre never supports non-affine matrix for world transform matrix/matrices, the behavior is undefined if returns non-affine matrix here.

This method will populate transform with 1 matrix if it does not use GPU vertex blending. If it does use GPU vertex blending it will fill the passed in pointer with an array of matrices, the length being the value returned from getNumWorldTransforms.

Note
  If MeshManager::getBonesUseObjectSpace() is true, the first matrix must contain the world transform of the object, and the rest of the matrices must contain the bone transforms in object space.

Implements Ogre::Renderable.

## ◆ _updateRenderQueue() [2/5]

void Ogre::InstanceBatchHW::_updateRenderQueue | ( | RenderQueue * | queue | ) |
| overridevirtual

Overloaded to avoid updating skeletons (which we don't support), check visibility on a per unit basis and finally updated the vertex buffer.

Reimplemented from Ogre::InstanceBatch.

## ◆ InstanceBatchHW_VTF()

Ogre::InstanceBatchHW_VTF::InstanceBatchHW_VTF | ( | InstanceManager * | creator,
|  | MeshPtr & | meshReference,
|  | const MaterialPtr & | material,
|  | size_t | instancesPerBatch,
|  | const Mesh::IndexMap * | indexToBoneMap,
|  | const String & | batchName )

## ◆ ~InstanceBatchHW_VTF()

virtual Ogre::InstanceBatchHW_VTF::~InstanceBatchHW_VTF | ( |  | ) |
| virtual

## ◆ calculateMaxNumInstances() [3/5]

size_t Ogre::InstanceBatchHW_VTF::calculateMaxNumInstances | ( | const SubMesh * | baseSubMesh,
|  | uint16 | flags ) const
| overridevirtual

See also
  InstanceBatch::calculateMaxNumInstances

Implements Ogre::InstanceBatch.

## ◆ _boundsDirty() [3/3]

void Ogre::InstanceBatchHW_VTF::_boundsDirty | ( | void |  | ) |
| overridevirtual

Overloaded so that we don't perform needless updates when in static mode.

Also doing that could cause glitches with shadow mapping (since Ogre thinks we're small/bigger than we really are when displaying, or that we're somewhere else)

Reimplemented from Ogre::InstanceBatch.

## ◆ setStaticAndUpdate() [3/3]

void Ogre::InstanceBatchHW_VTF::setStaticAndUpdate | ( | bool | bStatic | ) |
| overridevirtual

See also
  InstanceBatch::setStaticAndUpdate. While this flag is true, no individual per-entity cull check is made. This means if the camera is looking at only one instance, all instances are sent to the vertex shader (unlike when this flag is false). This saves a lot of CPU power and a bit of bus bandwidth.

Reimplemented from Ogre::InstanceBatch.

## ◆ isStatic() [3/3]

bool Ogre::InstanceBatchHW_VTF::isStatic | ( |  | ) | const
| inlineoverridevirtual

Returns true if this batch was set as static.

See also
  setStaticAndUpdate

Reimplemented from Ogre::InstanceBatch.

## ◆ _updateRenderQueue() [3/5]

void Ogre::InstanceBatchHW_VTF::_updateRenderQueue | ( | RenderQueue * | queue | ) |
| overridevirtual

Overloaded to visibility on a per unit basis and finally updated the vertex texture.

Reimplemented from Ogre::BaseInstanceBatchVTF.

## ◆ InstanceBatchShader()

Ogre::InstanceBatchShader::InstanceBatchShader | ( | InstanceManager * | creator,
|  | MeshPtr & | meshReference,
|  | const MaterialPtr & | material,
|  | size_t | instancesPerBatch,
|  | const Mesh::IndexMap * | indexToBoneMap,
|  | const String & | batchName )

## ◆ calculateMaxNumInstances() [4/5]

size_t Ogre::InstanceBatchShader::calculateMaxNumInstances | ( | const SubMesh * | baseSubMesh,
|  | uint16 | flags ) const
| overridevirtual

See also
  InstanceBatch::calculateMaxNumInstances

Implements Ogre::InstanceBatch.

## ◆ buildFrom() [3/4]

void Ogre::InstanceBatchShader::buildFrom | ( | const SubMesh * | baseSubMesh,
|  | const RenderOperation & | renderOperation )
| overridevirtual

See also
  InstanceBatch::buildFrom

Reimplemented from Ogre::InstanceBatch.

## ◆ getWorldTransforms() [2/3]

void Ogre::InstanceBatchShader::getWorldTransforms | ( | Matrix4 * | xform | ) | const
| overridevirtual

Gets the world transform matrix / matrices for this renderable object.

If the object has any derived transforms, these are expected to be up to date as long as all the SceneNode structures have been updated before this is called.

Note
  Internal Ogre never supports non-affine matrix for world transform matrix/matrices, the behavior is undefined if returns non-affine matrix here.

This method will populate transform with 1 matrix if it does not use GPU vertex blending. If it does use GPU vertex blending it will fill the passed in pointer with an array of matrices, the length being the value returned from getNumWorldTransforms.

Note
  If MeshManager::getBonesUseObjectSpace() is true, the first matrix must contain the world transform of the object, and the rest of the matrices must contain the bone transforms in object space.

Implements Ogre::Renderable.

## ◆ getNumWorldTransforms()

unsigned short Ogre::InstanceBatchShader::getNumWorldTransforms | ( | void |  | ) | const
| overridevirtual

Returns the number of world transform matrices this renderable requires.

When a renderable uses GPU vertex blending, it uses multiple world matrices instead of a single one. Each vertex sent to the pipeline can reference one or more matrices in this list with given weights. If a renderable does not use vertex blending this method returns 1, which is the default for simplicity.

Note
  If MeshManager::getBonesUseObjectSpace() is true, this method must return numBones + 1

Reimplemented from Ogre::Renderable.

## ◆ BaseInstanceBatchVTF()

Ogre::BaseInstanceBatchVTF::BaseInstanceBatchVTF | ( | InstanceManager * | creator,
|  | MeshPtr & | meshReference,
|  | const MaterialPtr & | material,
|  | size_t | instancesPerBatch,
|  | const Mesh::IndexMap * | indexToBoneMap,
|  | const String & | batchName )

## ◆ ~BaseInstanceBatchVTF()

virtual Ogre::BaseInstanceBatchVTF::~BaseInstanceBatchVTF | ( |  | ) |
| virtual

## ◆ buildFrom() [4/4]

void Ogre::BaseInstanceBatchVTF::buildFrom | ( | const SubMesh * | baseSubMesh,
|  | const RenderOperation & | renderOperation )
| overridevirtual

See also
  InstanceBatch::buildFrom

Reimplemented from Ogre::InstanceBatch.

## ◆ getWorldTransforms() [3/3]

void Ogre::BaseInstanceBatchVTF::getWorldTransforms | ( | Matrix4 * | xform | ) | const
| overridevirtual

Gets the world transform matrix / matrices for this renderable object.

If the object has any derived transforms, these are expected to be up to date as long as all the SceneNode structures have been updated before this is called.

Note
  Internal Ogre never supports non-affine matrix for world transform matrix/matrices, the behavior is undefined if returns non-affine matrix here.

This method will populate transform with 1 matrix if it does not use GPU vertex blending. If it does use GPU vertex blending it will fill the passed in pointer with an array of matrices, the length being the value returned from getNumWorldTransforms.

Note
  If MeshManager::getBonesUseObjectSpace() is true, the first matrix must contain the world transform of the object, and the rest of the matrices must contain the bone transforms in object space.

Implements Ogre::Renderable.

## ◆ _updateRenderQueue() [4/5]

void Ogre::BaseInstanceBatchVTF::_updateRenderQueue | ( | RenderQueue * | queue | ) |
| overridevirtual

Overloaded to be able to updated the vertex texture.

Implements Ogre::MovableObject.

Reimplemented in Ogre::InstanceBatchHW_VTF.

## ◆ setBoneMatrixLookup()

void Ogre::BaseInstanceBatchVTF::setBoneMatrixLookup | ( | bool | enable,
|  | size_t | maxLookupTableInstances )
| inline

Sets the state of the usage of bone matrix lookup.

Under default condition each instance entity is assigned a specific area in the vertex texture for bone matrix data. When turned on the amount of area in the vertex texture assigned for bone matrix data will be relative to the amount of unique animation states. Instanced entities sharing the same animation state will share the same area in the matrix. The specific position of each entity is placed in the vertex data and added in a second phase in the shader.

Note this feature only works in VTF_HW for now. This value needs to be set before adding any instanced entities

## ◆ useBoneMatrixLookup()

bool Ogre::BaseInstanceBatchVTF::useBoneMatrixLookup | ( |  | ) | const
| inline

Tells whether to use bone matrix lookup.

See also
  setBoneMatrixLookup()

## ◆ setBoneDualQuaternions()

void Ogre::BaseInstanceBatchVTF::setBoneDualQuaternions | ( | bool | enable | ) |
| inline

## ◆ useBoneDualQuaternions()

bool Ogre::BaseInstanceBatchVTF::useBoneDualQuaternions | ( |  | ) | const
| inline

## ◆ setForceOneWeight()

void Ogre::BaseInstanceBatchVTF::setForceOneWeight | ( | bool | enable | ) |
| inline

## ◆ forceOneWeight()

bool Ogre::BaseInstanceBatchVTF::forceOneWeight | ( |  | ) | const
| inline

## ◆ setUseOneWeight()

void Ogre::BaseInstanceBatchVTF::setUseOneWeight | ( | bool | enable | ) |
| inline

## ◆ useOneWeight()

bool Ogre::BaseInstanceBatchVTF::useOneWeight | ( |  | ) | const
| inline

## ◆ useBoneWorldMatrices() [2/2]

bool Ogre::BaseInstanceBatchVTF::useBoneWorldMatrices | ( |  | ) | const
| inlineoverridevirtual

See also
  InstanceBatch::useBoneWorldMatrices()

Reimplemented from Ogre::InstanceBatch.

## ◆ getMaxLookupTableInstances()

virtual size_t Ogre::BaseInstanceBatchVTF::getMaxLookupTableInstances | ( |  | ) | const
| inlinevirtual

Returns
  the maximum amount of shared transform entities when using lookup table

## ◆ InstanceBatchVTF()

Ogre::InstanceBatchVTF::InstanceBatchVTF | ( | InstanceManager * | creator,
|  | MeshPtr & | meshReference,
|  | const MaterialPtr & | material,
|  | size_t | instancesPerBatch,
|  | const Mesh::IndexMap * | indexToBoneMap,
|  | const String & | batchName )

## ◆ ~InstanceBatchVTF()

virtual Ogre::InstanceBatchVTF::~InstanceBatchVTF | ( |  | ) |
| virtual

## ◆ calculateMaxNumInstances() [5/5]

size_t Ogre::InstanceBatchVTF::calculateMaxNumInstances | ( | const SubMesh * | baseSubMesh,
|  | uint16 | flags ) const
| overridevirtual

See also
  InstanceBatch::calculateMaxNumInstances

Implements Ogre::InstanceBatch.

## ◆ InstancedEntity()

Ogre::InstancedEntity::InstancedEntity | ( | InstanceBatch * | batchOwner,
|  | uint32 | instanceID,
|  | InstancedEntity * | sharedTransformEntity = NULL )

References InstancedEntity(), and InstanceBatch.

Referenced by InstancedEntity(), BaseInstanceBatchVTF, and shareTransformWith().

## ◆ ~InstancedEntity()

virtual Ogre::InstancedEntity::~InstancedEntity | ( |  | ) |
| virtual

## ◆ shareTransformWith()

bool Ogre::InstancedEntity::shareTransformWith | ( | InstancedEntity * | slave | ) |

Shares the entire transformation with another InstancedEntity.

This is useful when a mesh has more than one submeshes, therefore creating multiple InstanceManagers (one for each submesh). With this function, sharing makes the skeleton to be shared (less memory) and updated once (performance optimization). Note that one InstancedEntity (i.e. submesh 0) must be chosen as "master" which will share with the other instanced entities (i.e. submeshes 1-N) which are called "slaves"

  Requirements to share trasnformations: Both InstancedEntities must have use the same skeleton An InstancedEntity can't be both "master" and "slave" at the same time

Sharing does nothing if the original mesh doesn't have a skeleton When an InstancedEntity is removed (

See also
  InstanceBatch::removeInstancedEntity), it stops sharing the transform. If the instanced entity was the master one, all it's slaves stop sharing and start having their own transform too.

Parameters

  slave | The InstancedEntity that should share with us and become our slave

Returns
  true if successfully shared (may fail if they aren't skeletally animated)

References InstancedEntity().

## ◆ stopSharingTransform()

void Ogre::InstancedEntity::stopSharingTransform | ( |  | ) |

See also
  shareTransformWith Stops sharing the transform if this is a slave, and notifies the master we're no longer a slave. If this is a master, tells all it's slave to stop sharing

This function is automatically called in InstanceBatch::removeInstancedEntity

## ◆ _getOwner()

InstanceBatch * Ogre::InstancedEntity::_getOwner | ( |  | ) | const
| inline

References InstanceBatch.

## ◆ getMovableType() [2/2]

const String & Ogre::InstancedEntity::getMovableType | ( | void |  | ) | const
| overridevirtual

Returns the type name of this object.

Implements Ogre::MovableObject.

## ◆ getBoundingBox() [2/2]

const AxisAlignedBox & Ogre::InstancedEntity::getBoundingBox | ( | void |  | ) | const
| overridevirtual

Retrieves the local axis-aligned bounding box for this object.

This bounding box is in local coordinates.

Implements Ogre::MovableObject.

## ◆ getBoundingRadius() [2/2]

Real Ogre::InstancedEntity::getBoundingRadius | ( | void |  | ) | const
| overridevirtual

Retrieves the radius of the origin-centered bounding sphere for this object.

Implements Ogre::MovableObject.

## ◆ getSquaredViewDepth() [2/2]

Real Ogre::InstancedEntity::getSquaredViewDepth | ( | const Camera * | cam | ) | const

This is used by our batch owner to get the closest entity's depth, returns infinity when not attached to a scene node.

## ◆ _notifyMoved()

void Ogre::InstancedEntity::_notifyMoved | ( | void |  | ) |
| overridevirtual

Overridden so we can tell the InstanceBatch it needs to update it's bounds.

Reimplemented from Ogre::MovableObject.

## ◆ _notifyAttached()

void Ogre::InstancedEntity::_notifyAttached | ( | Node * | parent,
|  | bool | isTagPoint = false )
| overridevirtual

Internal method called to notify the object that it has been attached to a node.

Reimplemented from Ogre::MovableObject.

## ◆ _updateRenderQueue() [5/5]

void Ogre::InstancedEntity::_updateRenderQueue | ( | RenderQueue * | queue | ) |
| inlineoverridevirtual

Do nothing, InstanceBatch takes care of this.

Implements Ogre::MovableObject.

## ◆ visitRenderables() [2/2]

void Ogre::InstancedEntity::visitRenderables | ( | Renderable::Visitor * | visitor,
|  | bool | debugRenderables = false )
| inlineoverridevirtual

Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject will add to the render queue when asked, if any.

Parameters

  visitor | Pointer to a class implementing the Renderable::Visitor interface which will be called back for each Renderable which will be queued. Bear in mind that the state of the Renderable instances may not be finalised depending on when you call this.
  debugRenderables | If false, only regular renderables will be visited (those for normal display). If true, debug renderables will be included too.

Implements Ogre::MovableObject.

## ◆ hasSkeleton()

bool Ogre::InstancedEntity::hasSkeleton | ( | void |  | ) | const
| inline

See also
  Entity::hasSkeleton

## ◆ getSkeleton()

SkeletonInstance * Ogre::InstancedEntity::getSkeleton | ( | void |  | ) | const
| inline

See also
  Entity::getSkeleton

## ◆ getAnimationState()

AnimationState * Ogre::InstancedEntity::getAnimationState | ( | const String & | name | ) | const

See also
  Entity::getAnimationState

## ◆ getAllAnimationStates()

AnimationStateSet * Ogre::InstancedEntity::getAllAnimationStates | ( | void |  | ) | const

See also
  Entity::getAllAnimationStates

## ◆ _updateAnimation()

virtual bool Ogre::InstancedEntity::_updateAnimation | ( | void |  | ) |
| virtual

Called by InstanceBatch in his _updateRenderQueue to tell us we need to calculate our bone matrices.

Remarks
  Assumes it has a skeleton (mSkeletonInstance != 0)

Returns
  true if something was actually updated

## ◆ setTransformLookupNumber()

void Ogre::InstancedEntity::setTransformLookupNumber | ( | uint16 | num | ) |
| inline

Sets the transformation look up number.

## ◆ getPosition()

const Vector3 & Ogre::InstancedEntity::getPosition | ( |  | ) | const
| inline

Retrieve the position.

## ◆ setPosition()

void Ogre::InstancedEntity::setPosition | ( | const Vector3 & | position,
|  | bool | doUpdate = true )

Set the position or the offset from the parent node if a parent node exists.

## ◆ getOrientation()

const Quaternion & Ogre::InstancedEntity::getOrientation | ( |  | ) | const
| inline

Retrieve the orientation.

## ◆ setOrientation()

void Ogre::InstancedEntity::setOrientation | ( | const Quaternion & | orientation,
|  | bool | doUpdate = true )

Set the orientation or the offset from the parent node if a parent node exists.

## ◆ getScale()

const Vector3 & Ogre::InstancedEntity::getScale | ( |  | ) | const
| inline

Retrieve the local scale.

## ◆ setScale()

void Ogre::InstancedEntity::setScale | ( | const Vector3 & | scale,
|  | bool | doUpdate = true )

Set the scale or the offset from the parent node if a parent node exists.

## ◆ getMaxScaleCoef()

Real Ogre::InstancedEntity::getMaxScaleCoef | ( |  | ) | const

Returns the maximum derived scale coefficient among the xyz values.

## ◆ updateTransforms()

void Ogre::InstancedEntity::updateTransforms | ( |  | ) |

Update the world transform and derived values.

## ◆ isInUse()

bool Ogre::InstancedEntity::isInUse | ( |  | ) | const
| inline

Tells if the entity is in use.

## ◆ setInUse()

void Ogre::InstancedEntity::setInUse | ( | bool | used | ) |

Sets whether the entity is in use.

## ◆ _getParentNodeFullTransform()

const Affine3 & Ogre::InstancedEntity::_getParentNodeFullTransform | ( | void |  | ) | const
| inlineoverridevirtual

Returns the world transform of the instanced entity including local transform.

Reimplemented from Ogre::MovableObject.

References Ogre::Affine3::IDENTITY.

## ◆ _getDerivedPosition()

const Vector3 & Ogre::InstancedEntity::_getDerivedPosition | ( |  | ) | const
| inline

Returns the derived position of the instanced entity including local transform.

## ◆ isInScene()

bool Ogre::InstancedEntity::isInScene | ( | void |  | ) | const
| inlineoverridevirtual

Returns true if this object is attached to a SceneNode or TagPoint, and this SceneNode / TagPoint is currently in an active part of the scene graph.

Reimplemented from Ogre::MovableObject.

## ◆ setCustomParam()

void Ogre::InstancedEntity::setCustomParam | ( | unsigned char | idx,
|  | const Vector4f & | newParam )

Sets the custom parameter for this instance.

See also
  InstanceManager::setNumCustomParams Because not all techniques support custom params, and some users may not need it while using millions of InstancedEntities, the params have been detached from InstancedEntity and stored in it's InstanceBatch instead, to reduce memory overhead.

If this function is never called, all instances default to Vector4::ZERO. Watch out! If you destroy an instanced entity and then create it again (remember! Instanced entities are pre-allocated) it's custom param will contain the old value when it was destroyed.

Parameters

  idx | of the param. In the range [0; InstanceManager::getNumCustomParams())
  newParam | New parameter

## ◆ getCustomParam()

const Vector4f & Ogre::InstancedEntity::getCustomParam | ( | unsigned char | idx | ) |

## ◆ BatchSettings()

Ogre::InstanceManager::BatchSettings::BatchSettings | ( |  | ) |
| inline

References Ogre::InstanceManager::CAST_SHADOWS, setting, and Ogre::InstanceManager::SHOW_BOUNDINGBOX.

## ◆ InstanceManager()

Ogre::InstanceManager::InstanceManager | ( | const String & | customName,
|  | SceneManager * | sceneManager,
|  | const String & | meshName,
|  | const String & | groupName,
|  | InstancingTechnique | instancingTechnique,
|  | uint16 | instancingFlags,
|  | size_t | instancesPerBatch,
|  | unsigned short | subMeshIdx,
|  | bool | useBoneMatrixLookup = false )

## ◆ ~InstanceManager()

Ogre::InstanceManager::~InstanceManager | ( |  | ) |

## ◆ getName()

const String & Ogre::InstanceManager::getName | ( |  | ) | const
| inline

## ◆ getSceneManager()

SceneManager * Ogre::InstanceManager::getSceneManager | ( |  | ) | const
| inline

## ◆ setInstancesPerBatch()

void Ogre::InstanceManager::setInstancesPerBatch | ( | size_t | instancesPerBatch | ) |

Raises an exception if trying to change it after creating the first InstancedEntity The actual value may be less if the technique doesn't support having so much.

See getMaxOrBestNumInstancesPerBatch for the usefulness of this function

Parameters

  instancesPerBatch | New instances per batch number

## ◆ setMaxLookupTableInstances()

void Ogre::InstanceManager::setMaxLookupTableInstances | ( | size_t | maxLookupTableInstances | ) |

Sets the size of the lookup table for techniques supporting bone lookup table.

Raises an exception if trying to change it after creating the first InstancedEntity. Setting this value below the number of unique (non-sharing) entity instance animations will produce a crash during runtime. Setting this value above will increase memory consumption and reduce framerate.

Remarks
  The value should be as close but not below the actual value.

Parameters

  maxLookupTableInstances | New size of the lookup table

## ◆ setNumCustomParams()

void Ogre::InstanceManager::setNumCustomParams | ( | unsigned char | numCustomParams | ) |

Sets the number of custom parameters per instance.

Some techniques (i.e. HWInstancingBasic) support this, but not all of them. They also may have limitations to the max number. All instancing implementations assume each instance param is a Vector4 (4 floats).

This function cannot be called after the first batch has been created. Otherwise it will raise an exception. If the technique doesn't support custom params, it will raise an exception at the time of building the first InstanceBatch.

HWInstancingBasic: Each custom params adds an additional float4 TEXCOORD. HWInstancingVTF: Not implemented. (Recommendation: Implement this as an additional float4 VTF fetch) TextureVTF: Not implemented. (see HWInstancingVTF's recommendation) ShaderBased: Not supported.

Parameters

  numCustomParams | Number of custom parameters each instance will have. Default: 0

## ◆ getNumCustomParams()

unsigned char Ogre::InstanceManager::getNumCustomParams | ( |  | ) | const
| inline

## ◆ getInstancingTechnique()

InstancingTechnique Ogre::InstanceManager::getInstancingTechnique | ( |  | ) | const
| inline

Returns
  Instancing technique this manager was created for. Can't be changed after creation

## ◆ getMaxOrBestNumInstancesPerBatch()

size_t Ogre::InstanceManager::getMaxOrBestNumInstancesPerBatch | ( | const String & | materialName,
|  | size_t | suggestedSize,
|  | uint16 | flags )

Calculates the maximum (or the best amount, depending on flags) of instances per batch given the suggested size for the technique this manager was created for.

This is done automatically when creating an instanced entity, but this function in conjunction with setInstancesPerBatch allows more flexible control over the amount of instances per batch

Parameters

  materialName | Name of the material to base on
  suggestedSize | Suggested amount of instances per batch
  flags | InstanceManagerFlags to pass to the InstanceManager

Returns
  The max/best amount of instances per batch given the suggested size and flags

## ◆ createInstancedEntity() [2/2]

InstancedEntity * Ogre::InstanceManager::createInstancedEntity | ( | const String & | materialName | ) |

Creates an InstancedEntity.

## ◆ cleanupEmptyBatches()

void Ogre::InstanceManager::cleanupEmptyBatches | ( | void |  | ) |

This function can be useful to improve CPU speed after having too many instances created, which where now removed, thus freeing many batches with zero used Instanced Entities However the batches aren't automatically removed from memory until the InstanceManager is destroyed, or this function is called.

This function removes those batches which are completely unused (only wasting memory).

## ◆ defragmentBatches()

void Ogre::InstanceManager::defragmentBatches | ( | bool | optimizeCulling | ) |

After creating many entities (which turns in many batches) and then removing entities that are in the middle of these batches, there might be many batches with many free entities.

Worst case scenario, there could be left one batch per entity. Imagine there can be 80 entities per batch, there are 80 batches, making a total of 6400 entities. Then 6320 of those entities are removed in a very specific way, which leads to having 80 batches, 80 entities, and GPU vertex shader still needs to process 6400! This is called fragmentation. This function reparents the InstancedEntities to fewer batches, in this case leaving only one batch with 80 entities

Note
  This function takes time. Make sure to call this only when you're sure there's too much of fragmentation and you won't be creating more InstancedEntities soon Also in many cases cleanupEmptyBatches() ought to be enough Defragmentation is done per material Static batches won't be defragmented. If you want to degragment them, set them to dynamic again, and switch back to static after calling this function.

Parameters

  optimizeCulling | When true, entities close together will be reorganized in the same batch for more efficient CPU culling. This can take more CPU time. You want this to be false if you now you're entities are moving very randomly which tends them to get separated and spread all over the scene (which nullifies any CPU culling)

## ◆ setSetting()

void Ogre::InstanceManager::setSetting | ( | BatchSettingId | id,
|  | bool | enabled,
|  | const String & | materialName = BLANKSTRING )

Applies a setting for all batches using the same material.

If the material name hasn't been used, the settings are still stored This allows setting up batches before they get even created.

Examples
  setSetting(InstanceManager::CAST_SHADOWS, false, "") disables shadow casting for all instanced entities (see MovableObject::setCastShadows)

  setSetting(InstanceManager::SHOW_BOUNDINGBOX, true, "MyMat") will display the bounding box of the batch (not individual InstancedEntities) from all batches using material "MyMat"

Parameters

  id | BatchSettingId to setup
  enabled | Boolean value. It's meaning depends on the id.
  materialName | When Blank, the setting is applied to all existing materials

References Ogre::BLANKSTRING.

## ◆ getSetting()

bool Ogre::InstanceManager::getSetting | ( | BatchSettingId | id,
|  | const String & | materialName ) const

If settings for the given material didn't exist, default value is returned.

## ◆ hasSettings()

bool Ogre::InstanceManager::hasSettings | ( | const String & | materialName | ) | const

Returns true if settings were already created for the given material name.

If false is returned, it means getSetting will return default settings.

## ◆ setBatchesAsStaticAndUpdate()

void Ogre::InstanceManager::setBatchesAsStaticAndUpdate | ( | bool | bStatic | ) |

Tells this batch to stop updating animations, positions, rotations, and display all it's active instances.

Currently only InstanceBatchHW & InstanceBatchHW_VTF support it. This option makes the batch behave pretty much like Static Geometry, but with the GPU RAM memory advantages (less VRAM, less bandwidth) and not LOD support. Very useful for billboards of trees, repeating vegetation, etc.

Note
  This function moves a lot of processing time from the CPU to the GPU. If the GPU is already a bottleneck, you may see a decrease in performance instead! Call this function again (with bStatic=true) if you've made a change to an InstancedEntity and wish this change to take effect. Be sure to call this after you've set all your instances

## ◆ _addDirtyBatch()

void Ogre::InstanceManager::_addDirtyBatch | ( | InstanceBatch * | dirtyBatch | ) |

Called by an InstanceBatch when it requests their bounds to be updated for proper culling.

Parameters

  dirtyBatch | The batch which is dirty, usually same as caller.

## ◆ _updateDirtyBatches()

void Ogre::InstanceManager::_updateDirtyBatches | ( | void |  | ) |

Called by SceneManager when we told it we have at least one dirty batch.

## ◆ getInstanceBatchMapIterator()

InstanceBatchMapIterator Ogre::InstanceManager::getInstanceBatchMapIterator | ( | void |  | ) | const
| inline

Get non-updateable iterator over instance batches per material.

## ◆ getInstanceBatchIterator()

InstanceBatchIterator Ogre::InstanceManager::getInstanceBatchIterator | ( | const String & | materialName | ) | const

Get non-updateable iterator over instance batches for given material.

Each InstanceBatch pointer may be modified for low level usage (i.e. setCustomParameter), but there's no synchronization mechanism when multithreading or creating more instances, that's up to the user.

## ◆ operator==()

_OgreExport bool Ogre::operator== | ( | const ShadowTextureConfig & | lhs,
|  | const ShadowTextureConfig & | rhs )

## ◆ operator!=()

_OgreExport bool Ogre::operator!= | ( | const ShadowTextureConfig & | lhs,
|  | const ShadowTextureConfig & | rhs )

## Variable Documentation

## ◆ setting

bool Ogre::InstanceManager::BatchSettings::setting[NUM_SETTINGS]

Referenced by BatchSettings().

## ◆ SMT_DEFAULT

_OgreExport const String Ogre::SMT_DEFAULT
| extern

Default scene manager type name.

Referenced by Ogre::Root::createSceneManager(), and Ogre::Root::createSceneManager().