OGRE  2.1.0unstable
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
 
struct  SkyBoxGenParameters
 
struct  SkyDomeGenParameters
 
struct  SkyPlaneGenParameters
 

Public Types

typedef MapIterator< AnimationList > AnimationIterator
 
typedef VectorIterator< CameraList > CameraIterator
 
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
 

Public Member Functions

 SceneManager (const String &instanceName, size_t numWorkerThreads, InstancingThreadedCullingMethod threadedCullingMethod)
 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, const TextureVec *texs)
 Used by Compositor, tells of which compositor textures active, so Materials can access them. More...
 
void _addWireAabb (WireAabb *wireAabb)
 
virtual void _applySceneAnimations (void)
 Internal method for applying animations to scene nodes. More...
 
virtual bool _areRenderStateChangesSuppressed (void) const
 Are render state changes suppressed? More...
 
AxisAlignedBox _calculateCurrentCastersBox (uint32 viewportVisibilityMask, uint8 firstRq, uint8 lastRq) const
 
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 *camera, const Camera *lodCamera, Viewport *vp, uint8 firstRq, uint8 lastRq)
 Performs the frustum culling that will later be needed by _renderPhase02. More...
 
void _frameEnded (void)
 Called when the frame has fully ended (ALL passes have been executed to all RTTs) More...
 
ForwardPlusBase_getActivePassForwardPlus (void)
 
uint32 _getCombinedVisibilityMask (void) 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 (void)
 
NodeMemoryManager_getNodeMemoryManager (SceneMemoryMgrTypes sceneType)
 
NodeMemoryManager_getTagPointNodeMemoryManager (void)
 
VisibleObjectsPerThreadArray_getTmpVisibleObjectsList ()
 mTmpVisibleObjects More...
 
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 _queueSkiesForRendering (Camera *cam)
 Internal method for queueing the sky objects with the params as previously set through setSkyBox, setSkyPlane and setSkyDome. More...
 
virtual void _removeAutotrackingSceneNode (SceneNode *source)
 
void _removeCompositorTextures (size_t from)
 Removes all compositor textures from 'from' to end. More...
 
void _removeWireAabb (WireAabb *wireAabb)
 
virtual void _renderPhase02 (Camera *camera, const Camera *lodCamera, Viewport *vp, 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 _resumeRendering (RenderContext *context)
 Resume rendering of the frame. More...
 
void _setCameraInProgress (Camera *camera)
 
void _setCompositorTarget (const CompositorTexture &compoTarget)
 The compositor we are currently writing to. More...
 
void _setCurrentCompositorPass (CompositorPass *pass)
 
void _setCurrentRenderStage (IlluminationRenderStage stage)
 
void _setCurrentShadowNode (CompositorShadowNode *shadowNode, bool isReused)
 
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 TextureVec *prepassTextures, const TextureVec *prepassDepthTexture, const TextureVec *ssrTexture)
 For internal use. More...
 
virtual void _setSkyBox (bool enable, const String &materialName, uint8 renderQueue, Real distance=5000, const Quaternion &orientation=Quaternion::IDENTITY, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
 Enables / disables a 'sky box' i.e. More...
 
virtual void _setSkyDome (bool enable, const String &materialName, uint8 renderQueue, Real curvature=10, Real tiling=8, Real distance=4000, const Quaternion &orientation=Quaternion::IDENTITY, int xsegments=16, int ysegments=16, int ysegments_keep=-1, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
 Enables / disables a 'sky dome' i.e. More...
 
virtual void _setSkyPlane (bool enable, const Plane &plane, const String &materialName, uint8 renderQueue, Real scale=1000, Real tiling=10, Real bow=0, int xsegments=1, int ysegments=1, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
 Enables / disables a 'sky plane' i.e. More...
 
void _setViewport (Viewport *vp)
 
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...
 
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 (void)
 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)
 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 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 v1::InstancedEntitycreateInstancedEntity (const String &materialName, const String &managerName)
 Creates an InstancedEntity based on an existing InstanceManager (. More...
 
virtual v1::InstanceManagercreateInstanceManager (const String &customName, const String &meshName, const String &groupName, v1::InstanceManager::InstancingTechnique technique, size_t numInstancesPerBatch, uint16 flags=0, unsigned short subMeshIdx=0)
 Creates an InstanceManager interface to create & manipulate instanced entities You need to call this function at least once before start calling createInstancedEntity to build up an instance based on the given mesh. More...
 
virtual IntersectionSceneQuerycreateIntersectionQuery (uint32 mask=QUERY_ENTITY_DEFAULT_MASK)
 Creates an IntersectionSceneQuery for this scene manager. More...
 
virtual ItemcreateItem (const String &meshName, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME, SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC)
 Create an Item (instance of a discrete mesh). More...
 
virtual ItemcreateItem (const MeshPtr &pMesh, SceneMemoryMgrTypes sceneType=SCENE_DYNAMIC)
 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 v1::Rectangle2DcreateRectangle2D (bool bQuad, 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 v1::StaticGeometrycreateStaticGeometry (const String &name)
 Creates a StaticGeometry instance suitable for use with this SceneManager. More...
 
virtual TagPointcreateTagPoint (void)
 Creates a TagPoint that can be used like a SceneNode, or be used to be attached to a Bone. More...
 
virtual WireAabbcreateWireAabb (void)
 Create an WireAabb. More...
 
void cullLights (Camera *camera, Light::LightTypes startType, Light::LightTypes endType, LightArray &outLights)
 
virtual void destroyAllAnimations (void)
 Removes all animations created using this SceneManager. More...
 
virtual void destroyAllAnimationStates (void)
 Removes all animation states created using this SceneManager. More...
 
virtual void destroyAllBillboardChains (void)
 Removes & destroys all BillboardChains from the SceneManager. More...
 
virtual void destroyAllBillboardSets (void)
 Removes & destroys all BillboardSets. More...
 
virtual void destroyAllCameras (void)
 Removes (and destroys) all cameras from the scene. More...
 
virtual void destroyAllEntities (void)
 Removes & destroys all Entities. More...
 
virtual void destroyAllInstanceManagers (void)
 
virtual void destroyAllItems (void)
 Removes & destroys all Items. More...
 
virtual void destroyAllLights (void)
 Removes and destroys all lights in the scene. More...
 
virtual void destroyAllManualObjects (void)
 Removes & destroys all ManualObjects from the SceneManager. More...
 
virtual void destroyAllMovableObjects (void)
 Destroy all MovableObjects. More...
 
virtual void destroyAllMovableObjectsByType (const String &typeName)
 Destroy all MovableObjects of a given type. More...
 
virtual void destroyAllParticleSystems (void)
 Removes & destroys all ParticleSystems from the SceneManager. More...
 
virtual void destroyAllRectangle2D (void)
 Removes & destroys all Rectangle2D. More...
 
virtual void destroyAllRibbonTrails (void)
 Removes & destroys all RibbonTrails from the SceneManager. More...
 
virtual void destroyAllStaticGeometry (void)
 Remove & destroy all StaticGeometry instances. More...
 
virtual void destroyAllWireAabbs (void)
 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 destroyEntity (v1::Entity *ent)
 Removes & destroys an Entity from the SceneManager. More...
 
virtual void destroyInstancedEntity (v1::InstancedEntity *instancedEntity)
 Removes an InstancedEntity,. More...
 
virtual void destroyInstanceManager (IdString name)
 Destroys an InstanceManager if it was created with createInstanceManager() More...
 
virtual void destroyInstanceManager (v1::InstanceManager *instanceManager)
 
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, const String &typeName)
 Destroys a MovableObject with the name specified, of the type specified. More...
 
virtual void destroyMovableObject (MovableObject *m)
 Destroys a MovableObject. 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 (v1::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 . More...
 
virtual void destroyStaticGeometry (v1::StaticGeometry *geom)
 Remove & destroy a StaticGeometry instance. More...
 
virtual void destroyStaticGeometry (const String &name)
 Remove & destroy a StaticGeometry instance. More...
 
virtual void destroyWireAabb (WireAabb *wireAabb)
 Removes & destroys an WireAabb from the SceneManager. More...
 
virtual size_t estimateWorldGeometry (const String &filename)
 Estimate the number of loading stages required to load the named world geometry. More...
 
virtual size_t estimateWorldGeometry (DataStreamPtr &stream, const String &typeName=BLANKSTRING)
 Estimate the number of loading stages required to load the named world geometry. 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 (void) const
 
const ColourValuegetAmbientLightLowerHemisphere (void) const
 
const ColourValuegetAmbientLightUpperHemisphere (void) 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 (void)
 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 (void)
 Returns a specialised MapIterator over all animation states in the scene. More...
 
CameragetCameraInProgress (void) const
 Gets the current camera being rendered (advanced use only, only valid during viewport update. More...
 
CameraIterator getCameraIterator (void)
 Returns a specialised MapIterator over all cameras in the scene. More...
 
const CameraList & getCameras () const
 Returns a const version of the camera list. More...
 
const CompositorTexturegetCompositorTarget (void) const
 The compositor we are currently writing to. More...
 
const CompositorTextureVecgetCompositorTextures (void) const
 
const AxisAlignedBoxgetCurrentCastersBox (void) const
 CompositorShadowNode::getCastersBox More...
 
const CompositorPassgetCurrentCompositorPass (void) const
 Note: May be null. More...
 
const TextureVecgetCurrentPrePassDepthTexture (void) const
 
PrePassMode getCurrentPrePassMode (void) const
 
const TextureVecgetCurrentPrePassTextures (void) const
 
const CompositorShadowNodegetCurrentShadowNode (void) const
 
const TextureVecgetCurrentSsrTexture (void) const
 
ViewportgetCurrentViewport (void) const
 Gets the current viewport being rendered (advanced use only, only valid during viewport update. More...
 
RenderSystemgetDestinationRenderSystem ()
 Get the rendersystem subclass to which the output of this Scene Manager gets sent. More...
 
virtual bool getDisplaySceneNodes (void) const
 Returns true if all scene nodes axis are to be displayed. More...
 
SceneNodegetDummySceneNode (void) 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...
 
virtual bool getFindVisibleObjects (void)
 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...
 
virtual const ColourValuegetFogColour (void) const
 Returns the fog colour for the scene. More...
 
virtual Real getFogDensity (void) const
 Returns the fog density for the scene. More...
 
virtual Real getFogEnd (void) const
 Returns the fog end distance for the scene. More...
 
virtual FogMode getFogMode (void) const
 Returns the fog mode for the scene. More...
 
virtual Real getFogStart (void) const
 Returns the fog start distance for the scene. More...
 
ForwardPlusBasegetForwardPlus (void)
 
const LightListInfogetGlobalLightList (void) const
 
virtual v1::InstanceManagergetInstanceManager (IdString name) const
 Retrieves an existing InstanceManager by it's name. More...
 
InstancingThreadedCullingMethod getInstancingThreadedCullingMethod () const
 
virtual const PlaneListgetLightClippingPlanes (const Light *l)
 Retrieve a set of clipping planes for a given 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
 CompositorShadowNode::getMinMaxDepthRange More...
 
virtual MovableObjectIterator getMovableObjectIterator (const String &typeName)
 Get an iterator over all MovableObect instances of a given type. More...
 
const StringgetName (void) const
 Return the instance name of this SceneManager. More...
 
size_t getNumCompositorTextures (void) const
 Gets the number of currently active compositor textures. More...
 
virtual size_t getNumInstancesPerBatch (const String &meshName, const String &groupName, const String &materialName, v1::InstanceManager::InstancingTechnique technique, size_t numInstancesPerBatch, uint16 flags=0, unsigned short subMeshIdx=0)
 
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...
 
Vector3 getRelativeOrigin (void) const
 Returns the current relative origin. (Only when non-permanent) More...
 
RenderQueuegetRenderQueue (void) 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 (void) const
 Get the colour used to modulate areas in shadow. More...
 
virtual Real getShadowDirectionalLightExtrusionDistance (void) const
 Gets the distance a shadow volume is extruded for a directional light. More...
 
virtual Real getShadowDirLightTextureOffset (void) 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 (void) const
 Gets the default maximum distance away from the camera that shadows will be visible. More...
 
virtual Real getShadowFarDistanceSquared (void) const
 
virtual bool getShowBoundingBoxes () const
 Returns if all bounding boxes of scene nodes are to be displayed. More...
 
virtual const SkyBoxGenParametersgetSkyBoxGenParameters (void) const
 Get the parameters used to generate the current SkyBox, if any. More...
 
virtual SceneNodegetSkyBoxNode (void) const
 Get the skybox node, if enabled. More...
 
virtual const SkyDomeGenParametersgetSkyDomeGenParameters (void) const
 Get the parameters used to generate the current SkyDome, if any. More...
 
virtual SceneNodegetSkyDomeNode (void) const
 Get the sky dome node, if enabled. More...
 
virtual const SkyPlaneGenParametersgetSkyPlaneGenParameters (void) const
 Get the parameters used to construct the SkyPlane, if any. More...
 
virtual SceneNodegetSkyPlaneNode (void) const
 Get the sky plane node, if enabled. More...
 
virtual v1::StaticGeometrygetStaticGeometry (const String &name) const
 Retrieve a previously created StaticGeometry instance. More...
 
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 (void) const =0
 Retrieve the type name of this scene manager. More...
 
virtual_l2 uint32 getVisibilityMask (void) 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 hasInstanceManager (IdString managerName) const
 Returns whether an InstanceManager 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 bool hasStaticGeometry (const String &name) const
 Returns whether a static geometry instance with the given name exists. More...
 
virtual void injectMovableObject (MovableObject *m)
 Inject a MovableObject instance created externally. More...
 
bool isCurrentShadowNodeReused (void) const
 
virtual bool isLateMaterialResolving () const
 Gets whether using late material resolving or not. More...
 
virtual bool isSkyBoxEnabled (void) const
 Return whether a skybox is enabled. More...
 
virtual bool isSkyDomeEnabled (void) const
 Return whether a skydome is enabled. More...
 
virtual bool isSkyPlaneEnabled (void) const
 Return whether a key plane is enabled. More...
 
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_MUTEX (sceneGraphMutex)
 Mutex to protect the scene graph from simultaneous access from multiple threads. More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 
virtual void prepareWorldGeometry (const String &filename)
 Sets the source of the 'world' geometry, i.e. More...
 
virtual void prepareWorldGeometry (DataStreamPtr &stream, const String &typeName=BLANKSTRING)
 Sets the source of the 'world' geometry, i.e. 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 setAmbientLight (const ColourValue &upperHemisphere, const ColourValue &lowerHemisphere, const Vector3 &hemisphereDir, Real envmapScale=1.0f)
 Sets the ambient light level to be used for the scene. 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=0.001, Real linearStart=0.0, Real linearEnd=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, float minDistance, float maxDistance)
 
virtual void setLateMaterialResolving (bool isLate)
 Sets whether to use late material resolving or not. More...
 
virtual bool setOption (const String &strKey, const void *pValue)
 Method for setting a specific option of the Scene Manager. 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 setShadowTextureCasterMaterial (const String &name)
 Sets the default material to use for rendering shadow casters. 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...
 
virtual void setSkyBox (bool enable, const String &materialName, Real distance=5000, bool drawFirst=true, const Quaternion &orientation=Quaternion::IDENTITY, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
 Enables / disables a 'sky box' i.e. More...
 
virtual void setSkyBoxEnabled (bool enable)
 Enables / disables a 'sky box'. More...
 
virtual void setSkyDome (bool enable, const String &materialName, Real curvature=10, Real tiling=8, Real distance=4000, bool drawFirst=true, const Quaternion &orientation=Quaternion::IDENTITY, int xsegments=16, int ysegments=16, int ysegments_keep=-1, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
 Enables / disables a 'sky dome' i.e. More...
 
virtual void setSkyDomeEnabled (bool enable)
 Enables / disables a 'sky dome'. More...
 
virtual void setSkyPlane (bool enable, const Plane &plane, const String &materialName, Real scale=1000, Real tiling=10, bool drawFirst=true, Real bow=0, int xsegments=1, int ysegments=1, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
 Enables / disables a 'sky plane' i.e. More...
 
virtual void setSkyPlaneEnabled (bool enable)
 Enables / disables a 'sky plane'. More...
 
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 setWorldGeometry (const String &filename)
 Sets the source of the 'world' geometry, i.e. More...
 
virtual void setWorldGeometry (DataStreamPtr &stream, const String &typeName=BLANKSTRING)
 Sets the source of the 'world' geometry, i.e. More...
 
virtual void showBoundingBoxes (bool bShow)
 Allows all bounding boxes of scene nodes to be displayed. 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 (void)
 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...
 

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 (
See also
OctreeSceneManager), a BSP tree (
BspSceneManager), 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

◆ 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 

Constructor & Destructor Documentation

◆ SceneManager()

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

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,
const TextureVec texs 
)

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 ( void  )
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 ( void  ) const
inlinevirtual

Are render state changes suppressed?

See also
_suppressRenderStateChanges

◆ _calculateCurrentCastersBox()

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

◆ _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 camera,
const Camera lodCamera,
Viewport vp,
uint8  firstRq,
uint8  lastRq 
)
virtual

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

Remarks
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)

◆ _frameEnded()

void Ogre::SceneManager::_frameEnded ( void  )

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

◆ _getActivePassForwardPlus()

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

◆ _getCombinedVisibilityMask()

uint32 Ogre::SceneManager::_getCombinedVisibilityMask ( void  ) 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 ( void  )
inline

◆ _getNodeMemoryManager()

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

◆ _getTagPointNodeMemoryManager()

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

◆ _getTmpVisibleObjectsList()

VisibleObjectsPerThreadArray& Ogre::SceneManager::_getTmpVisibleObjectsList ( )
inline

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)

◆ _queueSkiesForRendering()

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

Internal method for queueing the sky objects with the params as previously set through setSkyBox, setSkyPlane and setSkyDome.

◆ _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.

◆ _removeWireAabb()

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

◆ _renderPhase02()

virtual void Ogre::SceneManager::_renderPhase02 ( Camera camera,
const Camera lodCamera,
Viewport vp,
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 .
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

◆ _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

◆ _setCameraInProgress()

void Ogre::SceneManager::_setCameraInProgress ( Camera camera)
inline

◆ _setCompositorTarget()

void Ogre::SceneManager::_setCompositorTarget ( const CompositorTexture compoTarget)

The compositor we are currently writing to.

◆ _setCurrentCompositorPass()

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

◆ _setCurrentRenderStage()

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

◆ _setCurrentShadowNode()

void Ogre::SceneManager::_setCurrentShadowNode ( CompositorShadowNode shadowNode,
bool  isReused 
)

◆ _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 TextureVec prepassTextures,
const TextureVec prepassDepthTexture,
const TextureVec ssrTexture 
)

For internal use.

See also
CompositorPassSceneDef::mPrePassMode

◆ _setSkyBox()

virtual void Ogre::SceneManager::_setSkyBox ( bool  enable,
const String materialName,
uint8  renderQueue,
Real  distance = 5000,
const Quaternion orientation = Quaternion::IDENTITY,
const String groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME 
)
virtual

Enables / disables a 'sky box' i.e.

a 6-sided box at constant distance from the camera representing the sky.

Remarks
You could create a sky box yourself using the standard mesh and entity methods, but this creates a plane which the camera can never get closer or further away from - it moves with the camera. (NB you could create this effect by creating a world box which was attached to the same SceneNode as the Camera too, but this would only apply to a single camera whereas this skybox applies to any camera using this scene manager).
The material you use for the skybox can either contain layers which are single textures, or they can be cubic textures, i.e. made up of 6 images, one for each plane of the cube. See the TextureUnitState class for more information.
Parameters
enableTrue to enable the skybox, false to disable it
materialNameThe name of the material the box will use
distanceDistance in world coorinates from the camera to each plane of the box. The default is normally OK.
renderQueueThe render queue to use when rendering this object
orientationOptional parameter to specify the orientation of the box. By default the 'top' of the box is deemed to be in the +y direction, and the 'front' at the -z direction. You can use this parameter to rotate the sky if you want.
groupNameThe name of the resource group to which to assign the plane mesh.

◆ _setSkyDome()

virtual void Ogre::SceneManager::_setSkyDome ( bool  enable,
const String materialName,
uint8  renderQueue,
Real  curvature = 10,
Real  tiling = 8,
Real  distance = 4000,
const Quaternion orientation = Quaternion::IDENTITY,
int  xsegments = 16,
int  ysegments = 16,
int  ysegments_keep = -1,
const String groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME 
)
virtual

Enables / disables a 'sky dome' i.e.

an illusion of a curved sky.

Remarks
A sky dome is actually formed by 5 sides of a cube, but with texture coordinates generated such that the surface appears curved like a dome. Sky domes are appropriate where you need a realistic looking sky where the scene is not going to be 'fogged', and there is always a 'floor' of some sort to prevent the viewer looking below the horizon (the distortion effect below the horizon can be pretty horrible, and there is never anyhting directly below the viewer). If you need a complete wrap-around background, use the setSkyBox method instead. You can actually combine a sky box and a sky dome if you want, to give a positional backdrop with an overlayed curved cloud layer.
Sky domes work well with 2D repeating textures like clouds. You can change the apparent 'curvature' of the sky depending on how your scene is viewed - lower curvatures are better for 'open' scenes like landscapes, whilst higher curvatures are better for say FPS levels where you don't see a lot of the sky at once and the exaggerated curve looks good.
Parameters
enableTrue to enable the skydome, false to disable it
materialNameThe name of the material the dome will use
curvatureThe curvature of the dome. Good values are between 2 and 65. Higher values are more curved leading to a smoother effect, lower values are less curved meaning more distortion at the horizons but a better distance effect.
tilingHow many times to tile the texture(s) across the dome.
distanceDistance in world coorinates from the camera to each plane of the box the dome is rendered on. The default is normally OK.
renderQueueThe render queue to use when rendering this object
orientationOptional parameter to specify the orientation of the dome. By default the 'top' of the dome is deemed to be in the +y direction, and the 'front' at the -z direction. You can use this parameter to rotate the sky if you want.
groupNameThe name of the resource group to which to assign the plane mesh.

◆ _setSkyPlane()

virtual void Ogre::SceneManager::_setSkyPlane ( bool  enable,
const Plane plane,
const String materialName,
uint8  renderQueue,
Real  scale = 1000,
Real  tiling = 10,
Real  bow = 0,
int  xsegments = 1,
int  ysegments = 1,
const String groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME 
)
virtual

Enables / disables a 'sky plane' i.e.

a plane at constant distance from the camera representing the sky.

Remarks
You can create sky planes yourself using the standard mesh and entity methods, but this creates a plane which the camera can never get closer or further away from - it moves with the camera. (NB you could create this effect by creating a world plane which was attached to the same SceneNode as the Camera too, but this would only apply to a single camera whereas this plane applies to any camera using this scene manager).
Note
To apply scaling, scrolls etc to the sky texture(s) you should use the TextureUnitState class methods.
Parameters
enableTrue to enable the plane, false to disable it
planeDetails of the plane, i.e. it's normal and it's distance from the camera.
materialNameThe name of the material the plane will use
scaleThe scaling applied to the sky plane - higher values mean a bigger sky plane - you may want to tweak this depending on the size of plane.d and the other characteristics of your scene
tilingHow many times to tile the texture across the sky. Applies to all texture layers. If you need finer control use the TextureUnitState texture coordinate transformation methods.
renderQueueThe render queue to use when rendering this object
bowIf zero, the plane will be completely flat (like previous versions. If above zero, the plane will be curved, allowing the sky to appear below camera level. Curved sky planes are simular to skydomes, but are more compatible with fog.
xsegments,ysegmentsDetermines the number of segments the plane will have to it. This is most important when you are bowing the plane, but may also be useful if you need tessellation on the plane to perform per-vertex effects.
groupNameThe name of the resource group to which to assign the plane mesh.

◆ _setViewport()

void Ogre::SceneManager::_setViewport ( Viewport vp)
inline

◆ _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.

◆ 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 ( void  )

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)
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)

◆ 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.

◆ createInstancedEntity()

virtual v1::InstancedEntity* Ogre::SceneManager::createInstancedEntity ( const String materialName,
const String managerName 
)
virtual

Creates an InstancedEntity based on an existing InstanceManager (.

See also
createInstanceManager)
Remarks
Return value may be null if the InstanceManger technique isn't supported Try to keep the number of entities with different materials to a minimum For more information
See also
InstancedManager
InstancedBatch,
InstancedEntity Alternatively you can call InstancedManager::createInstanceEntity using the returned pointer from createInstanceManager
Parameters
materialNameMaterial name
managerNameName of the instance manager
Returns
An InstancedEntity ready to be attached to a SceneNode

◆ createInstanceManager()

virtual v1::InstanceManager* Ogre::SceneManager::createInstanceManager ( const String customName,
const String meshName,
const String groupName,
v1::InstanceManager::InstancingTechnique  technique,
size_t  numInstancesPerBatch,
uint16  flags = 0,
unsigned short  subMeshIdx = 0 
)
virtual

Creates an InstanceManager interface to create & manipulate instanced entities You need to call this function at least once before start calling createInstancedEntity to build up an instance based on the given mesh.

Remarks
Instancing is a way of batching up geometry into a much more efficient form, but with some limitations, and still be able to move & animate it. Please
See also
InstanceManager class documentation for full information.
Parameters
customNameCustom name for referencing. Must be unique
meshNameThe mesh name the instances will be based upon
groupNameThe resource name where the mesh lives
techniqueTechnique to use, which may be shader based, or hardware based.
numInstancesPerBatchSuggested number of instances per batch. The actual number may end up being lower if the technique doesn't support having so many. It can't be zero
flags
See also
InstanceManagerFlags
Parameters
subMeshIdxInstanceManager only supports using one submesh from the base mesh. This parameter says which submesh to pick (must be <= Mesh::getNumSubMeshes())
Returns
The new InstanceManager instance

◆ 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 String meshName,
const String groupName = ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME,
SceneMemoryMgrTypes  sceneType = SCENE_DYNAMIC 
)
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.

◆ createItem() [2/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.

◆ 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 v1::Rectangle2D* Ogre::SceneManager::createRectangle2D ( bool  bQuad,
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
bQuadWhen true, the rectangle is drawn with two triangles. When false, it is drawn as a single oversized triangle. Full screen triangles are faster than quads, but will only work correctly if they cover the entire screen, or are aided by scissor tests to clip the borders.
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. sceneType Dynamic 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.

◆ createStaticGeometry()

virtual v1::StaticGeometry* Ogre::SceneManager::createStaticGeometry ( const String name)
virtual

Creates a StaticGeometry instance suitable for use with this SceneManager.

Remarks
StaticGeometry is a way of batching up geometry into a more efficient form at the expense of being able to move it. Please read the StaticGeometry class documentation for full information.
Parameters
nameThe name to give the new object
Returns
The new StaticGeometry instance

◆ createTagPoint()

virtual TagPoint* Ogre::SceneManager::createTagPoint ( void  )
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 ( void  )
virtual

Create an WireAabb.

◆ cullLights()

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

◆ destroyAllAnimations()

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

Removes all animations created using this SceneManager.

◆ destroyAllAnimationStates()

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

Removes all animation states created using this SceneManager.

◆ destroyAllBillboardChains()

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

Removes & destroys all BillboardChains from the SceneManager.

◆ destroyAllBillboardSets()

virtual void Ogre::SceneManager::destroyAllBillboardSets ( void  )
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 ( void  )
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.

◆ destroyAllEntities()

virtual void Ogre::SceneManager::destroyAllEntities ( void  )
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

◆ destroyAllInstanceManagers()

virtual void Ogre::SceneManager::destroyAllInstanceManagers ( void  )
virtual

◆ destroyAllItems()

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

Removes & destroys all Items.

◆ destroyAllLights()

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

Removes and destroys all lights in the scene.

◆ destroyAllManualObjects()

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

Removes & destroys all ManualObjects from the SceneManager.

◆ destroyAllMovableObjects()

virtual void Ogre::SceneManager::destroyAllMovableObjects ( void  )
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 ( void  )
virtual

Removes & destroys all ParticleSystems from the SceneManager.

◆ destroyAllRectangle2D()

virtual void Ogre::SceneManager::destroyAllRectangle2D ( void  )
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 ( void  )
virtual

Removes & destroys all RibbonTrails from the SceneManager.

◆ destroyAllStaticGeometry()

virtual void Ogre::SceneManager::destroyAllStaticGeometry ( void  )
virtual

Remove & destroy all StaticGeometry instances.

◆ destroyAllWireAabbs()

virtual void Ogre::SceneManager::destroyAllWireAabbs ( void  )
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

◆ 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

◆ destroyInstancedEntity()

virtual void Ogre::SceneManager::destroyInstancedEntity ( v1::InstancedEntity instancedEntity)
virtual

Removes an InstancedEntity,.

See also
SceneManager::createInstancedEntity &
InstanceBatch::removeInstancedEntity
Parameters
instancedEntityInstance to remove

◆ destroyInstanceManager() [1/2]

virtual void Ogre::SceneManager::destroyInstanceManager ( IdString  name)
virtual

Destroys an InstanceManager if it was created with createInstanceManager()

Remarks
Be sure you don't have any InstancedEntity referenced somewhere which was created with this manager, since it will become a dangling pointer.
Parameters
nameName of the manager to remove

◆ destroyInstanceManager() [2/2]

virtual void Ogre::SceneManager::destroyInstanceManager ( v1::InstanceManager instanceManager)
virtual

◆ 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,
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.

◆ destroyMovableObject() [2/2]

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

Destroys a MovableObject.

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 ( v1::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 .

◆ destroyStaticGeometry() [1/2]

virtual void Ogre::SceneManager::destroyStaticGeometry ( v1::StaticGeometry geom)
virtual

Remove & destroy a StaticGeometry instance.

◆ destroyStaticGeometry() [2/2]

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

Remove & destroy a StaticGeometry instance.

◆ destroyWireAabb()

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

Removes & destroys an WireAabb from the SceneManager.

◆ estimateWorldGeometry() [1/2]

virtual size_t Ogre::SceneManager::estimateWorldGeometry ( const String filename)
inlinevirtual

Estimate the number of loading stages required to load the named world geometry.

Remarks
This method should be overridden by SceneManagers that provide custom world geometry that can take some time to load. They should return from this method a count of the number of stages of progress they can report on whilst loading. During real loading (setWorldGeometry), they should call ResourceGroupManager::_notifyWorldGeometryProgress exactly that number of times when loading the geometry for real.
Note
The default is to return 0, ie to not report progress.

◆ estimateWorldGeometry() [2/2]

virtual size_t Ogre::SceneManager::estimateWorldGeometry ( DataStreamPtr stream,
const String typeName = BLANKSTRING 
)
inlinevirtual

Estimate the number of loading stages required to load the named world geometry.

Remarks
Operates just like the version of this method which takes a filename, but operates on a stream instead. Note that since the stream is updated, you'll need to reset the stream or reopen it when it comes to loading it for real.
Parameters
streamData stream containing data to load
typeNameString identifying the type of world geometry contained in the stream - not required if this manager only supports one type of world geometry.

◆ 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 ( void  ) const
inline

◆ getAmbientLightLowerHemisphere()

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

◆ getAmbientLightUpperHemisphere()

const ColourValue& Ogre::SceneManager::getAmbientLightUpperHemisphere ( void  ) 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 ( void  )
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 ( void  )
inline

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

◆ getCameraInProgress()

Camera* Ogre::SceneManager::getCameraInProgress ( void  ) const
inline

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

◆ getCameraIterator()

CameraIterator Ogre::SceneManager::getCameraIterator ( void  )
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.

◆ getCompositorTarget()

const CompositorTexture& Ogre::SceneManager::getCompositorTarget ( void  ) const
inline

The compositor we are currently writing to.

◆ getCompositorTextures()

const CompositorTextureVec& Ogre::SceneManager::getCompositorTextures ( void  ) 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 ( void  ) const

CompositorShadowNode::getCastersBox

Remarks
Returns a null box if no active shadow node.

◆ getCurrentCompositorPass()

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

Note: May be null.

◆ getCurrentPrePassDepthTexture()

const TextureVec* Ogre::SceneManager::getCurrentPrePassDepthTexture ( void  ) const
inline

◆ getCurrentPrePassMode()

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

◆ getCurrentPrePassTextures()

const TextureVec* Ogre::SceneManager::getCurrentPrePassTextures ( void  ) const
inline

◆ getCurrentShadowNode()

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

◆ getCurrentSsrTexture()

const TextureVec* Ogre::SceneManager::getCurrentSsrTexture ( void  ) const
inline

◆ getCurrentViewport()

Viewport* Ogre::SceneManager::getCurrentViewport ( void  ) const
inline

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

◆ 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 ( void  ) const
inlinevirtual

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

◆ getDummySceneNode()

SceneNode* Ogre::SceneManager::getDummySceneNode ( void  ) 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.

◆ getFindVisibleObjects()

virtual bool Ogre::SceneManager::getFindVisibleObjects ( void  )
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.

◆ getFogColour()

virtual const ColourValue& Ogre::SceneManager::getFogColour ( void  ) const
virtual

Returns the fog colour for the scene.

◆ getFogDensity()

virtual Real Ogre::SceneManager::getFogDensity ( void  ) const
virtual

Returns the fog density for the scene.

◆ getFogEnd()

virtual Real Ogre::SceneManager::getFogEnd ( void  ) const
virtual

Returns the fog end distance for the scene.

◆ getFogMode()

virtual FogMode Ogre::SceneManager::getFogMode ( void  ) const
virtual

Returns the fog mode for the scene.

◆ getFogStart()

virtual Real Ogre::SceneManager::getFogStart ( void  ) const
virtual

Returns the fog start distance for the scene.

◆ getForwardPlus()

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

◆ getGlobalLightList()

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

◆ getInstanceManager()

virtual v1::InstanceManager* Ogre::SceneManager::getInstanceManager ( IdString  name) const
virtual

Retrieves an existing InstanceManager by it's name.

Note
Throws an exception if the named InstanceManager does not exist

◆ getInstancingThreadedCullingMethod()

InstancingThreadedCullingMethod Ogre::SceneManager::getInstancingThreadedCullingMethod ( ) const
inline

◆ getLightClippingPlanes()

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

Retrieve a set of clipping planes for a given 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

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 ( void  ) const
inline

Return the instance name of this SceneManager.

◆ getNumCompositorTextures()

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

Gets the number of currently active compositor textures.

◆ getNumInstancesPerBatch()

virtual size_t Ogre::SceneManager::getNumInstancesPerBatch ( const String meshName,
const String groupName,
const String materialName,
v1::InstanceManager::InstancingTechnique  technique,
size_t  numInstancesPerBatch,
uint16  flags = 0,
unsigned short  subMeshIdx = 0 
)
virtual
See also
InstanceManager::getMaxOrBestNumInstancesPerBatch
Remarks
If you've already created an InstanceManager, you can call it's getMaxOrBestNumInstancesPerBatch() function directly. Another (not recommended) way to know if the technique is unsupported is by creating an InstanceManager and use createInstancedEntity, which will return null pointer. The input parameter "numInstancesPerBatch" is a suggested value when using IM_VTFBESTFIT flag (in that case it should be non-zero)
Returns
The ideal (or maximum, depending on flags) number of instances per batch for the given technique. Zero if technique is unsupported or errors were spotted

◆ 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.

◆ getRelativeOrigin()

Vector3 Ogre::SceneManager::getRelativeOrigin ( void  ) const

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

◆ getRenderQueue()

RenderQueue* Ogre::SceneManager::getRenderQueue ( void  ) 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 ( void  ) 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 ( void  ) const
virtual

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

◆ getShadowDirLightTextureOffset()

virtual Real Ogre::SceneManager::getShadowDirLightTextureOffset ( void  ) 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 ( void  ) const
inlinevirtual

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

◆ getShadowFarDistanceSquared()

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

◆ getShowBoundingBoxes()

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

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

◆ getSkyBoxGenParameters()

virtual const SkyBoxGenParameters& Ogre::SceneManager::getSkyBoxGenParameters ( void  ) const
inlinevirtual

Get the parameters used to generate the current SkyBox, if any.

◆ getSkyBoxNode()

virtual SceneNode* Ogre::SceneManager::getSkyBoxNode ( void  ) const
inlinevirtual

Get the skybox node, if enabled.

◆ getSkyDomeGenParameters()

virtual const SkyDomeGenParameters& Ogre::SceneManager::getSkyDomeGenParameters ( void  ) const
inlinevirtual

Get the parameters used to generate the current SkyDome, if any.

◆ getSkyDomeNode()

virtual SceneNode* Ogre::SceneManager::getSkyDomeNode ( void  ) const
inlinevirtual

Get the sky dome node, if enabled.

◆ getSkyPlaneGenParameters()

virtual const SkyPlaneGenParameters& Ogre::SceneManager::getSkyPlaneGenParameters ( void  ) const
inlinevirtual

Get the parameters used to construct the SkyPlane, if any.

◆ getSkyPlaneNode()

virtual SceneNode* Ogre::SceneManager::getSkyPlaneNode ( void  ) const
inlinevirtual

Get the sky plane node, if enabled.

◆ getStaticGeometry()

virtual v1::StaticGeometry* Ogre::SceneManager::getStaticGeometry ( const String name) const
virtual

Retrieve a previously created StaticGeometry instance.

Note
Throws an exception if the named instance does not exist

◆ 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 ( void  ) 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 ( void  ) 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.

◆ hasInstanceManager()

virtual bool Ogre::SceneManager::hasInstanceManager ( IdString  managerName) const
virtual

Returns whether an InstanceManager 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.

◆ hasStaticGeometry()

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

Returns whether a static geometry instance with the given name exists.

◆ 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.

◆ isCurrentShadowNodeReused()

bool Ogre::SceneManager::isCurrentShadowNodeReused ( void  ) const
inline

◆ isLateMaterialResolving()

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

Gets whether using late material resolving or not.

See also
setLateMaterialResolving

◆ isSkyBoxEnabled()

virtual bool Ogre::SceneManager::isSkyBoxEnabled ( void  ) const
inlinevirtual

Return whether a skybox is enabled.

◆ isSkyDomeEnabled()

virtual bool Ogre::SceneManager::isSkyDomeEnabled ( void  ) const
inlinevirtual

Return whether a skydome is enabled.

◆ isSkyPlaneEnabled()

virtual bool Ogre::SceneManager::isSkyPlaneEnabled ( void  ) const
inlinevirtual

Return whether a key plane is enabled.

◆ 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_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.

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

◆ operator delete[]() [1/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

◆ operator delete[]() [2/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [2/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [3/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

◆ operator new[]() [1/2]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

◆ operator new[]() [2/2]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

◆ prepareWorldGeometry() [1/2]

virtual void Ogre::SceneManager::prepareWorldGeometry ( const String filename)
virtual

Sets the source of the 'world' geometry, i.e.

the large, mainly static geometry making up the world e.g. rooms, landscape etc. This function can be called before setWorldGeometry in a background thread, do to some slow tasks (e.g. IO) that do not involve the backend render system.

Remarks
Depending on the type of SceneManager (subclasses will be specialised for particular world geometry types) you have requested via the Root or SceneManagerEnumerator classes, you can pass a filename to this method and it will attempt to load the world-level geometry for use. If you try to load an inappropriate type of world data an exception will be thrown. The default SceneManager cannot handle any sort of world geometry and so will always throw an exception. However subclasses like BspSceneManager can load particular types of world geometry e.g. "q3dm1.bsp".

◆ prepareWorldGeometry() [2/2]

virtual void Ogre::SceneManager::prepareWorldGeometry ( DataStreamPtr stream,
const String typeName = BLANKSTRING 
)
virtual

Sets the source of the 'world' geometry, i.e.

the large, mainly static geometry making up the world e.g. rooms, landscape etc. This function can be called before setWorldGeometry in a background thread, do to some slow tasks (e.g. IO) that do not involve the backend render system.

Remarks
Depending on the type of SceneManager (subclasses will be specialised for particular world geometry types) you have requested via the Root or SceneManagerEnumerator classes, you can pass a stream to this method and it will attempt to load the world-level geometry for use. If the manager can only handle one input format the typeName parameter is not required. The stream passed will be read (and it's state updated).
Parameters
streamData stream containing data to load
typeNameString identifying the type of world geometry contained in the stream - not required if this manager only supports one type of world geometry.

◆ 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.

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.

◆ setAmbientLight()

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

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.

◆ 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 = 0.001,
Real  linearStart = 0.0,
Real  linearEnd = 1.0 
)

Sets the fogging mode applied to the scene.

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.
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,
float  minDistance,
float  maxDistance 
)

◆ setLateMaterialResolving()

virtual void Ogre::SceneManager::setLateMaterialResolving ( bool  isLate)
inlinevirtual

Sets whether to use late material resolving or not.

If set, materials will be resolved from the materials at the pass-setting stage and not at the render queue building stage. This is useful when the active material scheme during the render queue building stage is different from the one during the rendering stage.

◆ 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.

◆ 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. 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.

◆ setShadowTextureCasterMaterial()

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

Sets the default material to use for rendering shadow casters.

Remarks
By default shadow casters are rendered into the shadow texture using an automatically generated fixed-function pass. This allows basic projective texture shadows, but it's possible to use more advanced shadow techniques by overriding the caster materials, for example providing vertex and fragment programs to implement shadow maps.
You can rely on the ambient light in the scene being set to the requested texture shadow colour, if that's useful.
Note
Individual objects may also override the vertex program in your default material if their materials include shadow_caster_vertex_program_ref, shadow_caster_material entries, so if you use both make sure they are compatible.
Only a single pass is allowed in your material, although multiple techniques may be used for hardware fallback.

◆ 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

◆ setSkyBox()

virtual void Ogre::SceneManager::setSkyBox ( bool  enable,
const String materialName,
Real  distance = 5000,
bool  drawFirst = true,
const Quaternion orientation = Quaternion::IDENTITY,
const String groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME 
)
virtual

Enables / disables a 'sky box' i.e.

a 6-sided box at constant distance from the camera representing the sky.

Remarks
You could create a sky box yourself using the standard mesh and entity methods, but this creates a plane which the camera can never get closer or further away from - it moves with the camera. (NB you could create this effect by creating a world box which was attached to the same SceneNode as the Camera too, but this would only apply to a single camera whereas this skybox applies to any camera using this scene manager).
The material you use for the skybox can either contain layers which are single textures, or they can be cubic textures, i.e. made up of 6 images, one for each plane of the cube. See the TextureUnitState class for more information.
Parameters
enableTrue to enable the skybox, false to disable it
materialNameThe name of the material the box will use
distanceDistance in world coorinates from the camera to each plane of the box. The default is normally OK.
drawFirstIf true, the box is drawn before all other geometry in the scene, without updating the depth buffer. This is the safest rendering method since all other objects will always appear in front of the sky. However this is not the most efficient way if most of the sky is often occluded by other objects. If this is the case, you can set this parameter to false meaning it draws after all other geometry which can be an optimisation - however you must ensure that the distance value is large enough that no objects will 'poke through' the sky box when it is rendered.
orientationOptional parameter to specify the orientation of the box. By default the 'top' of the box is deemed to be in the +y direction, and the 'front' at the -z direction. You can use this parameter to rotate the sky if you want.
groupNameThe name of the resource group to which to assign the plane mesh.

◆ setSkyBoxEnabled()

virtual void Ogre::SceneManager::setSkyBoxEnabled ( bool  enable)
inlinevirtual

Enables / disables a 'sky box'.

◆ setSkyDome()

virtual void Ogre::SceneManager::setSkyDome ( bool  enable,
const String materialName,
Real  curvature = 10,
Real  tiling = 8,
Real  distance = 4000,
bool  drawFirst = true,
const Quaternion orientation = Quaternion::IDENTITY,
int  xsegments = 16,
int  ysegments = 16,
int  ysegments_keep = -1,
const String groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME 
)
virtual

Enables / disables a 'sky dome' i.e.

an illusion of a curved sky.

Remarks
A sky dome is actually formed by 5 sides of a cube, but with texture coordinates generated such that the surface appears curved like a dome. Sky domes are appropriate where you need a realistic looking sky where the scene is not going to be 'fogged', and there is always a 'floor' of some sort to prevent the viewer looking below the horizon (the distortion effect below the horizon can be pretty horrible, and there is never anyhting directly below the viewer). If you need a complete wrap-around background, use the setSkyBox method instead. You can actually combine a sky box and a sky dome if you want, to give a positional backdrop with an overlayed curved cloud layer.
Sky domes work well with 2D repeating textures like clouds. You can change the apparent 'curvature' of the sky depending on how your scene is viewed - lower curvatures are better for 'open' scenes like landscapes, whilst higher curvatures are better for say FPS levels where you don't see a lot of the sky at once and the exaggerated curve looks good.
Parameters
enableTrue to enable the skydome, false to disable it
materialNameThe name of the material the dome will use
curvatureThe curvature of the dome. Good values are between 2 and 65. Higher values are more curved leading to a smoother effect, lower values are less curved meaning more distortion at the horizons but a better distance effect.
tilingHow many times to tile the texture(s) across the dome.
distanceDistance in world coorinates from the camera to each plane of the box the dome is rendered on. The default is normally OK.
drawFirstIf true, the dome is drawn before all other geometry in the scene, without updating the depth buffer. This is the safest rendering method since all other objects will always appear in front of the sky. However this is not the most efficient way if most of the sky is often occluded by other objects. If this is the case, you can set this parameter to false meaning it draws after all other geometry which can be an optimisation - however you must ensure that the distance value is large enough that no objects will 'poke through' the sky when it is rendered.
orientationOptional parameter to specify the orientation of the dome. By default the 'top' of the dome is deemed to be in the +y direction, and the 'front' at the -z direction. You can use this parameter to rotate the sky if you want.
groupNameThe name of the resource group to which to assign the plane mesh.

◆ setSkyDomeEnabled()

virtual void Ogre::SceneManager::setSkyDomeEnabled ( bool  enable)
inlinevirtual

Enables / disables a 'sky dome'.

◆ setSkyPlane()

virtual void Ogre::SceneManager::setSkyPlane ( bool  enable,
const Plane plane,
const String materialName,
Real  scale = 1000,
Real  tiling = 10,
bool  drawFirst = true,
Real  bow = 0,
int  xsegments = 1,
int  ysegments = 1,
const String groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME 
)
virtual

Enables / disables a 'sky plane' i.e.

a plane at constant distance from the camera representing the sky.

Remarks
You can create sky planes yourself using the standard mesh and entity methods, but this creates a plane which the camera can never get closer or further away from - it moves with the camera. (NB you could create this effect by creating a world plane which was attached to the same SceneNode as the Camera too, but this would only apply to a single camera whereas this plane applies to any camera using this scene manager).
Note
To apply scaling, scrolls etc to the sky texture(s) you should use the TextureUnitState class methods.
Parameters
enableTrue to enable the plane, false to disable it
planeDetails of the plane, i.e. it's normal and it's distance from the camera.
materialNameThe name of the material the plane will use
scaleThe scaling applied to the sky plane - higher values mean a bigger sky plane - you may want to tweak this depending on the size of plane.d and the other characteristics of your scene
tilingHow many times to tile the texture across the sky. Applies to all texture layers. If you need finer control use the TextureUnitState texture coordinate transformation methods.
drawFirstIf true, the plane is drawn before all other geometry in the scene, without updating the depth buffer. This is the safest rendering method since all other objects will always appear in front of the sky. However this is not the most efficient way if most of the sky is often occluded by other objects. If this is the case, you can set this parameter to false meaning it draws after all other geometry which can be an optimisation - however you must ensure that the plane.d value is large enough that no objects will 'poke through' the sky plane when it is rendered.
bowIf zero, the plane will be completely flat (like previous versions. If above zero, the plane will be curved, allowing the sky to appear below camera level. Curved sky planes are simular to skydomes, but are more compatible with fog.
xsegments,ysegmentsDetermines the number of segments the plane will have to it. This is most important when you are bowing the plane, but may also be useful if you need tessellation on the plane to perform per-vertex effects.
groupNameThe name of the resource group to which to assign the plane mesh.

◆ setSkyPlaneEnabled()

virtual void Ogre::SceneManager::setSkyPlaneEnabled ( bool  enable)
inlinevirtual

Enables / disables a 'sky plane'.

◆ 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.

◆ setWorldGeometry() [1/2]

virtual void Ogre::SceneManager::setWorldGeometry ( const String filename)
virtual

Sets the source of the 'world' geometry, i.e.

the large, mainly static geometry making up the world e.g. rooms, landscape etc.

Remarks
Depending on the type of SceneManager (subclasses will be specialised for particular world geometry types) you have requested via the Root or SceneManagerEnumerator classes, you can pass a filename to this method and it will attempt to load the world-level geometry for use. If you try to load an inappropriate type of world data an exception will be thrown. The default SceneManager cannot handle any sort of world geometry and so will always throw an exception. However subclasses like BspSceneManager can load particular types of world geometry e.g. "q3dm1.bsp".

◆ setWorldGeometry() [2/2]

virtual void Ogre::SceneManager::setWorldGeometry ( DataStreamPtr stream,
const String typeName = BLANKSTRING 
)
virtual

Sets the source of the 'world' geometry, i.e.

the large, mainly static geometry making up the world e.g. rooms, landscape etc.

Remarks
Depending on the type of SceneManager (subclasses will be specialised for particular world geometry types) you have requested via the Root or SceneManagerEnumerator classes, you can pass a stream to this method and it will attempt to load the world-level geometry for use. If the manager can only handle one input format the typeName parameter is not required. The stream passed will be read (and it's state updated).
Parameters
streamData stream containing data to load
typeNameString identifying the type of world geometry contained in the stream - not required if this manager only supports one type of world geometry.

◆ showBoundingBoxes()

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

Allows all bounding boxes of scene nodes to be displayed.

◆ unregisterSceneNodeListener()

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

Unregisters a registered node for listening.

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. 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. updateAllTransforms

Remarks
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 ( void  )

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: