OGRE-Next  3.0.0
Object-Oriented Graphics Rendering Engine
Ogre::SceneManager Class Referenceabstract

Manages the organisation and rendering of a 'scene' i.e. More...

#include <OgreSceneManager.h>

+ Inheritance diagram for Ogre::SceneManager:

Classes

class  Listener
 Class that allows listening in on the various stages of SceneManager processing, so that custom behaviour can be implemented from outside. More...
 
struct  RenderContext
 

Public Types

typedef MapIterator< AnimationList > AnimationIterator
 
typedef VectorIterator< CameraList > CameraIterator
 
enum  EnvFeatures { EnvFeatures_DiffuseGiFromReflectionProbe = 1u << 0u }
 
enum  IlluminationRenderStage { IRS_NONE , IRS_RENDER_TO_TEXTURE }
 Describes the stage of rendering when performing complex illumination. More...
 
typedef VectorIterator< MovableObjectVecMovableObjectIterator
 
typedef vector< MovableObject * >::type MovableObjectVec
 
enum  PrefabType { PT_PLANE , PT_CUBE , PT_SPHERE }
 Prefab shapes available without loading a model. More...
 
typedef vector< SceneNode * >::type SceneNodeList
 
enum  SkyMethod { SkyCubemap , SkyEquirectangular }
 

Public Member Functions

 SceneManager (const String &instanceName, size_t numWorkerThreads)
 Constructor. More...
 
virtual ~SceneManager ()
 Default destructor. More...
 
virtual void _addAutotrackingSceneNode (SceneNode *source, SceneNode *target, const Vector3 &offset, const Vector3 &localDirection)
 Internal method for notifying the manager that a SceneNode is autotracking. More...
 
void _addCompositorTexture (IdString name, TextureGpu *tex)
 Used by Compositor, tells of which compositor textures active, so Materials can access them. More...
 
void _addWireAabb (WireAabb *wireAabb)
 
virtual void _applySceneAnimations ()
 Internal method for applying animations to scene nodes. More...
 
virtual bool _areRenderStateChangesSuppressed () const
 Are render state changes suppressed? More...
 
AxisAlignedBox _calculateCurrentCastersBox (uint32 viewportVisibilityMask, uint8 firstRq, uint8 lastRq) const
 
bool _collectForwardPlusObjects (const Camera *camera)
 Returns true if collection code was run. More...
 
virtual InternalCubemapProbe_createCubemapProbe (SceneMemoryMgrTypes sceneType)
 
virtual SceneNode_createSceneNode (SceneNode *parent, NodeMemoryManager *nodeMemoryManager)
 
virtual TagPoint_createTagPoint (SceneNode *parent, NodeMemoryManager *nodeMemoryManager)
 Don't call this function directly. More...
 
virtual void _cullPhase01 (Camera *cullCamera, Camera *renderCamera, const Camera *lodCamera, uint8 firstRq, uint8 lastRq, bool reuseCullData)
 Performs the frustum culling that will later be needed by _renderPhase02. More...
 
virtual void _destroyAllCubemapProbes ()
 
virtual void _destroyCubemapProbe (InternalCubemapProbe *probe)
 
void _frameEnded ()
 Called when the frame has fully ended (ALL passes have been executed to all RTTs) More...
 
ForwardPlusBase_getActivePassForwardPlus ()
 
AutoParamDataSource_getAutoParamDataSource () const
 
uint32 _getCombinedVisibilityMask () const
 Internal method for getting the combination between the global visibility mask and the per-viewport visibility mask. More...
 
IlluminationRenderStage _getCurrentRenderStage () const
 
ObjectMemoryManager_getEntityMemoryManager (SceneMemoryMgrTypes sceneType)
 Retrieves the main entity memory manager. More...
 
ObjectMemoryManager_getLightMemoryManager ()
 
NodeMemoryManager_getNodeMemoryManager (SceneMemoryMgrTypes sceneType)
 
NodeMemoryManager_getTagPointNodeMemoryManager ()
 
VisibleObjectsPerThreadArray_getTmpVisibleObjectsList ()
 
void _handleLodEvents ()
 Handle LOD events. More...
 
virtual void _markGpuParamsDirty (uint16 mask)
 Method to allow you to mark gpu parameters as dirty, causing them to be updated according to the mask that you set when updateGpuProgramParameters is next called. More...
 
void _notifyEntityMaterialLodChanged (EntityMaterialLodChangedEvent &evt)
 Notify that an entity material LOD change event has occurred. More...
 
void _notifyEntityMeshLodChanged (EntityMeshLodChangedEvent &evt)
 Notify that an entity mesh LOD change event has occurred. More...
 
void _notifyMovableObjectLodChanged (MovableObjectLodChangedEvent &evt)
 Notify that a movable object LOD change event has occurred. More...
 
virtual RenderContext_pauseRendering ()
 Pause rendering of the frame. More...
 
virtual void _releaseManualHardwareResources ()
 Notifies the scene manager that hardware resources were lost. More...
 
virtual void _removeAutotrackingSceneNode (SceneNode *source)
 
void _removeCompositorTextures (size_t from)
 Removes all compositor textures from 'from' to end. More...
 
void _removeSkeletonDef (const SkeletonDef *skeletonDef)
 Removes a skeleton definition from its memory manager. More...
 
void _removeWireAabb (WireAabb *wireAabb)
 
virtual void _renderPhase02 (Camera *camera, const Camera *lodCamera, uint8 firstRq, uint8 lastRq, bool includeOverlays)
 Prompts the class to send its contents to the renderer. More...
 
virtual void _renderSingleObject (Renderable *pRend, const MovableObject *pMovableObject, bool casterPass, bool dualParaboloid)
 
virtual void _restoreManualHardwareResources ()
 Notifies the scene manager that hardware resources should be restored. More...
 
virtual void _resumeRendering (RenderContext *context)
 Resume rendering of the frame. More...
 
void _setAtmosphere (AtmosphereComponent *atmosphere)
 Sets an external atmosphere provider. More...
 
void _setCamerasInProgress (const CamerasInProgress &cameras)
 
void _setCurrentCompositorPass (CompositorPass *pass)
 
void _setCurrentRenderStage (IlluminationRenderStage stage)
 
void _setCurrentShadowNode (CompositorShadowNode *shadowNode)
 
virtual void _setDestinationRenderSystem (RenderSystem *sys)
 Notifies the scene manager of its destination render system. More...
 
void _setForwardPlusEnabledInPass (bool bEnable)
 For internal use. More...
 
void _setLightCullingVisibility (Camera *camera, bool collectLights, bool isCubemap)
 See Camera::setLightCullingVisibility. More...
 
void _setPrePassMode (PrePassMode mode, const TextureGpuVec &prepassTextures, TextureGpu *prepassDepthTexture, TextureGpu *ssrTexture)
 For internal use. More...
 
void _setRefractions (TextureGpu *depthTextureNoMsaa, TextureGpu *refractionsTexture)
 
virtual void _suppressRenderStateChanges (bool suppress)
 Indicates to the SceneManager whether it should suppress changing the RenderSystem states when rendering objects. More...
 
unsigned long _updateWorkerThread (ThreadHandle *threadHandle)
 Called from the worker thread, polls to process frustum culling requests when a sync is performed. More...
 
void _warmUpShaders (Camera *camera, uint32_t visibilityMask, uint8 firstRq, uint8 lastRq)
 
virtual void addListener (Listener *s)
 Add a listener which will get called back on scene manager events. More...
 
void addLodListener (LodListener *listener)
 Add a level of detail listener. More...
 
virtual void addRenderObjectListener (RenderObjectListener *newListener)
 Registers a new Render Object Listener which will be notified when rendering an object. More...
 
virtual void addRenderQueueListener (RenderQueueListener *newListener)
 Registers a new RenderQueueListener which will be notified when render queues are processed. More...
 
void clearFrameData ()
 Clears temporary buffers and other data that needs to live every frame. More...
 
virtual void clearScene (bool deleteIndestructibleToo, bool reattachCameras=true)
 Empties the entire scene, inluding all SceneNodes, Entities, Lights, BillboardSets etc. More...
 
virtual AxisAlignedBoxSceneQuerycreateAABBQuery (const AxisAlignedBox &box, uint32 mask=QUERY_ENTITY_DEFAULT_MASK)
 Creates an AxisAlignedBoxSceneQuery for this scene manager. More...
 
virtual v1::AnimationcreateAnimation (const String &name, Real length)
 Creates an animation which can be used to animate scene nodes. More...
 
virtual v1::AnimationStatecreateAnimationState (const String &animName)
 Create an AnimationState object for managing application of animations. More...
 
virtual v1::BillboardChaincreateBillboardChain ()
 Create a BillboardChain, an object which you can use to render a linked chain of billboards. More...
 
virtual v1::BillboardSetcreateBillboardSet (unsigned int poolSize=20, SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC)
 Creates a new BillboardSet for use with this scene manager. More...
 
virtual CameracreateCamera (const String &name, bool notShadowCaster=true, bool forCubemapping=false)
 Creates a camera to be managed by this scene manager. More...
 
virtual DecalcreateDecal (SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC)
 
virtual v1::EntitycreateEntity (const String &meshName, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME, SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC)
 Create an Entity (instance of a discrete mesh). More...
 
virtual v1::EntitycreateEntity (const v1::MeshPtr &pMesh, SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC)
 Create an Entity (instance of a discrete mesh). More...
 
virtual v1::EntitycreateEntity (PrefabType ptype, SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC)
 Create an Entity (instance of a discrete mesh) from a range of prefab shapes. More...
 
virtual IntersectionSceneQuerycreateIntersectionQuery (uint32 mask=QUERY_ENTITY_DEFAULT_MASK)
 Creates an IntersectionSceneQuery for this scene manager. More...
 
virtual ItemcreateItem (const MeshPtr &pMesh, SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC)
 Create an Item (instance of a discrete mesh). More...
 
virtual ItemcreateItem (const String &meshName, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME, SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC, bool bUseMeshMat=true)
 Create an Item (instance of a discrete mesh). More...
 
virtual LightcreateLight ()
 Creates a light for use in the scene. More...
 
virtual ManualObjectcreateManualObject (SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC)
 Create a ManualObject, an object which you populate with geometry manually through a GL immediate-mode style interface. More...
 
virtual MovableObjectcreateMovableObject (const String &typeName, ObjectMemoryManager *objectMemMgr, const NameValuePairList *params=0)
 Create a movable object of the type specified without a name. More...
 
virtual ParticleSystemcreateParticleSystem (const String &templateName)
 Creates a particle system based on a template. More...
 
virtual ParticleSystemcreateParticleSystem (size_t quota=500, const String &resourceGroup=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
 Create a blank particle system. More...
 
virtual PlaneBoundedVolumeListSceneQuerycreatePlaneBoundedVolumeQuery (const PlaneBoundedVolumeList &volumes, uint32 mask=QUERY_ENTITY_DEFAULT_MASK)
 Creates a PlaneBoundedVolumeListSceneQuery for this scene manager. More...
 
virtual RaySceneQuerycreateRayQuery (const Ray &ray, uint32 mask=QUERY_ENTITY_DEFAULT_MASK)
 Creates a RaySceneQuery for this scene manager. More...
 
virtual Rectangle2DcreateRectangle2D (SceneMemoryMgrTypes sceneType=SCENE_STATIC)
 Creates a 2D rectangle that can be displayed for screen space effects or showing a basic GUI. More...
 
virtual v1::RibbonTrailcreateRibbonTrail ()
 Create a RibbonTrail, an object which you can use to render a linked chain of billboards which follows one or more nodes. More...
 
virtual SceneNodecreateSceneNode (SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC)
 Creates an instance of a SceneNode. More...
 
SkeletonInstancecreateSkeletonInstance (const SkeletonDef *skeletonDef)
 Creates an instance of a skeleton based on the given definition. More...
 
virtual SphereSceneQuerycreateSphereQuery (const Sphere &sphere, uint32 mask=QUERY_ENTITY_DEFAULT_MASK)
 Creates a SphereSceneQuery for this scene manager. More...
 
virtual TagPointcreateTagPoint ()
 Creates a TagPoint that can be used like a SceneNode, or be used to be attached to a Bone. More...
 
virtual WireAabbcreateWireAabb ()
 Create an WireAabb. More...
 
void cullLights (Camera *camera, Light::LightTypes startType, Light::LightTypes endType, LightArray &outLights)
 
void defragmentMemoryPools ()
 Triggers on demand a defragmentation of the pools, so that all slots become contiguous in memory. More...
 
virtual void destroyAllAnimations ()
 Removes all animations created using this SceneManager. More...
 
virtual void destroyAllAnimationStates ()
 Removes all animation states created using this SceneManager. More...
 
virtual void destroyAllBillboardChains ()
 Removes & destroys all BillboardChains from the SceneManager. More...
 
virtual void destroyAllBillboardSets ()
 Removes & destroys all BillboardSets. More...
 
virtual void destroyAllCameras ()
 Removes (and destroys) all cameras from the scene. More...
 
virtual void destroyAllDecals ()
 
virtual void destroyAllEntities ()
 Removes & destroys all Entities. More...
 
virtual void destroyAllItems ()
 Removes & destroys all Items. More...
 
virtual void destroyAllLights ()
 Removes and destroys all lights in the scene. More...
 
virtual void destroyAllManualObjects ()
 Removes & destroys all ManualObjects from the SceneManager. More...
 
virtual void destroyAllMovableObjects ()
 Destroy all MovableObjects. More...
 
virtual void destroyAllMovableObjectsByType (const String &typeName)
 Destroy all MovableObjects of a given type. More...
 
virtual void destroyAllParticleSystems ()
 Removes & destroys all ParticleSystems from the SceneManager. More...
 
virtual void destroyAllRectangle2D ()
 Removes & destroys all Rectangle2D. More...
 
virtual void destroyAllRibbonTrails ()
 Removes & destroys all RibbonTrails from the SceneManager. More...
 
virtual void destroyAllWireAabbs ()
 Removes & destroys all WireAabbs. More...
 
virtual void destroyAnimation (const String &name)
 Destroys an Animation. More...
 
virtual void destroyAnimationState (const String &name)
 Destroys an AnimationState. More...
 
virtual void destroyBillboardChain (v1::BillboardChain *obj)
 Removes & destroys a BillboardChain from the SceneManager. More...
 
virtual void destroyBillboardSet (v1::BillboardSet *set)
 Removes & destroys an BillboardSet from the SceneManager. More...
 
virtual void destroyCamera (Camera *cam)
 Removes a camera from the scene. More...
 
virtual void destroyDecal (Decal *decal)
 
virtual void destroyEntity (v1::Entity *ent)
 Removes & destroys an Entity from the SceneManager. More...
 
virtual void destroyItem (Item *item)
 Removes & destroys an Item from the SceneManager. More...
 
virtual void destroyLight (Light *light)
 Removes the light from the scene and destroys it based on a pointer. More...
 
virtual void destroyManualObject (ManualObject *obj)
 Removes & destroys a ManualObject from the SceneManager. More...
 
virtual void destroyMovableObject (MovableObject *m)
 Destroys a MovableObject. More...
 
virtual void destroyMovableObject (MovableObject *m, const String &typeName)
 Destroys a MovableObject with the name specified, of the type specified. More...
 
virtual void destroyParticleSystem (ParticleSystem *obj)
 Removes & destroys a ParticleSystem from the SceneManager. More...
 
virtual void destroyQuery (SceneQuery *query)
 Destroys a scene query of any type. More...
 
virtual void destroyRectangle2D (Rectangle2D *rect)
 Removes & destroys an Entity from the SceneManager. More...
 
virtual void destroyRibbonTrail (v1::RibbonTrail *obj)
 Removes & destroys a RibbonTrail from the SceneManager. More...
 
virtual void destroySceneNode (SceneNode *sn)
 Destroys a SceneNode. More...
 
void destroySkeletonInstance (SkeletonInstance *skeletonInstance)
 Destroys an instance of a skeleton created with createSkeletonInstance(). More...
 
virtual void destroyWireAabb (WireAabb *wireAabb)
 Removes & destroys an WireAabb from the SceneManager. More...
 
void executeUserScalableTask (UniformScalableTask *task, bool bBlock)
 Processes a user-defined UniformScalableTask in the worker threads spawned by SceneManager. More...
 
virtual void extractAllMovableObjectsByType (const String &typeName)
 Extract all injected MovableObjects of a given type. More...
 
virtual void extractMovableObject (MovableObject *m)
 Extract a previously injected MovableObject. More...
 
virtual CamerafindCamera (IdString name) const
 Finds the camera with the given name. More...
 
virtual CamerafindCameraNoThrow (IdString name) const
 Finds the camera with the given name. More...
 
virtual MovableObjectVec findMovableObjects (const String &type, const String &name)
 Finds all the movable objects with the type and name passed as parameters. More...
 
virtual_l1 SceneNodeList findSceneNodes (const String &name) const
 Finds all the scene nodes with the name passed as parameter. More...
 
const Vector3getAmbientLightHemisphereDir () const
 
const ColourValuegetAmbientLightLowerHemisphere () const
 
const ColourValuegetAmbientLightUpperHemisphere () const
 Returns the ambient light level to be used for the scene. More...
 
virtual v1::AnimationgetAnimation (const String &name) const
 Looks up an Animation object previously created with createAnimation. More...
 
AnimationIterator getAnimationIterator ()
 Returns a specialised MapIterator over all animations in the scene. More...
 
const AnimationList & getAnimations () const
 Returns a const version of the animation list. More...
 
virtual v1::AnimationStategetAnimationState (const String &animName) const
 Retrieves animation state as previously created using createAnimationState. More...
 
v1::AnimationStateIterator getAnimationStateIterator ()
 Returns a specialised MapIterator over all animation states in the scene. More...
 
AtmosphereComponentgetAtmosphere ()
 Gets currently set atmosphere. It's never nullptr. More...
 
AtmosphereComponentgetAtmosphereRaw ()
 Gets currently set atmosphere. Can be nullptr if none is set. More...
 
CameraIterator getCameraIterator ()
 Returns a specialised MapIterator over all cameras in the scene. More...
 
const CameraList & getCameras () const
 Returns a const version of the camera list. More...
 
CamerasInProgress getCamerasInProgress () const
 Gets the current camera being rendered (advanced use only, only valid during viewport update. More...
 
const CompositorTextureVecgetCompositorTextures () const
 
const AxisAlignedBoxgetCurrentCastersBox () const
 
const CompositorPassgetCurrentCompositorPass () const
 Note: May be null. More...
 
TextureGpugetCurrentPassDepthTextureNoMsaa () const
 
TextureGpugetCurrentPrePassDepthTexture () const
 
PrePassMode getCurrentPrePassMode () const
 
const TextureGpuVecgetCurrentPrePassTextures () const
 
TextureGpugetCurrentRefractionsTexture () const
 
const CompositorShadowNodegetCurrentShadowNode () const
 
TextureGpugetCurrentSsrTexture () const
 
ViewportgetCurrentViewport0 () const
 Gets the current viewport being rendered (advanced use only, only valid during viewport update. More...
 
TextureGpugetDecalsDiffuse () const
 
TextureGpugetDecalsEmissive () const
 
TextureGpugetDecalsNormals () const
 
RenderSystemgetDestinationRenderSystem ()
 Get the rendersystem subclass to which the output of this Scene Manager gets sent. More...
 
virtual bool getDisplaySceneNodes () const
 Returns true if all scene nodes axis are to be displayed. More...
 
SceneNodegetDummySceneNode () const
 Unlike mNodeMemoryManager->_getDummyNode(), this dummy node is fully allocated, which makes it possible to actually attach objects to this dummy, while we guarantee the dummy won't change its transform. More...
 
uint32 getEnvFeatures () const
 
virtual bool getFindVisibleObjects ()
 Gets whether the SceneManager should search for visible objects, or whether they are being manually handled. More...
 
virtual bool getFlipCullingOnNegativeScale () const
 Get whether to automatically flip the culling mode on objects whenever they are negatively scaled. More...
 
ForwardPlusBasegetForwardPlus ()
 
const LightListInfogetGlobalLightList () const
 
virtual const PlaneListgetLightClippingPlanes (const Light *l)
 Retrieve a set of clipping planes for a given light. More...
 
virtual_l2 uint32 getLightMask () const
 Gets a mask which is bitwise 'and'ed with lights' own light masks to determine if the light should be casting light. More...
 
virtual const RealRectgetLightScissorRect (const Light *l, const Camera *cam)
 Retrieve a scissor rectangle for a given light and camera. More...
 
void getMinMaxDepthRange (const Frustum *shadowMapCamera, Real &outMin, Real &outMax) const
 
virtual MovableObjectIterator getMovableObjectIterator (const String &typeName)
 Get an iterator over all MovableObect instances of a given type. More...
 
const StringgetName () const
 Return the instance name of this SceneManager. More...
 
size_t getNumCompositorTextures () const
 Gets the number of currently active compositor textures. More...
 
size_t getNumWorkerThreads () const
 
virtual bool getOption (const String &strKey, void *pDestValue)
 Method for getting the value of an implementation-specific Scene Manager option. More...
 
virtual bool getOptionKeys (StringVector &refKeys)
 Method for getting all the implementation-specific options of the scene manager. More...
 
virtual bool getOptionValues (const String &strKey, StringVector &refValueList)
 Method for getting all possible values for a specific option. More...
 
RadialDensityMaskgetRadialDensityMask () const
 
Vector3 getRelativeOrigin () const
 Returns the current relative origin. (Only when non-permanent) More...
 
RenderQueuegetRenderQueue () const
 Returns the RenderQueue. More...
 
SceneNodegetRootSceneNode (SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC)
 Gets the SceneNode at the root of the scene hierarchy. More...
 
virtual_l1 SceneNodegetSceneNode (IdType id)
 Retrieves a SceneNode based on it's ID from the scene graph. More...
 
virtual_l1 const SceneNodegetSceneNode (IdType id) const
 
virtual const ColourValuegetShadowColour () const
 Get the colour used to modulate areas in shadow. More...
 
virtual Real getShadowDirectionalLightExtrusionDistance () const
 Gets the distance a shadow volume is extruded for a directional light. More...
 
virtual Real getShadowDirLightTextureOffset () const
 Gets the proportional distance which a texture shadow which is generated from a directional light will be offset into the camera view to make best use of texture space. More...
 
virtual Real getShadowFarDistance () const
 Gets the default maximum distance away from the camera that shadows will be visible. More...
 
virtual Real getShadowFarDistanceSquared () const
 
virtual bool getShowBoundingBoxes () const
 Returns if all bounding boxes of scene nodes are to be displayed. More...
 
Rectangle2DgetSky ()
 
MaterialPtr getSkyMaterial ()
 
SkyMethod getSkyMethod () const
 
const float * getSphericalHarmonics () const
 
virtual ViewPoint getSuggestedViewpoint (bool random=false)
 Asks the SceneManager to provide a suggested viewpoint from which the scene should be viewed. More...
 
virtual const StringgetTypeName () const =0
 Retrieve the type name of this scene manager. More...
 
virtual_l2 uint32 getVisibilityMask () const
 Gets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible. More...
 
virtual bool hasAnimation (const String &name) const
 Returns whether an animation with the given name exists. More...
 
virtual bool hasAnimationState (const String &name) const
 Returns whether an animation state with the given name exists. More...
 
virtual bool hasMovableObject (MovableObject *m)
 Returns if this SceneManager contains the specified MovableObject. More...
 
virtual bool hasOption (const String &strKey) const
 Method for verifying whether the scene manager has an implementation-specific option. More...
 
virtual void injectMovableObject (MovableObject *m)
 Inject a MovableObject instance created externally. More...
 
bool isDecalsDiffuseEmissiveMerged () const
 
bool isSkyEnabled () const
 
bool isUsingInstancedStereo () const
 
void notifyStaticAabbDirty (MovableObject *movableObject)
 Notifies that the given MovableObject is dirty (i.e. More...
 
void notifyStaticDirty (Node *node)
 Notifies that the given Node is dirty (i.e. More...
 
 OGRE_DEPRECATED_VER (3) virtual const ColourValue &getFogColour() const
 Returns the fog colour for the scene. More...
 
 OGRE_DEPRECATED_VER (3) virtual FogMode getFogMode() const
 Returns the fog mode for the scene. More...
 
 OGRE_DEPRECATED_VER (3) virtual Real getFogDensity() const
 Returns the fog density for the scene. More...
 
 OGRE_DEPRECATED_VER (3) virtual Real getFogEnd() const
 Returns the fog end distance for the scene. More...
 
 OGRE_DEPRECATED_VER (3) virtual Real getFogStart() const
 Returns the fog start distance for the scene. More...
 
 OGRE_MUTEX (sceneGraphMutex)
 Mutex to protect the scene graph from simultaneous access from multiple threads. More...
 
virtual void registerSceneNodeListener (SceneNode *sceneNode)
 Node listeners need to be registered with us so that they can be successfully called when calling updateAllTransforms. More...
 
virtual void removeListener (Listener *s)
 Remove a listener. More...
 
void removeLodListener (LodListener *listener)
 Remove a level of detail listener. More...
 
virtual void removeRenderObjectListener (RenderObjectListener *delListener)
 Removes a listener previously added with addRenderObjectListener. More...
 
virtual void removeRenderQueueListener (RenderQueueListener *delListener)
 Removes a listener previously added with addRenderQueueListener. More...
 
void reserveSlotsInGlobalLightList (size_t addSlotsToCapacity=0)
 Allocates required memory in mGlobalLightList. More...
 
void setAmbientLight (const ColourValue &upperHemisphere, const ColourValue &lowerHemisphere, const Vector3 &hemisphereDir, Real envmapScale=1.0f, uint32 envFeatures=0xffffffff)
 Sets the ambient light level to be used for the scene. More...
 
void setBuildLegacyLightList (bool bEnable)
 Enables or disables the legace 1.9 way of building light lists which can be used by HlmsLowLevel materials. More...
 
void setDecalsDiffuse (TextureGpu *tex)
 Sets the decal texture for diffuse. More...
 
void setDecalsEmissive (TextureGpu *tex)
 See SceneManager::setDecalsDiffuse. More...
 
void setDecalsNormals (TextureGpu *tex)
 Sets the decal texture normal maps. More...
 
virtual void setDisplaySceneNodes (bool display)
 Tells the SceneManager whether it should render the SceneNodes which make up the scene as well as the objects in the scene. More...
 
virtual void setFindVisibleObjects (bool find)
 Sets whether the SceneManager should search for visible objects, or whether they are being manually handled. More...
 
virtual void setFlipCullingOnNegativeScale (bool n)
 Set whether to automatically flip the culling mode on objects whenever they are negatively scaled. More...
 
void setFog (FogMode mode=FOG_NONE, const ColourValue &colour=ColourValue::White, Real expDensity=Real(0.001), Real linearStart=Real(0.0), Real linearEnd=Real(1.0))
 Sets the fogging mode applied to the scene. More...
 
void setForward3D (bool bEnable, uint32 width, uint32 height, uint32 numSlices, uint32 lightsPerCell, float minDistance, float maxDistance)
 Enables or disables the Forward3D implementation for using many non-shadowed lights in the scene. More...
 
void setForwardClustered (bool bEnable, uint32 width, uint32 height, uint32 numSlices, uint32 lightsPerCell, uint32 decalsPerCell, uint32 cubemapProbesPerCel, float minDistance, float maxDistance)
 
virtual_l2 void setLightMask (uint32 mask)
 Sets a mask which is bitwise 'and'ed with lights' own light masks to determine if the light should be casting light. More...
 
virtual bool setOption (const String &strKey, const void *pValue)
 Method for setting a specific option of the Scene Manager. More...
 
void setRadialDensityMask (bool bEnabled, const float radius[3])
 Draws a Radial Density Mask to lower the quality around the edges in VR. More...
 
virtual void setRelativeOrigin (const Vector3 &relativeOrigin, bool bPermanent)
 Set whether to use relative offset co-ordinates when rendering, ie offset to subtract to the camera, lights & objects. More...
 
virtual void setShadowColour (const ColourValue &colour)
 Set the colour used to modulate areas in shadow. More...
 
virtual void setShadowDirectionalLightExtrusionDistance (Real dist)
 Sets the distance a shadow volume is extruded for a directional light. More...
 
virtual void setShadowDirLightTextureOffset (Real offset)
 Sets the proportional distance which a texture shadow which is generated from a directional light will be offset into the camera view to make best use of texture space. More...
 
virtual void setShadowFarDistance (Real distance)
 Sets the default maximum distance away from the camera that shadows will be visible. More...
 
virtual void setShadowTextureFadeEnd (Real fadeEnd)
 Sets the proportional distance at which texture shadows finish to fading out. More...
 
virtual void setShadowTextureFadeStart (Real fadeStart)
 Sets the proportional distance at which texture shadows begin to fade out. More...
 
void setSky (bool bEnabled, SkyMethod skyMethod, const String &texName, const String &resourceGroup)
 
void setSky (bool bEnabled, SkyMethod skyMethod, TextureGpu *texture)
 Sets a sky, to use a particular material based on SkyMethod. More...
 
void setSphericalHarmonics (Vector3 ambientSphericalHarmonics[9])
 
virtual_l2 void setVisibilityMask (uint32 vmask)
 Sets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible. More...
 
virtual void showBoundingBoxes (bool bShow)
 Allows all bounding boxes of scene nodes to be displayed. More...
 
void shrinkToFitMemoryPools ()
 Defragments memory, then reallocates a smaller pool that tightly fits the current number of objects. More...
 
virtual void unregisterSceneNodeListener (SceneNode *sceneNode)
 Unregisters a registered node for listening. More...
 
void updateAllAnimations ()
 Updates all skeletal animations in the scene. More...
 
void updateAllBounds (const ObjectMemoryManagerVec &objectMemManager)
 Updates the world aabbs from all entities in the scene. More...
 
void updateAllLods (const Camera *lodCamera, Real lodBias, uint8 firstRq, uint8 lastRq)
 Updates the Lod values of all objects relative to the given camera. More...
 
void updateAllTagPoints ()
 Updates all TagPoints, both TagPoints that are children of bones, and TagPoints that are children of other TagPoints. More...
 
void updateAllTransforms ()
 Updates the derived transforms of all nodes in the scene. More...
 
void updateSceneGraph ()
 Updates the scene: Perform high level culling, Node transforms and entity animations. More...
 
void waitForPendingUserScalableTask ()
 Blocks until the the task from processUserScalableTask finishes. More...
 
- Public Member Functions inherited from Ogre::IdObject
 IdObject (IdType id)
 We don't call generateNewId() here, to prevent objects in the stack (i.e. More...
 
IdType getId () const
 Get the unique id of this object. More...
 
bool operator() (const IdObject &left, const IdObject &right)
 
bool operator() (const IdObject *left, const IdObject *right)
 

Static Public Attributes

static uint32 QUERY_ENTITY_DEFAULT_MASK
 Default query mask for entities. More...
 
static uint32 QUERY_FRUSTUM_DEFAULT_MASK
 Default query mask for frusta and cameras. More...
 
static uint32 QUERY_FX_DEFAULT_MASK
 Default query mask for effects like billboardsets / particle systems. More...
 
static uint32 QUERY_LIGHT_DEFAULT_MASK
 Default query mask for lights. More...
 
static uint32 QUERY_STATICGEOMETRY_DEFAULT_MASK
 Default query mask for StaticGeometry. More...
 

Detailed Description

Manages the organisation and rendering of a 'scene' i.e.

a collection of objects and potentially world geometry.

Remarks
This class defines the interface and the basic behaviour of a 'Scene Manager'. A SceneManager organises the culling and rendering of the scene, in conjunction with the RenderQueue. This class is designed to be extended through subclassing in order to provide more specialised scene organisation structures for particular needs. The default SceneManager culls based on a hierarchy of node bounding boxes, other implementations can use an octree, and many other options. New SceneManager implementations can be added at runtime by plugins, see SceneManagerEnumerator for the interfaces for adding new SceneManager types.
There is a distinction between 'objects' (which subclass MovableObject, and are movable, discrete objects in the world), and 'world geometry', which is large, generally static geometry. World geometry tends to influence the SceneManager organisational structure (e.g. lots of indoor static geometry might result in a spatial tree structure) and as such world geometry is generally tied to a given SceneManager implementation, whilst MovableObject instances can be used with any SceneManager. Subclasses are free to define world geometry however they please.
Multiple SceneManager instances can exist at one time, each one with a distinct scene. Which SceneManager is used to render a scene is dependent on the Camera, which will always call back the SceneManager which created it to render the scene.

Member Typedef Documentation

◆ AnimationIterator

◆ CameraIterator

◆ MovableObjectIterator

◆ MovableObjectVec

◆ SceneNodeList

Member Enumeration Documentation

◆ EnvFeatures

Enumerator
EnvFeatures_DiffuseGiFromReflectionProbe 

Normally environmental cubemap probes are used for specular reflection When this flag is present, the higest mip is used as an approximation for diffuse indirect illumination.

Do not set this flag if you don't want this behavior (i.e. because the diffuse GI is already gathered from another source of information)

◆ IlluminationRenderStage

Describes the stage of rendering when performing complex illumination.

Enumerator
IRS_NONE 

No special illumination stage.

IRS_RENDER_TO_TEXTURE 

Render to texture stage, used for texture based shadows.

◆ PrefabType

Prefab shapes available without loading a model.

Note
Minimal implementation at present.
Enumerator
PT_PLANE 
PT_CUBE 
PT_SPHERE 

◆ SkyMethod

Enumerator
SkyCubemap 
SkyEquirectangular 

Constructor & Destructor Documentation

◆ SceneManager()

Ogre::SceneManager::SceneManager ( const String instanceName,
size_t  numWorkerThreads 
)

Constructor.

◆ ~SceneManager()

virtual Ogre::SceneManager::~SceneManager ( )
virtual

Default destructor.

Member Function Documentation

◆ _addAutotrackingSceneNode()

virtual void Ogre::SceneManager::_addAutotrackingSceneNode ( SceneNode source,
SceneNode target,
const Vector3 offset,
const Vector3 localDirection 
)
virtual

Internal method for notifying the manager that a SceneNode is autotracking.

◆ _addCompositorTexture()

void Ogre::SceneManager::_addCompositorTexture ( IdString  name,
TextureGpu tex 
)

Used by Compositor, tells of which compositor textures active, so Materials can access them.

If MRT, there could be more than one

Parameters
nameName of the texture(s) as referenced in the compositor (may not be the texture's real name in case it's just one)
texThe actual texture(s) associated with that name

◆ _addWireAabb()

void Ogre::SceneManager::_addWireAabb ( WireAabb wireAabb)

◆ _applySceneAnimations()

virtual void Ogre::SceneManager::_applySceneAnimations ( )
virtual

Internal method for applying animations to scene nodes.

Remarks
Uses the internally stored AnimationState objects to apply animation to SceneNodes.

◆ _areRenderStateChangesSuppressed()

virtual bool Ogre::SceneManager::_areRenderStateChangesSuppressed ( ) const
inlinevirtual

Are render state changes suppressed?

See also
_suppressRenderStateChanges

◆ _calculateCurrentCastersBox()

AxisAlignedBox Ogre::SceneManager::_calculateCurrentCastersBox ( uint32  viewportVisibilityMask,
uint8  firstRq,
uint8  lastRq 
) const

◆ _collectForwardPlusObjects()

bool Ogre::SceneManager::_collectForwardPlusObjects ( const Camera camera)

Returns true if collection code was run.

When false, you cannot trust the contents of _getTmpVisibleObjectsList to be empty

◆ _createCubemapProbe()

virtual InternalCubemapProbe* Ogre::SceneManager::_createCubemapProbe ( SceneMemoryMgrTypes  sceneType)
virtual

◆ _createSceneNode()

virtual SceneNode* Ogre::SceneManager::_createSceneNode ( SceneNode parent,
NodeMemoryManager nodeMemoryManager 
)
virtual
See also
createSceneNode. This functions exists to satisfy
SceneNode::createChildImpl Don't call this function directly
Parent to the scene node we're creating.

◆ _createTagPoint()

virtual TagPoint* Ogre::SceneManager::_createTagPoint ( SceneNode parent,
NodeMemoryManager nodeMemoryManager 
)
virtual

Don't call this function directly.

See also
TagPoint::createChildTagPoint

◆ _cullPhase01()

virtual void Ogre::SceneManager::_cullPhase01 ( Camera cullCamera,
Camera renderCamera,
const Camera lodCamera,
uint8  firstRq,
uint8  lastRq,
bool  reuseCullData 
)
virtual

Performs the frustum culling that will later be needed by _renderPhase02.

Remarks
See CompositorShadowNode to understand why rendering is split in two phases
Parameters
cameraPointer to a camera from whose viewpoint the scene is to be rendered.
vpThe target viewport
firstRqfirst render queue ID to render (gets clamped if too big)
lastRqlast render queue ID to render (gets clamped if too big)

◆ _destroyAllCubemapProbes()

virtual void Ogre::SceneManager::_destroyAllCubemapProbes ( )
virtual

◆ _destroyCubemapProbe()

virtual void Ogre::SceneManager::_destroyCubemapProbe ( InternalCubemapProbe probe)
virtual

◆ _frameEnded()

void Ogre::SceneManager::_frameEnded ( )

Called when the frame has fully ended (ALL passes have been executed to all RTTs)

◆ _getActivePassForwardPlus()

ForwardPlusBase* Ogre::SceneManager::_getActivePassForwardPlus ( )
inline

◆ _getAutoParamDataSource()

AutoParamDataSource* Ogre::SceneManager::_getAutoParamDataSource ( ) const
inline

◆ _getCombinedVisibilityMask()

uint32 Ogre::SceneManager::_getCombinedVisibilityMask ( ) const

Internal method for getting the combination between the global visibility mask and the per-viewport visibility mask.

◆ _getCurrentRenderStage()

IlluminationRenderStage Ogre::SceneManager::_getCurrentRenderStage ( ) const
inline

◆ _getEntityMemoryManager()

ObjectMemoryManager& Ogre::SceneManager::_getEntityMemoryManager ( SceneMemoryMgrTypes  sceneType)
inline

Retrieves the main entity memory manager.

Remarks
Some Scene Managers may have more than one memory manager (e.g. one per octant in an Octree implementation). At end of scene graph update the scene manager may move the object created with the main memory manager into another another one.

◆ _getLightMemoryManager()

ObjectMemoryManager& Ogre::SceneManager::_getLightMemoryManager ( )
inline

◆ _getNodeMemoryManager()

NodeMemoryManager& Ogre::SceneManager::_getNodeMemoryManager ( SceneMemoryMgrTypes  sceneType)
inline

◆ _getTagPointNodeMemoryManager()

NodeMemoryManager& Ogre::SceneManager::_getTagPointNodeMemoryManager ( )
inline

◆ _getTmpVisibleObjectsList()

VisibleObjectsPerThreadArray& Ogre::SceneManager::_getTmpVisibleObjectsList ( )
inline
See also
mTmpVisibleObjects

◆ _handleLodEvents()

void Ogre::SceneManager::_handleLodEvents ( )

Handle LOD events.

◆ _markGpuParamsDirty()

virtual void Ogre::SceneManager::_markGpuParamsDirty ( uint16  mask)
virtual

Method to allow you to mark gpu parameters as dirty, causing them to be updated according to the mask that you set when updateGpuProgramParameters is next called.

Only really useful if you're controlling parameter state in inner rendering loop callbacks.

Parameters
maskSome combination of GpuParamVariability which is bitwise OR'ed with the current dirty state.

◆ _notifyEntityMaterialLodChanged()

void Ogre::SceneManager::_notifyEntityMaterialLodChanged ( EntityMaterialLodChangedEvent evt)

Notify that an entity material LOD change event has occurred.

◆ _notifyEntityMeshLodChanged()

void Ogre::SceneManager::_notifyEntityMeshLodChanged ( EntityMeshLodChangedEvent evt)

Notify that an entity mesh LOD change event has occurred.

◆ _notifyMovableObjectLodChanged()

void Ogre::SceneManager::_notifyMovableObjectLodChanged ( MovableObjectLodChangedEvent evt)

Notify that a movable object LOD change event has occurred.

◆ _pauseRendering()

virtual RenderContext* Ogre::SceneManager::_pauseRendering ( )
virtual

Pause rendering of the frame.

This has to be called when inside a renderScene call (Usually using a listener of some sort)

◆ _releaseManualHardwareResources()

virtual void Ogre::SceneManager::_releaseManualHardwareResources ( )
virtual

Notifies the scene manager that hardware resources were lost.

Remarks
Called automatically by RenderSystem if hardware resources were lost and can not be restored using some internal mechanism. Among affected resources are manual meshes without loaders, manual textures without loaders, ManualObjects, etc.

◆ _removeAutotrackingSceneNode()

virtual void Ogre::SceneManager::_removeAutotrackingSceneNode ( SceneNode source)
virtual

◆ _removeCompositorTextures()

void Ogre::SceneManager::_removeCompositorTextures ( size_t  from)

Removes all compositor textures from 'from' to end.

◆ _removeSkeletonDef()

void Ogre::SceneManager::_removeSkeletonDef ( const SkeletonDef skeletonDef)

Removes a skeleton definition from its memory manager.

◆ _removeWireAabb()

void Ogre::SceneManager::_removeWireAabb ( WireAabb wireAabb)

◆ _renderPhase02()

virtual void Ogre::SceneManager::_renderPhase02 ( Camera camera,
const Camera lodCamera,
uint8  firstRq,
uint8  lastRq,
bool  includeOverlays 
)
virtual

Prompts the class to send its contents to the renderer.

Remarks
This method prompts the scene manager to send the contents of the scene it manages to the rendering pipeline. You must have called _cullPhase01 before calling this function. Note that this method is not normally called directly by the user application; it is called automatically by the Ogre rendering loop.
Parameters
cameraPointer to a camera from whose viewpoint the scene is to be rendered.
lodCameraPointer to a camera from whose LOD calculations will be based upon. Can't be null; can be equal to camera.
vpThe target viewport
firstRqfirst render queue ID to render (gets clamped if too big)
lastRqlast render queue ID to render (gets clamped if too big)
includeOverlaysWhether or not overlay objects should be rendered

◆ _renderSingleObject()

virtual void Ogre::SceneManager::_renderSingleObject ( Renderable pRend,
const MovableObject pMovableObject,
bool  casterPass,
bool  dualParaboloid 
)
virtual

◆ _restoreManualHardwareResources()

virtual void Ogre::SceneManager::_restoreManualHardwareResources ( )
virtual

Notifies the scene manager that hardware resources should be restored.

Remarks
Called automatically by RenderSystem if hardware resources were lost and can not be restored using some internal mechanism. Among affected resources are manual meshes without loaders, manual textures without loaders, ManualObjects, etc.

◆ _resumeRendering()

virtual void Ogre::SceneManager::_resumeRendering ( RenderContext context)
virtual

Resume rendering of the frame.

This has to be called after a _pauseRendering call

Parameters
contextThe rendring context, as returned by the _pauseRendering call

◆ _setAtmosphere()

void Ogre::SceneManager::_setAtmosphere ( AtmosphereComponent atmosphere)

Sets an external atmosphere provider.

Multiple SceneManagers can have the same atmosphere

Remarks
The AtmosphereComponent will call this function. Don't call it directly.
Parameters
atmosphereThe atmosphere to set. Can be nullptr to unset (a default dummy ptr will be set instead).

◆ _setCamerasInProgress()

void Ogre::SceneManager::_setCamerasInProgress ( const CamerasInProgress cameras)
inline

◆ _setCurrentCompositorPass()

void Ogre::SceneManager::_setCurrentCompositorPass ( CompositorPass pass)

◆ _setCurrentRenderStage()

void Ogre::SceneManager::_setCurrentRenderStage ( IlluminationRenderStage  stage)
inline

◆ _setCurrentShadowNode()

void Ogre::SceneManager::_setCurrentShadowNode ( CompositorShadowNode shadowNode)

◆ _setDestinationRenderSystem()

virtual void Ogre::SceneManager::_setDestinationRenderSystem ( RenderSystem sys)
virtual

Notifies the scene manager of its destination render system.

Remarks
Called automatically by RenderSystem::addSceneManager this method simply notifies the manager of the render system to which its output must be directed.
Parameters
sysPointer to the RenderSystem subclass to be used as a render target.

◆ _setForwardPlusEnabledInPass()

void Ogre::SceneManager::_setForwardPlusEnabledInPass ( bool  bEnable)

For internal use.

See also
CompositorPassSceneDef::mEnableForwardPlus

◆ _setLightCullingVisibility()

void Ogre::SceneManager::_setLightCullingVisibility ( Camera camera,
bool  collectLights,
bool  isCubemap 
)

◆ _setPrePassMode()

void Ogre::SceneManager::_setPrePassMode ( PrePassMode  mode,
const TextureGpuVec prepassTextures,
TextureGpu prepassDepthTexture,
TextureGpu ssrTexture 
)

For internal use.

See also
CompositorPassSceneDef::mPrePassMode

◆ _setRefractions()

void Ogre::SceneManager::_setRefractions ( TextureGpu depthTextureNoMsaa,
TextureGpu refractionsTexture 
)

◆ _suppressRenderStateChanges()

virtual void Ogre::SceneManager::_suppressRenderStateChanges ( bool  suppress)
virtual

Indicates to the SceneManager whether it should suppress changing the RenderSystem states when rendering objects.

Remarks
This method allows you to tell the SceneManager not to change any RenderSystem state until you tell it to. This method is only intended for advanced use, don't use it if you're unsure of the effect. The only RenderSystems calls made are to set the world matrix for each object (note - view an projection matrices are NOT SET - they are under your control) and to render the object; it is up to the caller to do everything else, including enabling any vertex / fragment programs and updating their parameter state, and binding parameters to the RenderSystem.
Note
Calling this implicitly disables shadow processing since no shadows can be rendered without changing state.
Parameters
suppressIf true, no RenderSystem state changes will be issued until this method is called again with a parameter of false.

◆ _updateWorkerThread()

unsigned long Ogre::SceneManager::_updateWorkerThread ( ThreadHandle threadHandle)

Called from the worker thread, polls to process frustum culling requests when a sync is performed.

◆ _warmUpShaders()

void Ogre::SceneManager::_warmUpShaders ( Camera camera,
uint32_t  visibilityMask,
uint8  firstRq,
uint8  lastRq 
)

◆ addListener()

virtual void Ogre::SceneManager::addListener ( Listener s)
virtual

Add a listener which will get called back on scene manager events.

◆ addLodListener()

void Ogre::SceneManager::addLodListener ( LodListener listener)

Add a level of detail listener.

◆ addRenderObjectListener()

virtual void Ogre::SceneManager::addRenderObjectListener ( RenderObjectListener newListener)
virtual

Registers a new Render Object Listener which will be notified when rendering an object.

◆ addRenderQueueListener()

virtual void Ogre::SceneManager::addRenderQueueListener ( RenderQueueListener newListener)
virtual

Registers a new RenderQueueListener which will be notified when render queues are processed.

◆ clearFrameData()

void Ogre::SceneManager::clearFrameData ( )

Clears temporary buffers and other data that needs to live every frame.

◆ clearScene()

virtual void Ogre::SceneManager::clearScene ( bool  deleteIndestructibleToo,
bool  reattachCameras = true 
)
virtual

Empties the entire scene, inluding all SceneNodes, Entities, Lights, BillboardSets etc.

Cameras are not deleted at this stage since they are still referenced by viewports, which are not destroyed during this process.

Remarks
When an indestructible SceneNode has a destructible parent, the parent will be destroyed and thus the former SceneNode will be parent-less, i.e. be at the same level as root. Note that parent-less SceneNodes can still render to the scene (this behavior is different from Ogre 1.x)
Parameters
deleteIndestructibleTooIf a node is marked as indestructible, it won't be deleted unless deleteIndestructibleToo is marked as true. Note that some Ogre compoenents mark some of their objects as internal to prevent them from becoming dangling pointers.

If you don't know what to put here, set it to false.

Parameters
reattachCamerasWhen true, all Cameras that have no parent node after clearing will be reattached to the root node.

◆ createAABBQuery()

virtual AxisAlignedBoxSceneQuery* Ogre::SceneManager::createAABBQuery ( const AxisAlignedBox box,
uint32  mask = QUERY_ENTITY_DEFAULT_MASK 
)
virtual

Creates an AxisAlignedBoxSceneQuery for this scene manager.

Remarks
This method creates a new instance of a query object for this scene manager, for an axis aligned box region. See SceneQuery and AxisAlignedBoxSceneQuery for full details.
The instance returned from this method must be destroyed by calling SceneManager::destroyQuery when it is no longer required.
Parameters
boxDetails of the box which describes the region for this query.
maskThe query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details.

◆ createAnimation()

virtual v1::Animation* Ogre::SceneManager::createAnimation ( const String name,
Real  length 
)
virtual

Creates an animation which can be used to animate scene nodes.

Remarks
An animation is a collection of 'tracks' which over time change the position / orientation of Node objects. In this case, the animation will likely have tracks to modify the position / orientation of SceneNode objects, e.g. to make objects move along a path.
You don't need to use an Animation object to move objects around - you can do it yourself using the methods of the Node in your FrameListener class. However, when you need relatively complex scripted animation, this is the class to use since it will interpolate between keyframes for you and generally make the whole process easier to manage.
A single animation can affect multiple Node objects (each AnimationTrack affects a single Node). In addition, through animation blending a single Node can be affected by multiple animations, athough this is more useful when performing skeletal animation (see Skeleton::createAnimation).
Note that whilst it uses the same classes, the animations created here are kept separate from the skeletal animations of meshes (each Skeleton owns those animations).
Parameters
nameThe name of the animation, must be unique within this SceneManager.
lengthThe total length of the animation.

◆ createAnimationState()

virtual v1::AnimationState* Ogre::SceneManager::createAnimationState ( const String animName)
virtual

Create an AnimationState object for managing application of animations.

Remarks
You can create Animation objects for animating SceneNode obejcts using the createAnimation method. However, in order to actually apply those animations you have to call methods on Node and Animation in a particular order (namely Node::resetToInitialState and Animation::apply). To make this easier and to help track the current time position of animations, the AnimationState object is provided. So if you don't want to control animation application manually, call this method, update the returned object as you like every frame and let SceneManager apply the animation state for you.
Remember, AnimationState objects are disabled by default at creation time. Turn them on when you want them using their setEnabled method.
Note that any SceneNode affected by this automatic animation will have it's state reset to it's initial position before application of the animation. Unless specifically modified using Node::setInitialState the Node assumes it's initial state is at the origin. If you want the base state of the SceneNode to be elsewhere, make your changes to the node using the standard transform methods, then call setInitialState to 'bake' this reference position into the node.
If the target of your animation is to be a generic AnimableValue, you should ensure that it has a base value set (unlike nodes this has no default).
See also
AnimableValue::setAsBaseValue.
Parameters
animNameThe name of an animation created already with createAnimation.

◆ createBillboardChain()

virtual v1::BillboardChain* Ogre::SceneManager::createBillboardChain ( )
virtual

Create a BillboardChain, an object which you can use to render a linked chain of billboards.

◆ createBillboardSet()

virtual v1::BillboardSet* Ogre::SceneManager::createBillboardSet ( unsigned int  poolSize = 20,
SceneMemoryMgrTypes  sceneType = SCENE_DYNAMIC 
)
virtual

Creates a new BillboardSet for use with this scene manager.

Remarks
This method creates a new BillboardSet which is registered with the SceneManager. The SceneManager will destroy this object when it shuts down or when the SceneManager::clearScene method is called, so the caller does not have to worry about destroying this object (in fact, it definitely should not do this).
See the BillboardSet documentations for full details of the returned class.
Parameters
poolSizeThe initial size of the pool of billboards (see BillboardSet for more information)
See also
BillboardSet

◆ createCamera()

virtual Camera* Ogre::SceneManager::createCamera ( const String name,
bool  notShadowCaster = true,
bool  forCubemapping = false 
)
virtual

Creates a camera to be managed by this scene manager.

Remarks
This camera is automatically added to the scene by being attached to the Root Scene Node before returning. If you want to use your own SceneNode for this camera, you'll have to detach it first (can be done via camera->detachFromParent();)
Parameters
nameName to give the new camera. Must be unique.
notShadowCasterTrue if this camera should be considered when creating the global light list of culled lights against all cameras. For example, cameras used for shadow mapping shouldn't be taken into account (set to false)
forCubemappingTrue this camera will be used at least once in one of its passes as a cubemap (thus having to change the orientation but not position mid-rendering)

◆ createDecal()

virtual Decal* Ogre::SceneManager::createDecal ( SceneMemoryMgrTypes  sceneType = SCENE_DYNAMIC)
virtual

◆ createEntity() [1/3]

virtual v1::Entity* Ogre::SceneManager::createEntity ( const String meshName,
const String groupName = ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME,
SceneMemoryMgrTypes  sceneType = SCENE_DYNAMIC 
)
virtual

Create an Entity (instance of a discrete mesh).

Parameters
meshNameThe name of the Mesh it is to be based on (e.g. 'knot.oof'). The mesh will be loaded if it is not already.

◆ createEntity() [2/3]

virtual v1::Entity* Ogre::SceneManager::createEntity ( const v1::MeshPtr pMesh,
SceneMemoryMgrTypes  sceneType = SCENE_DYNAMIC 
)
virtual

Create an Entity (instance of a discrete mesh).

Parameters
pMeshThe pointer to the Mesh it is to be based on.

◆ createEntity() [3/3]

virtual v1::Entity* Ogre::SceneManager::createEntity ( PrefabType  ptype,
SceneMemoryMgrTypes  sceneType = SCENE_DYNAMIC 
)
virtual

Create an Entity (instance of a discrete mesh) from a range of prefab shapes.

Parameters
ptypeThe prefab type.

◆ createIntersectionQuery()

virtual IntersectionSceneQuery* Ogre::SceneManager::createIntersectionQuery ( uint32  mask = QUERY_ENTITY_DEFAULT_MASK)
virtual

Creates an IntersectionSceneQuery for this scene manager.

Remarks
This method creates a new instance of a query object for locating intersecting objects. See SceneQuery and IntersectionSceneQuery for full details.
The instance returned from this method must be destroyed by calling SceneManager::destroyQuery when it is no longer required.
Parameters
maskThe query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details.

◆ createItem() [1/2]

virtual Item* Ogre::SceneManager::createItem ( const MeshPtr pMesh,
SceneMemoryMgrTypes  sceneType = SCENE_DYNAMIC 
)
virtual

Create an Item (instance of a discrete mesh).

Parameters
pMeshThe pointer to the Mesh it is to be based on.

◆ createItem() [2/2]

virtual Item* Ogre::SceneManager::createItem ( const String meshName,
const String groupName = ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME,
SceneMemoryMgrTypes  sceneType = SCENE_DYNAMIC,
bool  bUseMeshMat = true 
)
virtual

Create an Item (instance of a discrete mesh).

Parameters
meshNameThe name of the Mesh it is to be based on (e.g. 'knot.oof'). The mesh will be loaded if it is not already.

◆ createLight()

virtual Light* Ogre::SceneManager::createLight ( )
virtual

Creates a light for use in the scene.

Remarks
The direction and position of a light is managed via the scene node it is attached to. Make sure that you have attached the light to a scene node (SceneNode::attachObject) before* calling Light::setDirection or Light::setPosition.

◆ createManualObject()

virtual ManualObject* Ogre::SceneManager::createManualObject ( SceneMemoryMgrTypes  sceneType = SCENE_DYNAMIC)
virtual

Create a ManualObject, an object which you populate with geometry manually through a GL immediate-mode style interface.

◆ createMovableObject()

virtual MovableObject* Ogre::SceneManager::createMovableObject ( const String typeName,
ObjectMemoryManager objectMemMgr,
const NameValuePairList params = 0 
)
virtual

Create a movable object of the type specified without a name.

Remarks
This is the generalised form of MovableObject creation where you can create a MovableObject of any specialised type generically, including any new types registered using plugins. The name is generated automatically.
Parameters
typeNameThe type of object to create
objectMemMgrMemory Manager that will hold ObjectData data.
paramsOptional name/value pair list to give extra parameters to the created object.

◆ createParticleSystem() [1/2]

virtual ParticleSystem* Ogre::SceneManager::createParticleSystem ( const String templateName)
virtual

Creates a particle system based on a template.

Remarks
This method creates a new ParticleSystem instance based on the named template (defined through ParticleSystemManager::createTemplate) and returns a pointer to the caller. The caller should not delete this object, it will be freed at system shutdown, or can be released earlier using the destroyParticleSystem method.
Each system created from a template takes the template's settings at the time of creation, but is completely separate from the template from there on.
Creating a particle system does not make it a part of the scene. As with other MovableObject subclasses, a ParticleSystem is not rendered until it is attached to a SceneNode.
This is probably the more useful particle system creation method since it does not require manual setup of the system. Note that the initial quota is based on the template but may be changed later.
Parameters
templateNameThe name of the template to base the new instance on.

◆ createParticleSystem() [2/2]

virtual ParticleSystem* Ogre::SceneManager::createParticleSystem ( size_t  quota = 500,
const String resourceGroup = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME 
)
virtual

Create a blank particle system.

Remarks
This method creates a new, blank ParticleSystem instance and returns a pointer to it. The caller should not delete this object, it will be freed at system shutdown, or can be released earlier using the destroyParticleSystem method.
The instance returned from this method won't actually do anything because on creation a particle system has no emitters. The caller should manipulate the instance through it's ParticleSystem methods to actually create a real particle effect.
Creating a particle system does not make it a part of the scene. As with other MovableObject subclasses, a ParticleSystem is not rendered until it is attached to a SceneNode.
Parameters
quotaThe maximum number of particles to allow in this system.
resourceGroupThe resource group which will be used to load dependent resources

◆ createPlaneBoundedVolumeQuery()

virtual PlaneBoundedVolumeListSceneQuery* Ogre::SceneManager::createPlaneBoundedVolumeQuery ( const PlaneBoundedVolumeList volumes,
uint32  mask = QUERY_ENTITY_DEFAULT_MASK 
)
virtual

Creates a PlaneBoundedVolumeListSceneQuery for this scene manager.

Remarks
This method creates a new instance of a query object for this scene manager, for a region enclosed by a set of planes (normals pointing inwards). See SceneQuery and PlaneBoundedVolumeListSceneQuery for full details.
The instance returned from this method must be destroyed by calling SceneManager::destroyQuery when it is no longer required.
Parameters
volumesDetails of the volumes which describe the region for this query.
maskThe query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details.

◆ createRayQuery()

virtual RaySceneQuery* Ogre::SceneManager::createRayQuery ( const Ray ray,
uint32  mask = QUERY_ENTITY_DEFAULT_MASK 
)
virtual

Creates a RaySceneQuery for this scene manager.

Remarks
This method creates a new instance of a query object for this scene manager, looking for objects which fall along a ray. See SceneQuery and RaySceneQuery for full details.
The instance returned from this method must be destroyed by calling SceneManager::destroyQuery when it is no longer required.
Parameters
rayDetails of the ray which describes the region for this query.
maskThe query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details.

◆ createRectangle2D()

virtual Rectangle2D* Ogre::SceneManager::createRectangle2D ( SceneMemoryMgrTypes  sceneType = SCENE_STATIC)
virtual

Creates a 2D rectangle that can be displayed for screen space effects or showing a basic GUI.

Notice that due to engine's requirements, you need to attach this object to a scene node in order to be rendered correctly.

You can use the Root scene node. However if you're planning on also using setRelativeOrigin, beware that this would break the permanent setting and you should then use a dummy scene node for your rectangles.
Remarks
The Rectangle2D will request to use identity view and projection matrices, but only low level materials will honour that request. PBS shaders will ignore it (thus the rectangle will be drawn in 3D space) and other Hlms types may work differently and you'll have to check its documentation.
Parameters
sceneTypeWhether you will be moving the Rectangle2D's scene node around. Unless you're planning to use this Rectangle2D for 3D purposes, it is highly recomended that you use SCENE_STATIC (you can safely use SCENE_STATIC and change Rectangle2D::setCorners and Rectangle2D::setNormal every frame).
Returns
The Rectangle2D.

◆ createRibbonTrail()

virtual v1::RibbonTrail* Ogre::SceneManager::createRibbonTrail ( )
virtual

Create a RibbonTrail, an object which you can use to render a linked chain of billboards which follows one or more nodes.

◆ createSceneNode()

virtual SceneNode* Ogre::SceneManager::createSceneNode ( SceneMemoryMgrTypes  sceneType = SCENE_DYNAMIC)
virtual

Creates an instance of a SceneNode.

Remarks
Note that this does not add the SceneNode to the scene hierarchy. This method is for convenience, since it allows an instance to be created for which the SceneManager is responsible for allocating and releasing memory, which is convenient in complex scenes.
To include the returned SceneNode in the scene, use the addChild method of the SceneNode which is to be it's parent.
Note that this method takes no parameters, and the node created is unnamed (it is actually given a generated name, which you can retrieve if you want). If you wish to create a node with a specific name, call the alternative method which takes a name parameter.
Parameters
sceneTypeDynamic if this node is to be updated frequently. Static if you don't plan to be updating this node in a long time (performance optimization).

◆ createSkeletonInstance()

SkeletonInstance* Ogre::SceneManager::createSkeletonInstance ( const SkeletonDef skeletonDef)

Creates an instance of a skeleton based on the given definition.

◆ createSphereQuery()

virtual SphereSceneQuery* Ogre::SceneManager::createSphereQuery ( const Sphere sphere,
uint32  mask = QUERY_ENTITY_DEFAULT_MASK 
)
virtual

Creates a SphereSceneQuery for this scene manager.

Remarks
This method creates a new instance of a query object for this scene manager, for a spherical region. See SceneQuery and SphereSceneQuery for full details.
The instance returned from this method must be destroyed by calling SceneManager::destroyQuery when it is no longer required.
Parameters
sphereDetails of the sphere which describes the region for this query.
maskThe query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details.

◆ createTagPoint()

virtual TagPoint* Ogre::SceneManager::createTagPoint ( )
virtual

Creates a TagPoint that can be used like a SceneNode, or be used to be attached to a Bone.

See also
Bone::addTagPoint

◆ createWireAabb()

virtual WireAabb* Ogre::SceneManager::createWireAabb ( )
virtual

Create an WireAabb.

◆ cullLights()

void Ogre::SceneManager::cullLights ( Camera camera,
Light::LightTypes  startType,
Light::LightTypes  endType,
LightArray outLights 
)

◆ defragmentMemoryPools()

void Ogre::SceneManager::defragmentMemoryPools ( )

Triggers on demand a defragmentation of the pools, so that all slots become contiguous in memory.

ArrayMemoryManager::destroySlot already does this when the number of fragmented slots reaches mCleanupThreshold

◆ destroyAllAnimations()

virtual void Ogre::SceneManager::destroyAllAnimations ( )
virtual

Removes all animations created using this SceneManager.

◆ destroyAllAnimationStates()

virtual void Ogre::SceneManager::destroyAllAnimationStates ( )
virtual

Removes all animation states created using this SceneManager.

◆ destroyAllBillboardChains()

virtual void Ogre::SceneManager::destroyAllBillboardChains ( )
virtual

Removes & destroys all BillboardChains from the SceneManager.

◆ destroyAllBillboardSets()

virtual void Ogre::SceneManager::destroyAllBillboardSets ( )
virtual

Removes & destroys all BillboardSets.

Warning
Again, use caution since no BillboardSet must be referred to elsewhere e.g. attached to a SceneNode otherwise a crash is likely. Use clearScene if you are unsure (it clears SceneNode entries too.)
See also
SceneManager::clearScene

◆ destroyAllCameras()

virtual void Ogre::SceneManager::destroyAllCameras ( )
virtual

Removes (and destroys) all cameras from the scene.

Remarks
Some cameras are internal created to dealing with texture shadow, or compositor nodes. They aren't supposed to be destroyed outside. So, while you are using texture shadow, don't call this method.

◆ destroyAllDecals()

virtual void Ogre::SceneManager::destroyAllDecals ( )
virtual

◆ destroyAllEntities()

virtual void Ogre::SceneManager::destroyAllEntities ( )
virtual

Removes & destroys all Entities.

Warning
Again, use caution since no Entity must be referred to elsewhere e.g. attached to a SceneNode otherwise a crash is likely. Use clearScene if you are unsure (it clears SceneNode entries too.)
See also
SceneManager::clearScene

◆ destroyAllItems()

virtual void Ogre::SceneManager::destroyAllItems ( )
virtual

Removes & destroys all Items.

◆ destroyAllLights()

virtual void Ogre::SceneManager::destroyAllLights ( )
virtual

Removes and destroys all lights in the scene.

◆ destroyAllManualObjects()

virtual void Ogre::SceneManager::destroyAllManualObjects ( )
virtual

Removes & destroys all ManualObjects from the SceneManager.

◆ destroyAllMovableObjects()

virtual void Ogre::SceneManager::destroyAllMovableObjects ( )
virtual

Destroy all MovableObjects.

◆ destroyAllMovableObjectsByType()

virtual void Ogre::SceneManager::destroyAllMovableObjectsByType ( const String typeName)
virtual

Destroy all MovableObjects of a given type.

◆ destroyAllParticleSystems()

virtual void Ogre::SceneManager::destroyAllParticleSystems ( )
virtual

Removes & destroys all ParticleSystems from the SceneManager.

◆ destroyAllRectangle2D()

virtual void Ogre::SceneManager::destroyAllRectangle2D ( )
virtual

Removes & destroys all Rectangle2D.

Warning
Again, use caution since no Rectangle2D must be referred to elsewhere otherwise a crash is likely. Use clearScene if you are unsure (it clears SceneNode entries too.)
See also
SceneManager::clearScene

◆ destroyAllRibbonTrails()

virtual void Ogre::SceneManager::destroyAllRibbonTrails ( )
virtual

Removes & destroys all RibbonTrails from the SceneManager.

◆ destroyAllWireAabbs()

virtual void Ogre::SceneManager::destroyAllWireAabbs ( )
virtual

Removes & destroys all WireAabbs.

◆ destroyAnimation()

virtual void Ogre::SceneManager::destroyAnimation ( const String name)
virtual

Destroys an Animation.

Remarks
You should ensure that none of your code is referencing this animation objects since the memory will be freed.

◆ destroyAnimationState()

virtual void Ogre::SceneManager::destroyAnimationState ( const String name)
virtual

Destroys an AnimationState.

Remarks
You should ensure that none of your code is referencing this animation state object since the memory will be freed.

◆ destroyBillboardChain()

virtual void Ogre::SceneManager::destroyBillboardChain ( v1::BillboardChain obj)
virtual

Removes & destroys a BillboardChain from the SceneManager.

◆ destroyBillboardSet()

virtual void Ogre::SceneManager::destroyBillboardSet ( v1::BillboardSet set)
virtual

Removes & destroys an BillboardSet from the SceneManager.

Warning
Must only be done if the BillboardSet is not attached to a SceneNode. It may be safer to wait to clear the whole scene. If you are unsure, use clearScene.

◆ destroyCamera()

virtual void Ogre::SceneManager::destroyCamera ( Camera cam)
virtual

Removes a camera from the scene.

Remarks
This method removes a previously added camera from the scene. The camera is deleted so the caller must ensure no references to it's previous instance (e.g. in a SceneNode) are used.
Parameters
camPointer to the camera to remove

◆ destroyDecal()

virtual void Ogre::SceneManager::destroyDecal ( Decal decal)
virtual

◆ destroyEntity()

virtual void Ogre::SceneManager::destroyEntity ( v1::Entity ent)
virtual

Removes & destroys an Entity from the SceneManager.

Warning
Must only be done if the Entity is not attached to a SceneNode. It may be safer to wait to clear the whole scene if you are unsure use clearScene.
See also
SceneManager::clearScene

◆ destroyItem()

virtual void Ogre::SceneManager::destroyItem ( Item item)
virtual

Removes & destroys an Item from the SceneManager.

◆ destroyLight()

virtual void Ogre::SceneManager::destroyLight ( Light light)
virtual

Removes the light from the scene and destroys it based on a pointer.

Remarks
Any pointers held to this light after calling this method will be invalid.

◆ destroyManualObject()

virtual void Ogre::SceneManager::destroyManualObject ( ManualObject obj)
virtual

Removes & destroys a ManualObject from the SceneManager.

◆ destroyMovableObject() [1/2]

virtual void Ogre::SceneManager::destroyMovableObject ( MovableObject m)
virtual

Destroys a MovableObject.

Remarks
The MovableObject will automatically detach itself from any nodes on destruction.

◆ destroyMovableObject() [2/2]

virtual void Ogre::SceneManager::destroyMovableObject ( MovableObject m,
const String typeName 
)
virtual

Destroys a MovableObject with the name specified, of the type specified.

Remarks
The MovableObject will automatically detach itself from any nodes on destruction.

◆ destroyParticleSystem()

virtual void Ogre::SceneManager::destroyParticleSystem ( ParticleSystem obj)
virtual

Removes & destroys a ParticleSystem from the SceneManager.

◆ destroyQuery()

virtual void Ogre::SceneManager::destroyQuery ( SceneQuery query)
virtual

Destroys a scene query of any type.

◆ destroyRectangle2D()

virtual void Ogre::SceneManager::destroyRectangle2D ( Rectangle2D rect)
virtual

Removes & destroys an Entity from the SceneManager.

Warning
It may be safer to wait to clear the whole scene if you are unsure use clearScene.
See also
SceneManager::clearScene

◆ destroyRibbonTrail()

virtual void Ogre::SceneManager::destroyRibbonTrail ( v1::RibbonTrail obj)
virtual

Removes & destroys a RibbonTrail from the SceneManager.

◆ destroySceneNode()

virtual void Ogre::SceneManager::destroySceneNode ( SceneNode sn)
virtual

Destroys a SceneNode.

Remarks
This allows you to physically delete an individual SceneNode if you want to. Note that this is not normally recommended, it's better to allow SceneManager to delete the nodes when the scene is cleared.

◆ destroySkeletonInstance()

void Ogre::SceneManager::destroySkeletonInstance ( SkeletonInstance skeletonInstance)

Destroys an instance of a skeleton created with createSkeletonInstance().

◆ destroyWireAabb()

virtual void Ogre::SceneManager::destroyWireAabb ( WireAabb wireAabb)
virtual

Removes & destroys an WireAabb from the SceneManager.

◆ executeUserScalableTask()

void Ogre::SceneManager::executeUserScalableTask ( UniformScalableTask task,
bool  bBlock 
)

Processes a user-defined UniformScalableTask in the worker threads spawned by SceneManager.

Remarks
If 'bBlock' is false, it is user responsibility to call waitForPendingUserScalableTask before the next call to either processUserScalableTask or renderOneFrame.
Parameters
taskTask to perform. Pointer must be valid at least until the task is finished
bBlockTrue if you want the function to block until the task is done. False if you want to do something in between, in this case you MUST call waitForPendingUserScalableTask later.

◆ extractAllMovableObjectsByType()

virtual void Ogre::SceneManager::extractAllMovableObjectsByType ( const String typeName)
virtual

Extract all injected MovableObjects of a given type.

Remarks
Essentially this does the same as destroyAllMovableObjectsByType, but only removes the instances from the internal lists, it does not attempt to destroy them.

◆ extractMovableObject()

virtual void Ogre::SceneManager::extractMovableObject ( MovableObject m)
virtual

Extract a previously injected MovableObject.

Remarks
Essentially this does the same as destroyMovableObject, but only removes the instance from the internal lists, it does not attempt to destroy it.

◆ findCamera()

virtual Camera* Ogre::SceneManager::findCamera ( IdString  name) const
virtual

Finds the camera with the given name.

Throws if not found.

Parameters
nameHash of the name of the camera to find
Returns
Camera pointer

◆ findCameraNoThrow()

virtual Camera* Ogre::SceneManager::findCameraNoThrow ( IdString  name) const
virtual

Finds the camera with the given name.

Returns null pointer if not found.

Parameters
nameHash of the name of the camera to find
Returns
Camera pointer. Null if not found.

◆ findMovableObjects()

virtual MovableObjectVec Ogre::SceneManager::findMovableObjects ( const String type,
const String name 
)
virtual

Finds all the movable objects with the type and name passed as parameters.

◆ findSceneNodes()

virtual_l1 SceneNodeList Ogre::SceneManager::findSceneNodes ( const String name) const

Finds all the scene nodes with the name passed as parameter.

◆ getAmbientLightHemisphereDir()

const Vector3& Ogre::SceneManager::getAmbientLightHemisphereDir ( ) const
inline

◆ getAmbientLightLowerHemisphere()

const ColourValue& Ogre::SceneManager::getAmbientLightLowerHemisphere ( ) const
inline

◆ getAmbientLightUpperHemisphere()

const ColourValue& Ogre::SceneManager::getAmbientLightUpperHemisphere ( ) const
inline

Returns the ambient light level to be used for the scene.

◆ getAnimation()

virtual v1::Animation* Ogre::SceneManager::getAnimation ( const String name) const
virtual

Looks up an Animation object previously created with createAnimation.

Note
Throws an exception if the named instance does not exist

◆ getAnimationIterator()

AnimationIterator Ogre::SceneManager::getAnimationIterator ( )
inline

Returns a specialised MapIterator over all animations in the scene.

◆ getAnimations()

const AnimationList& Ogre::SceneManager::getAnimations ( ) const
inline

Returns a const version of the animation list.

◆ getAnimationState()

virtual v1::AnimationState* Ogre::SceneManager::getAnimationState ( const String animName) const
virtual

Retrieves animation state as previously created using createAnimationState.

Note
Throws an exception if the named instance does not exist

◆ getAnimationStateIterator()

v1::AnimationStateIterator Ogre::SceneManager::getAnimationStateIterator ( )
inline

Returns a specialised MapIterator over all animation states in the scene.

◆ getAtmosphere()

AtmosphereComponent* Ogre::SceneManager::getAtmosphere ( )
inline

Gets currently set atmosphere. It's never nullptr.

◆ getAtmosphereRaw()

AtmosphereComponent* Ogre::SceneManager::getAtmosphereRaw ( )

Gets currently set atmosphere. Can be nullptr if none is set.

◆ getCameraIterator()

CameraIterator Ogre::SceneManager::getCameraIterator ( )
inline

Returns a specialised MapIterator over all cameras in the scene.

◆ getCameras()

const CameraList& Ogre::SceneManager::getCameras ( ) const
inline

Returns a const version of the camera list.

◆ getCamerasInProgress()

CamerasInProgress Ogre::SceneManager::getCamerasInProgress ( ) const
inline

Gets the current camera being rendered (advanced use only, only valid during viewport update.

◆ getCompositorTextures()

const CompositorTextureVec& Ogre::SceneManager::getCompositorTextures ( ) const
inline
See also
CompositorPassDef::mExposedTextures for the textures that are available in the current compositor pass. The compositor script keyword is "expose".

◆ getCurrentCastersBox()

const AxisAlignedBox& Ogre::SceneManager::getCurrentCastersBox ( ) const
See also
CompositorShadowNode::getCastersBox
Remarks
Returns a null box if no active shadow node.

◆ getCurrentCompositorPass()

const CompositorPass* Ogre::SceneManager::getCurrentCompositorPass ( ) const
inline

Note: May be null.

◆ getCurrentPassDepthTextureNoMsaa()

TextureGpu* Ogre::SceneManager::getCurrentPassDepthTextureNoMsaa ( ) const
inline

◆ getCurrentPrePassDepthTexture()

TextureGpu* Ogre::SceneManager::getCurrentPrePassDepthTexture ( ) const
inline

◆ getCurrentPrePassMode()

PrePassMode Ogre::SceneManager::getCurrentPrePassMode ( ) const
inline

◆ getCurrentPrePassTextures()

const TextureGpuVec& Ogre::SceneManager::getCurrentPrePassTextures ( ) const
inline

◆ getCurrentRefractionsTexture()

TextureGpu* Ogre::SceneManager::getCurrentRefractionsTexture ( ) const
inline

◆ getCurrentShadowNode()

const CompositorShadowNode* Ogre::SceneManager::getCurrentShadowNode ( ) const
inline

◆ getCurrentSsrTexture()

TextureGpu* Ogre::SceneManager::getCurrentSsrTexture ( ) const
inline

◆ getCurrentViewport0()

Viewport* Ogre::SceneManager::getCurrentViewport0 ( ) const
inline

Gets the current viewport being rendered (advanced use only, only valid during viewport update.

◆ getDecalsDiffuse()

TextureGpu* Ogre::SceneManager::getDecalsDiffuse ( ) const
inline

◆ getDecalsEmissive()

TextureGpu* Ogre::SceneManager::getDecalsEmissive ( ) const
inline

◆ getDecalsNormals()

TextureGpu* Ogre::SceneManager::getDecalsNormals ( ) const
inline

◆ getDestinationRenderSystem()

RenderSystem* Ogre::SceneManager::getDestinationRenderSystem ( )

Get the rendersystem subclass to which the output of this Scene Manager gets sent.

◆ getDisplaySceneNodes()

virtual bool Ogre::SceneManager::getDisplaySceneNodes ( ) const
inlinevirtual

Returns true if all scene nodes axis are to be displayed.

◆ getDummySceneNode()

SceneNode* Ogre::SceneManager::getDummySceneNode ( ) const
inline

Unlike mNodeMemoryManager->_getDummyNode(), this dummy node is fully allocated, which makes it possible to actually attach objects to this dummy, while we guarantee the dummy won't change its transform.

◆ getEnvFeatures()

uint32 Ogre::SceneManager::getEnvFeatures ( ) const
inline

◆ getFindVisibleObjects()

virtual bool Ogre::SceneManager::getFindVisibleObjects ( )
inlinevirtual

Gets whether the SceneManager should search for visible objects, or whether they are being manually handled.

◆ getFlipCullingOnNegativeScale()

virtual bool Ogre::SceneManager::getFlipCullingOnNegativeScale ( ) const
inlinevirtual

Get whether to automatically flip the culling mode on objects whenever they are negatively scaled.

◆ getForwardPlus()

ForwardPlusBase* Ogre::SceneManager::getForwardPlus ( )
inline

◆ getGlobalLightList()

const LightListInfo& Ogre::SceneManager::getGlobalLightList ( ) const
inline

◆ getLightClippingPlanes()

virtual const PlaneList& Ogre::SceneManager::getLightClippingPlanes ( const Light l)
virtual

Retrieve a set of clipping planes for a given light.

◆ getLightMask()

virtual_l2 uint32 Ogre::SceneManager::getLightMask ( ) const
inline

Gets a mask which is bitwise 'and'ed with lights' own light masks to determine if the light should be casting light.

◆ getLightScissorRect()

virtual const RealRect& Ogre::SceneManager::getLightScissorRect ( const Light l,
const Camera cam 
)
virtual

Retrieve a scissor rectangle for a given light and camera.

◆ getMinMaxDepthRange()

void Ogre::SceneManager::getMinMaxDepthRange ( const Frustum shadowMapCamera,
Real outMin,
Real outMax 
) const
See also
CompositorShadowNode::getMinMaxDepthRange
Remarks
Outputs 0 & 100000 if no active shadow node or camera not found.

◆ getMovableObjectIterator()

virtual MovableObjectIterator Ogre::SceneManager::getMovableObjectIterator ( const String typeName)
virtual

Get an iterator over all MovableObect instances of a given type.

Note
The iterator returned from this method is not thread safe, do not use this if you are creating or deleting objects of this type in another thread.

◆ getName()

const String& Ogre::SceneManager::getName ( ) const
inline

Return the instance name of this SceneManager.

◆ getNumCompositorTextures()

size_t Ogre::SceneManager::getNumCompositorTextures ( ) const
inline

Gets the number of currently active compositor textures.

◆ getNumWorkerThreads()

size_t Ogre::SceneManager::getNumWorkerThreads ( ) const
inline

◆ getOption()

virtual bool Ogre::SceneManager::getOption ( const String strKey,
void *  pDestValue 
)
inlinevirtual

Method for getting the value of an implementation-specific Scene Manager option.

Parameters
strKeyThe name of the option
pDestValueA pointer to a memory location where the value will be copied. Currently, the memory will be allocated by the scene manager, but this may change
Returns
On success, true is returned and pDestValue points to the value of the given option.
On failure, false is returned and pDestValue is set to NULL.

◆ getOptionKeys()

virtual bool Ogre::SceneManager::getOptionKeys ( StringVector refKeys)
inlinevirtual

Method for getting all the implementation-specific options of the scene manager.

Parameters
refKeysA reference to a list that will be filled with all the available options.
Returns
On success, true is returned. On failure, false is returned.

◆ getOptionValues()

virtual bool Ogre::SceneManager::getOptionValues ( const String strKey,
StringVector refValueList 
)
inlinevirtual

Method for getting all possible values for a specific option.

When this list is too large (i.e. the option expects, for example, a float), the return value will be true, but the list will contain just one element whose size will be set to 0. Otherwise, the list will be filled with all the possible values the option can accept.

Parameters
strKeyThe name of the option to get the values for.
refValueListA reference to a list that will be filled with the available values.
Returns
On success (the option exists), true is returned.
On failure, false is returned.

◆ getRadialDensityMask()

RadialDensityMask* Ogre::SceneManager::getRadialDensityMask ( ) const
inline

◆ getRelativeOrigin()

Vector3 Ogre::SceneManager::getRelativeOrigin ( ) const

Returns the current relative origin. (Only when non-permanent)

◆ getRenderQueue()

RenderQueue* Ogre::SceneManager::getRenderQueue ( ) const
inline

Returns the RenderQueue.

◆ getRootSceneNode()

SceneNode* Ogre::SceneManager::getRootSceneNode ( SceneMemoryMgrTypes  sceneType = SCENE_DYNAMIC)

Gets the SceneNode at the root of the scene hierarchy.

Remarks
The entire scene is held as a hierarchy of nodes, which allows things like relative transforms, general changes in rendering state etc (See the SceneNode class for more info). In this basic SceneManager class, the application using Ogre is free to structure this hierarchy however it likes, since it has no real significance apart from making transforms relative to each node (more specialised subclasses will provide utility methods for building specific node structures e.g. loading a BSP tree).
However, in all cases there is only ever one root node of the hierarchy, and this method returns a pointer to it. There is actually an extra Root Node so that static objects can be attached to it. Note however, static nodes can be children of a dynamic root node.

◆ getSceneNode() [1/2]

virtual_l1 SceneNode* Ogre::SceneManager::getSceneNode ( IdType  id)

Retrieves a SceneNode based on it's ID from the scene graph.

Remarks
Note
Returns null if the ID does not exist
It is a linear search O(N), retrieves the first node found with that name (it's not unique)

◆ getSceneNode() [2/2]

virtual_l1 const SceneNode* Ogre::SceneManager::getSceneNode ( IdType  id) const

◆ getShadowColour()

virtual const ColourValue& Ogre::SceneManager::getShadowColour ( ) const
virtual

Get the colour used to modulate areas in shadow.

Remarks
This is only applicable for shadow techniques which involve darkening the area in shadow, as opposed to masking out the light. This colour provided is used as a modulative value to darken the areas.

◆ getShadowDirectionalLightExtrusionDistance()

virtual Real Ogre::SceneManager::getShadowDirectionalLightExtrusionDistance ( ) const
virtual

Gets the distance a shadow volume is extruded for a directional light.

◆ getShadowDirLightTextureOffset()

virtual Real Ogre::SceneManager::getShadowDirLightTextureOffset ( ) const
inlinevirtual

Gets the proportional distance which a texture shadow which is generated from a directional light will be offset into the camera view to make best use of texture space.

◆ getShadowFarDistance()

virtual Real Ogre::SceneManager::getShadowFarDistance ( ) const
inlinevirtual

Gets the default maximum distance away from the camera that shadows will be visible.

◆ getShadowFarDistanceSquared()

virtual Real Ogre::SceneManager::getShadowFarDistanceSquared ( ) const
inlinevirtual

◆ getShowBoundingBoxes()

virtual bool Ogre::SceneManager::getShowBoundingBoxes ( ) const
virtual

Returns if all bounding boxes of scene nodes are to be displayed.

◆ getSky()

Rectangle2D* Ogre::SceneManager::getSky ( )
inline

◆ getSkyMaterial()

MaterialPtr Ogre::SceneManager::getSkyMaterial ( )
inline

◆ getSkyMethod()

SkyMethod Ogre::SceneManager::getSkyMethod ( ) const
inline

◆ getSphericalHarmonics()

const float* Ogre::SceneManager::getSphericalHarmonics ( ) const
inline

◆ getSuggestedViewpoint()

virtual ViewPoint Ogre::SceneManager::getSuggestedViewpoint ( bool  random = false)
virtual

Asks the SceneManager to provide a suggested viewpoint from which the scene should be viewed.

Remarks
Typically this method returns the origin unless a) world geometry has been loaded using SceneManager::setWorldGeometry and b) that world geometry has suggested 'start' points. If there is more than one viewpoint which the scene manager can suggest, it will always suggest the first one unless the random parameter is true.
Parameters
randomIf true, and there is more than one possible suggestion, a random one will be used. If false the same one will always be suggested.
Returns
On success, true is returned.
On failure, false is returned.

◆ getTypeName()

virtual const String& Ogre::SceneManager::getTypeName ( ) const
pure virtual

Retrieve the type name of this scene manager.

Remarks
This method has to be implemented by subclasses. It should return the type name of this SceneManager which agrees with the type name of the SceneManagerFactory which created it.

Implemented in Ogre::DefaultSceneManager.

◆ getVisibilityMask()

virtual_l2 uint32 Ogre::SceneManager::getVisibilityMask ( ) const
inline

Gets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible.

◆ hasAnimation()

virtual bool Ogre::SceneManager::hasAnimation ( const String name) const
virtual

Returns whether an animation with the given name exists.

◆ hasAnimationState()

virtual bool Ogre::SceneManager::hasAnimationState ( const String name) const
virtual

Returns whether an animation state with the given name exists.

◆ hasMovableObject()

virtual bool Ogre::SceneManager::hasMovableObject ( MovableObject m)
virtual

Returns if this SceneManager contains the specified MovableObject.

◆ hasOption()

virtual bool Ogre::SceneManager::hasOption ( const String strKey) const
inlinevirtual

Method for verifying whether the scene manager has an implementation-specific option.

Parameters
strKeyThe name of the option to check for.
Returns
If the scene manager contains the given option, true is returned.
Remarks
If it does not, false is returned.

◆ injectMovableObject()

virtual void Ogre::SceneManager::injectMovableObject ( MovableObject m)
virtual

Inject a MovableObject instance created externally.

Remarks
This method 'injects' a MovableObject instance created externally into the MovableObject instance registry held in the SceneManager. You might want to use this if you have a MovableObject which you don't want to register a factory for; for example a MovableObject which cannot be generally constructed by clients.
Note
It is important that the MovableObject has a unique name for the type, and that its getMovableType() method returns a proper type name.

◆ isDecalsDiffuseEmissiveMerged()

bool Ogre::SceneManager::isDecalsDiffuseEmissiveMerged ( ) const

◆ isSkyEnabled()

bool Ogre::SceneManager::isSkyEnabled ( ) const
inline

◆ isUsingInstancedStereo()

bool Ogre::SceneManager::isUsingInstancedStereo ( ) const

◆ notifyStaticAabbDirty()

void Ogre::SceneManager::notifyStaticAabbDirty ( MovableObject movableObject)

Notifies that the given MovableObject is dirty (i.e.

the AABBs have changed). Note that the parent SceneNodes of this/these objects are not updated and you will have to call

See also
notifyStaticDirty on the SceneNode if the position/rotation/scale have changed.

◆ notifyStaticDirty()

void Ogre::SceneManager::notifyStaticDirty ( Node node)

Notifies that the given Node is dirty (i.e.

the position, orientation and/or scale has changed). The call will cascade to all children of the input node.

Remarks
Implies a call to
See also
notifyStaticAabbDirty if the node or any of its children has a MovableObject attached.
Calling notifyStaticDirty( getRootSceneNode( SCENE_STATIC ) ) should flush the entire static system. It might be slower, but it is useful when you're witnessing artifacts after making changes to the static environment and don't know for sure which objects need to be updated.

◆ OGRE_DEPRECATED_VER() [1/5]

Ogre::SceneManager::OGRE_DEPRECATED_VER ( ) const &

Returns the fog colour for the scene.

◆ OGRE_DEPRECATED_VER() [2/5]

Ogre::SceneManager::OGRE_DEPRECATED_VER ( ) const

Returns the fog mode for the scene.

◆ OGRE_DEPRECATED_VER() [3/5]

Ogre::SceneManager::OGRE_DEPRECATED_VER ( ) const

Returns the fog density for the scene.

◆ OGRE_DEPRECATED_VER() [4/5]

Ogre::SceneManager::OGRE_DEPRECATED_VER ( ) const

Returns the fog end distance for the scene.

◆ OGRE_DEPRECATED_VER() [5/5]

Ogre::SceneManager::OGRE_DEPRECATED_VER ( ) const

Returns the fog start distance for the scene.

◆ OGRE_MUTEX()

Ogre::SceneManager::OGRE_MUTEX ( sceneGraphMutex  )

Mutex to protect the scene graph from simultaneous access from multiple threads.

Remarks
If you are updating the scene in a separate thread from the rendering thread, then you should lock this mutex before making any changes to the scene graph - that means creating, modifying or deleting a scene node, or attaching / detaching objects. It is your responsibility to take out this lock, the detail methods on the nodes will not do it for you (for the reasons discussed below).
Note that locking this mutex will prevent the scene being rendered until it is unlocked again. Therefore you should do this sparingly. Try to create any objects you need separately and fully prepare them before doing all your scene graph work in one go, thus keeping this lock for the shortest time possible.
Note
A single global lock is used rather than a per-node lock since it keeps the number of locks required during rendering down to a minimum. Obtaining a lock, even if there is no contention, is not free so for performance it is good to do it as little as possible. Since modifying the scene in a separate thread is a fairly rare occurrence (relative to rendering), it is better to keep the locking required during rendering lower than to make update locks more granular.

◆ registerSceneNodeListener()

virtual void Ogre::SceneManager::registerSceneNodeListener ( SceneNode sceneNode)
virtual

Node listeners need to be registered with us so that they can be successfully called when calling updateAllTransforms.

See also
updateAllTransforms

◆ removeListener()

virtual void Ogre::SceneManager::removeListener ( Listener s)
virtual

Remove a listener.

◆ removeLodListener()

void Ogre::SceneManager::removeLodListener ( LodListener listener)

Remove a level of detail listener.

Remarks
Do not call from inside an LodListener callback method.

◆ removeRenderObjectListener()

virtual void Ogre::SceneManager::removeRenderObjectListener ( RenderObjectListener delListener)
virtual

Removes a listener previously added with addRenderObjectListener.

◆ removeRenderQueueListener()

virtual void Ogre::SceneManager::removeRenderQueueListener ( RenderQueueListener delListener)
virtual

Removes a listener previously added with addRenderQueueListener.

◆ reserveSlotsInGlobalLightList()

void Ogre::SceneManager::reserveSlotsInGlobalLightList ( size_t  addSlotsToCapacity = 0)

Allocates required memory in mGlobalLightList.

◆ setAmbientLight()

void Ogre::SceneManager::setAmbientLight ( const ColourValue upperHemisphere,
const ColourValue lowerHemisphere,
const Vector3 hemisphereDir,
Real  envmapScale = 1.0f,
uint32  envFeatures = 0xffffffff 
)

Sets the ambient light level to be used for the scene.

Remarks
Ambient lighting is a cheap fake to compensate the lack of global illumination. Hemisphere ambient lighting will set the final ambient light to the following formula: float w = dot( objNormal, hemisphereDir ) * 0.5 + 0.5; finalAmbient = lerp( lowerHemisphere, upperHemisphere, w );

Setting upperHemisphere = lowerHemisphere is effectively a traditional fixed-colour ambient light.

Tip: Set the upperHemisphere to a cold colour (e.g. blueish sky) and lowerHemisphere to a warm colour (e.g. sun-yellowish, orange) and the hemisphereDir in the opposite direction of your main directional light for a convincing look.
By default the ambient light in the scene is ColourValue::Black, i.e. no ambient light. This means that any objects rendered with a Material which has lighting enabled (see Material::setLightingEnabled) will not be visible unless you have some dynamic lights in your scene.
For compatibility reasons with legacy (e.g. low level materials) upperHemisphere's colour is the old ambient colour from 1.x
Parameters
upperHemisphereAmbient colour when the surface normal is close to hemisphereDir
lowerHemisphereAmbient colour when the surface normal is pointing away from hemisphereDir
hemisphereDirHemisphere's direction reference to compare the surface normal to. The internal vector will be normalized.
envmapScaleGlobal scale to apply to all environment maps (for relevant Hlms implementations, like PBS). The value will be stored in upperHemisphere.a Use 1.0 to disable.
envFeaturesBitmask. See SceneManager::EnvFeatures

◆ setBuildLegacyLightList()

void Ogre::SceneManager::setBuildLegacyLightList ( bool  bEnable)

Enables or disables the legace 1.9 way of building light lists which can be used by HlmsLowLevel materials.

This light list can be turned on regardless of any Forward* mode but it consumes a lot of performance and is only used by HlmsLowLevel materials that need ligting.

◆ setDecalsDiffuse()

void Ogre::SceneManager::setDecalsDiffuse ( TextureGpu tex)

Sets the decal texture for diffuse.

Should be a RGBA8 or similar colour format.

Remarks
If the emissive texture (see SceneManager::setDecalsEmissive) is the same as the diffuse, Hlms can perform a performance optimization and use fewer texture slots.

You still need to enable a Forward+ solution that supports decals, such as SceneManager::setForwardClusted; otherwise decals won't be rendered.

Parameters
texNull pointer to disable diffuse texture for all decals, globablly.

◆ setDecalsEmissive()

void Ogre::SceneManager::setDecalsEmissive ( TextureGpu tex)

See SceneManager::setDecalsDiffuse.

Setting this texture to the same as diffuse incurs in a performance optimization.

◆ setDecalsNormals()

void Ogre::SceneManager::setDecalsNormals ( TextureGpu tex)

Sets the decal texture normal maps.

Should be RG8_SNORM or BC5_SNORM.

See also
SceneManager::setDecalsDiffuse
Parameters
texNull pointer to disable normal map textures for all decals, globally.

◆ setDisplaySceneNodes()

virtual void Ogre::SceneManager::setDisplaySceneNodes ( bool  display)
virtual

Tells the SceneManager whether it should render the SceneNodes which make up the scene as well as the objects in the scene.

Remarks
This method is mainly for debugging purposes. If you set this to 'true', each node will be rendered as a set of 3 axes to allow you to easily see the orientation of the nodes.

◆ setFindVisibleObjects()

virtual void Ogre::SceneManager::setFindVisibleObjects ( bool  find)
inlinevirtual

Sets whether the SceneManager should search for visible objects, or whether they are being manually handled.

Remarks
This is an advanced function, you should not use this unless you know what you are doing.

◆ setFlipCullingOnNegativeScale()

virtual void Ogre::SceneManager::setFlipCullingOnNegativeScale ( bool  n)
inlinevirtual

Set whether to automatically flip the culling mode on objects whenever they are negatively scaled.

Remarks
Negativelyl scaling an object has the effect of flipping the triangles, so the culling mode should probably be inverted to deal with this. If you would prefer to manually manage this, set this option to 'false' and use different materials with Pass::setCullingMode set manually as needed.

◆ setFog()

void Ogre::SceneManager::setFog ( FogMode  mode = FOG_NONE,
const ColourValue colour = ColourValue::White,
Real  expDensity = Real(0.001),
Real  linearStart = Real(0.0),
Real  linearEnd = Real(1.0) 
)

Sets the fogging mode applied to the scene.

Deprecated in favour of Atmosphere component. See AtmosphereNpr::setSky.

Remarks
This method sets up the scene-wide fogging effect. These settings apply to all geometry rendered, UNLESS the material with which it is rendered has it's own fog settings (see Material::setFog).
Parameters
modeSet up the mode of fog as described in the FogMode enum, or set to FOG_NONE to turn off.
colourThe colour of the fog. Either set this to the same as your viewport background colour, or to blend in with a skydome or skybox.
expDensityThe density of the fog in FOG_EXP or FOG_EXP2 mode, as a value between 0 and 1. The default is 0.001.
linearStartDistance in world units at which linear fog starts to encroach. Only applicable if mode is FOG_LINEAR.
linearEndDistance in world units at which linear fog becomes completely opaque. Only applicable if mode is FOG_LINEAR.

◆ setForward3D()

void Ogre::SceneManager::setForward3D ( bool  bEnable,
uint32  width,
uint32  height,
uint32  numSlices,
uint32  lightsPerCell,
float  minDistance,
float  maxDistance 
)

Enables or disables the Forward3D implementation for using many non-shadowed lights in the scene.

See the Forward3D sample for more information.

Remarks
The Hlms implementation must support this feature in order to work. Calling this function can recreate resources (even if called multiple times with the same exact paramters). Don't do it often.
Parameters
bEnableTrue to enable it. False to disable it.
widthThe width of the view-space grid. Recommended value is 4 unless numSlices is very small.
heightThe height of the view-space grid. Recommended value is 4 unless numSlices is very small.
numSlicesThe number of slices. Each additional slice consumes much more memory. The width and height is doubled on each slice. It's like mipmapping but on reverse.
lightsPerCellThe maximum number of lights a cell in the grid can hold.
decalsPerCellMaximum number of decals a cell in the grid can hold. 0 to disable decals.
minDistanceBias towards the camera for grid.
maxDistanceHow far the grid array can go.

◆ setForwardClustered()

void Ogre::SceneManager::setForwardClustered ( bool  bEnable,
uint32  width,
uint32  height,
uint32  numSlices,
uint32  lightsPerCell,
uint32  decalsPerCell,
uint32  cubemapProbesPerCel,
float  minDistance,
float  maxDistance 
)

◆ setLightMask()

virtual_l2 void Ogre::SceneManager::setLightMask ( uint32  mask)
inline

Sets a mask which is bitwise 'and'ed with lights' own light masks to determine if the light should be casting light.

Remarks
Note that this is combined with any per-pass light mask through an 'and' operation.
See also
CompositorPassSceneDef::mLightVisibilityMask
Viewport::getLightVisibilityMask

◆ setOption()

virtual bool Ogre::SceneManager::setOption ( const String strKey,
const void *  pValue 
)
inlinevirtual

Method for setting a specific option of the Scene Manager.

These options are usually specific for a certain implemntation of the Scene Manager class, and may (and probably will) not exist across different implementations.

Parameters
strKeyThe name of the option to set
pValueA pointer to the value - the size should be calculated by the scene manager based on the key
Returns
On success, true is returned.
On failure, false is returned.

◆ setRadialDensityMask()

void Ogre::SceneManager::setRadialDensityMask ( bool  bEnabled,
const float  radius[3] 
)

Draws a Radial Density Mask to lower the quality around the edges in VR.

Remarks
You can control the order in which this RDM appears (to actually work as an optimization it must be the first thing being rendered!) and its visibility flags by calling:
RadialDensityMask *rdm = sceneManager->getRadialDensityMask()
rdm->getRectangle()->setRenderQueueGroup( rqId )
rdm->getRectangle()->setRenderQueueSubGroup( rqSubGroupId )
rdm->getRectangle()->setVisibilityFlags( mask )
Parameters
bEnabled
radiusThree sets of radiuses in clip space (i.e. in range [0; 1]) around each eye's center All pixels inside radius[0] are rendered at full rate All pixels between radius[0] & radius[1] are masked at half rate All pixels between radius[1] & radius[2] are masked at quarter rate All pixels beyond radius[2] are masked at 1/16th rate

◆ setRelativeOrigin()

virtual void Ogre::SceneManager::setRelativeOrigin ( const Vector3 relativeOrigin,
bool  bPermanent 
)
virtual

Set whether to use relative offset co-ordinates when rendering, ie offset to subtract to the camera, lights & objects.

Remarks
This is a technique to alleviate some of the precision issues associated with rendering far from the origin, where single-precision floats as used in most GPUs begin to lose their precision. The origin "translates" to this new relativeOffset. Any previous non-permanent origin is overriden
All that this function performs is just offseting the root scene node, and as such, will force to update the static nodes as well. Call this at a low frequency (i.e. when camera has gone too far from origin)
Note
If you need this option, you will probably also need to enable double-precision mode in Ogre (OGRE_DOUBLE_PRECISION), since even though this will alleviate the rendering precision, the source camera and object positions will still suffer from precision issues leading to jerky movement.
Parameters
bPermanentWhen false, it only affects the root nodes (static & dynamic) so that everything is shifted by the relative origin, causing world & view matrices to contain smaller values. This improves the quality of skeletal animations and "Z fighting"-like artifacts because vertices don't snap to the right place. However, it won't fix the jittering of objects observed while translating them by small increments, including camera movement.

Setting this value to true will force the SceneManager to propagate the change as much as possible to child nodes (including attached Cameras), causing the change to become permanent/irreversible. This achieves greater quality since translating objects or camera by small amounts now gets more accuracy.

See also
propagateRelativeOrigin.

◆ setShadowColour()

virtual void Ogre::SceneManager::setShadowColour ( const ColourValue colour)
virtual

Set the colour used to modulate areas in shadow.

Remarks
This is only applicable for shadow techniques which involve darkening the area in shadow, as opposed to masking out the light. This colour provided is used as a modulative value to darken the areas.

◆ setShadowDirectionalLightExtrusionDistance()

virtual void Ogre::SceneManager::setShadowDirectionalLightExtrusionDistance ( Real  dist)
virtual

Sets the distance a shadow volume is extruded for a directional light.

Remarks
Although directional lights are essentially infinite, there are many reasons to limit the shadow extrusion distance to a finite number, not least of which is compatibility with older cards (which do not support infinite positions), and shadow caster elimination.
The default value is 10,000 world units. This does not apply to point lights or spotlights, since they extrude up to their attenuation range.

◆ setShadowDirLightTextureOffset()

virtual void Ogre::SceneManager::setShadowDirLightTextureOffset ( Real  offset)
inlinevirtual

Sets the proportional distance which a texture shadow which is generated from a directional light will be offset into the camera view to make best use of texture space.

Remarks
When generating a shadow texture from a directional light, an approximation is used since it is not possible to render the entire scene to one texture. The texture is projected onto an area centred on the camera, and is the shadow far distance * 2 in length (it is square). This wastes a lot of texture space outside the frustum though, so this offset allows you to move the texture in front of the camera more. However, be aware that this can cause a little shadow 'jittering' during rotation, and that if you move it too far then you'll start to get artefacts close to the camera. The value is represented as a proportion of the shadow far distance, and the default is 0.6.

◆ setShadowFarDistance()

virtual void Ogre::SceneManager::setShadowFarDistance ( Real  distance)
virtual

Sets the default maximum distance away from the camera that shadows will be visible.

You have to call this function before you create lights or the default distance of zero will be used.

Remarks
Shadow techniques can be expensive, therefore it is a good idea to limit them to being rendered close to the camera if possible, and to skip the expense of rendering shadows for distance objects. This method allows you to set the distance at which shadows will no longer be rendered.
Note
Each shadow technique can interpret this subtely differently. For example, one technique may use this to eliminate casters, another might use it to attenuate the shadows themselves. You should tweak this value to suit your chosen shadow technique and scene setup.

◆ setShadowTextureFadeEnd()

virtual void Ogre::SceneManager::setShadowTextureFadeEnd ( Real  fadeEnd)
inlinevirtual

Sets the proportional distance at which texture shadows finish to fading out.

Remarks
To hide the edges where texture shadows end (in directional lights) Ogre will fade out the shadow in the distance. This value is a proportional distance of the entire shadow visibility distance at which the shadow is completely invisible. The default is 0.9.

◆ setShadowTextureFadeStart()

virtual void Ogre::SceneManager::setShadowTextureFadeStart ( Real  fadeStart)
inlinevirtual

Sets the proportional distance at which texture shadows begin to fade out.

Remarks
To hide the edges where texture shadows end (in directional lights) Ogre will fade out the shadow in the distance. This value is a proportional distance of the entire shadow visibility distance at which the shadow begins to fade out. The default is 0.7

◆ setSky() [1/2]

void Ogre::SceneManager::setSky ( bool  bEnabled,
SkyMethod  skyMethod,
const String texName,
const String resourceGroup 
)

◆ setSky() [2/2]

void Ogre::SceneManager::setSky ( bool  bEnabled,
SkyMethod  skyMethod,
TextureGpu texture 
)

Sets a sky, to use a particular material based on SkyMethod.

Remarks
You can control the order in which the sky appears (for best performance render the sky LAST i.e. after all opaque objects, but before transparent objects).

You can control the order of the sky and its visibility flags by calling:

Rectangle2D *sky = sceneManager->getSky()
sky->setRenderQueueGroup( rqId )
sky->setRenderQueueSubGroup( rqSubGroupId )
sky->setVisibilityFlags( mask )
Parameters
bEnabled
skyMethod
texture

◆ setSphericalHarmonics()

void Ogre::SceneManager::setSphericalHarmonics ( Vector3  ambientSphericalHarmonics[9])

◆ setVisibilityMask()

virtual_l2 void Ogre::SceneManager::setVisibilityMask ( uint32  vmask)
inline

Sets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible.

Remarks
Note that this is combined with any per-viewport visibility mask through an 'and' operation.
See also
Viewport::setVisibilityMask

References Ogre::VisibilityFlags::RESERVED_VISIBILITY_FLAGS.

◆ showBoundingBoxes()

virtual void Ogre::SceneManager::showBoundingBoxes ( bool  bShow)
virtual

Allows all bounding boxes of scene nodes to be displayed.

◆ shrinkToFitMemoryPools()

void Ogre::SceneManager::shrinkToFitMemoryPools ( )

Defragments memory, then reallocates a smaller pool that tightly fits the current number of objects.

Useful when you know you won't be creating more slots and you need to reclaim memory.

◆ unregisterSceneNodeListener()

virtual void Ogre::SceneManager::unregisterSceneNodeListener ( SceneNode sceneNode)
virtual

Unregisters a registered node for listening.

See also
registerSceneNodeListener

◆ updateAllAnimations()

void Ogre::SceneManager::updateAllAnimations ( )

Updates all skeletal animations in the scene.

This is typically called once per frame during render, but the user might want to manually call this function.

Remarks
mSkeletonAnimManagerCulledList must be set.
See also
updateAllTransforms remarks

◆ updateAllBounds()

void Ogre::SceneManager::updateAllBounds ( const ObjectMemoryManagerVec &  objectMemManager)

Updates the world aabbs from all entities in the scene.

Ought to be called right after updateAllTransforms.

See also
updateAllTransforms
Remarks
See also
MovableObject::updateAllBounds Don't call this function from another thread other than Ogre's main one (we use worker threads that may be in use for something else, and touching the sync barrier could deadlock in the best of cases).

◆ updateAllLods()

void Ogre::SceneManager::updateAllLods ( const Camera lodCamera,
Real  lodBias,
uint8  firstRq,
uint8  lastRq 
)

Updates the Lod values of all objects relative to the given camera.

◆ updateAllTagPoints()

void Ogre::SceneManager::updateAllTagPoints ( )

Updates all TagPoints, both TagPoints that are children of bones, and TagPoints that are children of other TagPoints.

Remarks
mTagPointNodeMemoryManagerUpdateList must be set.
See also
updateAllTransforms remarks

◆ updateAllTransforms()

void Ogre::SceneManager::updateAllTransforms ( )

Updates the derived transforms of all nodes in the scene.

This is typically called once per frame during render, but the user may want to manually call this function.

Remarks
mEntitiesMemoryManagerUpdateList must be set. It contains multiple memory manager containing all objects to be updated (i.e. Entities & Lights are both MovableObjects but are kept separate) Don't call this function from another thread other than Ogre's main one (we use worker threads that may be in use for something else, and touching the sync barrier could deadlock in the best of cases).

◆ updateSceneGraph()

void Ogre::SceneManager::updateSceneGraph ( )

Updates the scene: Perform high level culling, Node transforms and entity animations.

◆ waitForPendingUserScalableTask()

void Ogre::SceneManager::waitForPendingUserScalableTask ( )

Blocks until the the task from processUserScalableTask finishes.

Remarks
Do NOT call this function if you passed bBlock = true to processUserScalableTask

Member Data Documentation

◆ QUERY_ENTITY_DEFAULT_MASK

uint32 Ogre::SceneManager::QUERY_ENTITY_DEFAULT_MASK
static

Default query mask for entities.

See also
SceneQuery

◆ QUERY_FRUSTUM_DEFAULT_MASK

uint32 Ogre::SceneManager::QUERY_FRUSTUM_DEFAULT_MASK
static

Default query mask for frusta and cameras.

See also
SceneQuery

◆ QUERY_FX_DEFAULT_MASK

uint32 Ogre::SceneManager::QUERY_FX_DEFAULT_MASK
static

Default query mask for effects like billboardsets / particle systems.

See also
SceneQuery

◆ QUERY_LIGHT_DEFAULT_MASK

uint32 Ogre::SceneManager::QUERY_LIGHT_DEFAULT_MASK
static

Default query mask for lights.

See also
SceneQuery

◆ QUERY_STATICGEOMETRY_DEFAULT_MASK

uint32 Ogre::SceneManager::QUERY_STATICGEOMETRY_DEFAULT_MASK
static

Default query mask for StaticGeometry.

See also
SceneQuery

The documentation for this class was generated from the following file: