Ogre::SceneManager Class Reference

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

#include <OgreSceneManager.h>

Inheritance diagram for Ogre::SceneManager:

Inheritance graph
[legend]

List of all members.

Public Types

enum  IlluminationRenderStage { IRS_NONE, IRS_RENDER_TO_TEXTURE, IRS_RENDER_RECEIVER_PASS }
 Describes the stage of rendering when performing complex illumination. More...
enum  SpecialCaseRenderQueueMode { SCRQM_INCLUDE, SCRQM_EXCLUDE }
 Enumeration of the possible modes allowed for processing the special case render queue list. More...
enum  PrefabType { PT_PLANE, PT_CUBE, PT_SPHERE }
 Prefab shapes available without loading a model. More...
typedef MapIterator
< CameraList
CameraIterator
typedef MapIterator
< AnimationList
AnimationIterator
typedef MapIterator
< MovableObjectMap
MovableObjectIterator

Public Member Functions

 SceneManager (const String &instanceName)
 Constructor.
virtual ~SceneManager ()
 Default destructor.
const StringgetName (void) const
 Mutex to protect the scene graph from simultaneous access from multiple threads.
virtual const StringgetTypeName (void) const =0
 Retrieve the type name of this scene manager.
virtual CameracreateCamera (const String &name)
 Creates a camera to be managed by this scene manager.
virtual CameragetCamera (const String &name) const
 Retrieves a pointer to the named camera.
virtual bool hasCamera (const String &name) const
 Returns whether a camera with the given name exists.
virtual void destroyCamera (Camera *cam)
 Removes a camera from the scene.
virtual void destroyCamera (const String &name)
 Removes a camera from the scene.
virtual void destroyAllCameras (void)
 Removes (and destroys) all cameras from the scene.
virtual LightcreateLight (const String &name)
 Creates a light for use in the scene.
virtual LightgetLight (const String &name) const
 Returns a pointer to the named Light which has previously been added to the scene.
virtual bool hasLight (const String &name) const
 Returns whether a light with the given name exists.
virtual const PlaneListgetLightClippingPlanes (Light *l)
 Retrieve a set of clipping planes for a given light.
virtual const RealRectgetLightScissorRect (Light *l, const Camera *cam)
 Retrieve a scissor rectangle for a given light and camera.
virtual void destroyLight (const String &name)
 Removes the named light from the scene and destroys it.
virtual void destroyLight (Light *light)
 Removes the light from the scene and destroys it based on a pointer.
virtual void destroyAllLights (void)
 Removes and destroys all lights in the scene.
virtual void _notifyLightsDirty (void)
 Advance method to increase the lights dirty counter due lights changed.
ulong _getLightsDirtyCounter (void) const
 Advance method to gets the lights dirty counter.
virtual const LightList_getLightsAffectingFrustum (void) const
 Get the list of lights which could be affecting the frustum.
virtual void _populateLightList (const Vector3 &position, Real radius, LightList &destList)
 Populate a light list with an ordered set of the lights which are closest to the position specified.
virtual SceneNodecreateSceneNode (void)
 Creates an instance of a SceneNode.
virtual SceneNodecreateSceneNode (const String &name)
 Creates an instance of a SceneNode with a given name.
virtual void destroySceneNode (const String &name)
 Destroys a SceneNode with a given name.
virtual void destroySceneNode (SceneNode *sn)
 Destroys a SceneNode.
virtual SceneNodegetRootSceneNode (void)
 Gets the SceneNode at the root of the scene hierarchy.
virtual SceneNodegetSceneNode (const String &name) const
 Retrieves a named SceneNode from the scene graph.
virtual bool hasSceneNode (const String &name) const
 Returns whether a scene node with the given name exists.
virtual EntitycreateEntity (const String &entityName, const String &meshName)
 Create an Entity (instance of a discrete mesh).
virtual EntitycreateEntity (const String &entityName, PrefabType ptype)
 Create an Entity (instance of a discrete mesh) from a range of prefab shapes.
virtual EntitygetEntity (const String &name) const
 Retrieves a pointer to the named Entity.
virtual bool hasEntity (const String &name) const
 Returns whether an entity with the given name exists.
virtual void destroyEntity (Entity *ent)
 Removes & destroys an Entity from the SceneManager.
virtual void destroyEntity (const String &name)
 Removes & destroys an Entity from the SceneManager by name.
virtual void destroyAllEntities (void)
 Removes & destroys all Entities.
virtual ManualObjectcreateManualObject (const String &name)
 Create a ManualObject, an object which you populate with geometry manually through a GL immediate-mode style interface.
virtual ManualObjectgetManualObject (const String &name) const
 Retrieves a pointer to the named ManualObject.
virtual bool hasManualObject (const String &name) const
 Returns whether a manual object with the given name exists.
virtual void destroyManualObject (ManualObject *obj)
 Removes & destroys a ManualObject from the SceneManager.
virtual void destroyManualObject (const String &name)
 Removes & destroys a ManualObject from the SceneManager.
virtual void destroyAllManualObjects (void)
 Removes & destroys all ManualObjects from the SceneManager.
virtual BillboardChaincreateBillboardChain (const String &name)
 Create a BillboardChain, an object which you can use to render a linked chain of billboards.
virtual BillboardChaingetBillboardChain (const String &name) const
 Retrieves a pointer to the named BillboardChain.
virtual bool hasBillboardChain (const String &name) const
 Returns whether a billboard chain with the given name exists.
virtual void destroyBillboardChain (BillboardChain *obj)
 Removes & destroys a BillboardChain from the SceneManager.
virtual void destroyBillboardChain (const String &name)
 Removes & destroys a BillboardChain from the SceneManager.
virtual void destroyAllBillboardChains (void)
 Removes & destroys all BillboardChains from the SceneManager.
virtual RibbonTrailcreateRibbonTrail (const String &name)
 Create a RibbonTrail, an object which you can use to render a linked chain of billboards which follows one or more nodes.
virtual RibbonTrailgetRibbonTrail (const String &name) const
 Retrieves a pointer to the named RibbonTrail.
virtual bool hasRibbonTrail (const String &name) const
 Returns whether a ribbon trail with the given name exists.
virtual void destroyRibbonTrail (RibbonTrail *obj)
 Removes & destroys a RibbonTrail from the SceneManager.
virtual void destroyRibbonTrail (const String &name)
 Removes & destroys a RibbonTrail from the SceneManager.
virtual void destroyAllRibbonTrails (void)
 Removes & destroys all RibbonTrails from the SceneManager.
virtual ParticleSystemcreateParticleSystem (const String &name, const String &templateName)
 Creates a particle system based on a template.
virtual ParticleSystemcreateParticleSystem (const String &name, size_t quota=500, const String &resourceGroup=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
 Create a blank particle system.
virtual ParticleSystemgetParticleSystem (const String &name) const
 Retrieves a pointer to the named ParticleSystem.
virtual bool hasParticleSystem (const String &name) const
 Returns whether a particle system with the given name exists.
virtual void destroyParticleSystem (ParticleSystem *obj)
 Removes & destroys a ParticleSystem from the SceneManager.
virtual void destroyParticleSystem (const String &name)
 Removes & destroys a ParticleSystem from the SceneManager.
virtual void destroyAllParticleSystems (void)
 Removes & destroys all ParticleSystems from the SceneManager.
virtual void clearScene (void)
 Empties the entire scene, inluding all SceneNodes, Entities, Lights, BillboardSets etc.
void setAmbientLight (const ColourValue &colour)
 Sets the ambient light level to be used for the scene.
const ColourValuegetAmbientLight (void) const
 Returns the ambient light level to be used for the scene.
virtual void prepareWorldGeometry (const String &filename)
 Sets the source of the 'world' geometry, i.e.
virtual void prepareWorldGeometry (DataStreamPtr &stream, const String &typeName=StringUtil::BLANK)
 Sets the source of the 'world' geometry, i.e.
virtual void setWorldGeometry (const String &filename)
 Sets the source of the 'world' geometry, i.e.
virtual void setWorldGeometry (DataStreamPtr &stream, const String &typeName=StringUtil::BLANK)
 Sets the source of the 'world' geometry, i.e.
virtual size_t estimateWorldGeometry (const String &filename)
 Estimate the number of loading stages required to load the named world geometry.
virtual size_t estimateWorldGeometry (DataStreamPtr &stream, const String &typeName=StringUtil::BLANK)
 Estimate the number of loading stages required to load the named world geometry.
virtual ViewPoint getSuggestedViewpoint (bool random=false)
 Asks the SceneManager to provide a suggested viewpoint from which the scene should be viewed.
virtual bool setOption (const String &strKey, const void *pValue)
 Method for setting a specific option of the Scene Manager.
virtual bool getOption (const String &strKey, void *pDestValue)
 Method for getting the value of an implementation-specific Scene Manager option.
virtual bool hasOption (const String &strKey) const
 Method for verifying wether the scene manager has an implementation-specific option.
virtual bool getOptionValues (const String &strKey, StringVector &refValueList)
 Method for getting all possible values for a specific option.
virtual bool getOptionKeys (StringVector &refKeys)
 Method for getting all the implementation-specific options of the scene manager.
virtual void _updateSceneGraph (Camera *cam)
 Internal method for updating the scene graph ie the tree of SceneNode instances managed by this class.
virtual void _findVisibleObjects (Camera *cam, VisibleObjectsBoundsInfo *visibleBounds, bool onlyShadowCasters)
 Internal method which parses the scene to find visible objects to render.
virtual void _applySceneAnimations (void)
 Internal method for applying animations to scene nodes.
virtual void _renderVisibleObjects (void)
 Sends visible objects found in _findVisibleObjects to the rendering engine.
virtual void _renderScene (Camera *camera, Viewport *vp, bool includeOverlays)
 Prompts the class to send its contents to the renderer.
virtual void _queueSkiesForRendering (Camera *cam)
 Internal method for queueing the sky objects with the params as previously set through setSkyBox, setSkyPlane and setSkyDome.
virtual void _setDestinationRenderSystem (RenderSystem *sys)
 Notifies the scene manager of its destination render system.
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.
virtual void _setSkyPlane (bool enable, const Plane &plane, const String &materialName, Real scale=1000, Real tiling=10, uint8 renderQueue=RENDER_QUEUE_SKIES_EARLY, Real bow=0, int xsegments=1, int ysegments=1, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
 Enables / disables a 'sky plane' i.e.
virtual bool isSkyPlaneEnabled (void) const
 Return whether a key plane is enabled.
virtual SceneNodegetSkyPlaneNode (void) const
 Get the sky plane node, if enabled.
virtual const
SkyPlaneGenParameters
getSkyPlaneGenParameters (void) const
 Get the parameters used to construct the SkyPlane, if any.
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.
virtual void _setSkyBox (bool enable, const String &materialName, Real distance=5000, uint8 renderQueue=RENDER_QUEUE_SKIES_EARLY, const Quaternion &orientation=Quaternion::IDENTITY, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
 Enables / disables a 'sky box' i.e.
virtual bool isSkyBoxEnabled (void) const
 Return whether a skybox is enabled.
virtual SceneNodegetSkyBoxNode (void) const
 Get the skybox node, if enabled.
virtual const
SkyBoxGenParameters
getSkyBoxGenParameters (void) const
 Get the parameters used to generate the current SkyBox, if any.
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.
virtual void _setSkyDome (bool enable, const String &materialName, Real curvature=10, Real tiling=8, Real distance=4000, uint8 renderQueue=RENDER_QUEUE_SKIES_EARLY, 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.
virtual bool isSkyDomeEnabled (void) const
 Return whether a skydome is enabled.
virtual SceneNodegetSkyDomeNode (void) const
 Get the sky dome node, if enabled.
virtual const
SkyDomeGenParameters
getSkyDomeGenParameters (void) const
 Get the parameters used to generate the current SkyDome, if any.
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.
virtual FogMode getFogMode (void) const
 Returns the fog mode for the scene.
virtual const
ColourValue
getFogColour (void) const
 Returns the fog colour for the scene.
virtual Real getFogStart (void) const
 Returns the fog start distance for the scene.
virtual Real getFogEnd (void) const
 Returns the fog end distance for the scene.
virtual Real getFogDensity (void) const
 Returns the fog density for the scene.
virtual BillboardSetcreateBillboardSet (const String &name, unsigned int poolSize=20)
 Creates a new BillboardSet for use with this scene manager.
virtual BillboardSetgetBillboardSet (const String &name) const
 Retrieves a pointer to the named BillboardSet.
virtual bool hasBillboardSet (const String &name) const
 Returns whether a billboardset with the given name exists.
virtual void destroyBillboardSet (BillboardSet *set)
 Removes & destroys an BillboardSet from the SceneManager.
virtual void destroyBillboardSet (const String &name)
 Removes & destroys an BillboardSet from the SceneManager by name.
virtual void destroyAllBillboardSets (void)
 Removes & destroys all BillboardSets.
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.
virtual bool getDisplaySceneNodes (void) const
 Returns true if all scene nodes axis are to be displayed.
virtual AnimationcreateAnimation (const String &name, Real length)
 Creates an animation which can be used to animate scene nodes.
virtual AnimationgetAnimation (const String &name) const
 Looks up an Animation object previously created with createAnimation.
virtual bool hasAnimation (const String &name) const
 Returns whether an animation with the given name exists.
virtual void destroyAnimation (const String &name)
 Destroys an Animation.
virtual void destroyAllAnimations (void)
 Removes all animations created using this SceneManager.
virtual AnimationStatecreateAnimationState (const String &animName)
 Create an AnimationState object for managing application of animations.
virtual AnimationStategetAnimationState (const String &animName) const
 Retrieves animation state as previously created using createAnimationState.
virtual bool hasAnimationState (const String &name) const
 Returns whether an animation state with the given name exists.
virtual void destroyAnimationState (const String &name)
 Destroys an AnimationState.
virtual void destroyAllAnimationStates (void)
 Removes all animation states created using this SceneManager.
virtual void manualRender (RenderOperation *rend, Pass *pass, Viewport *vp, const Matrix4 &worldMatrix, const Matrix4 &viewMatrix, const Matrix4 &projMatrix, bool doBeginEndFrame=false)
 Manual rendering method, for advanced users only.
virtual RenderQueuegetRenderQueue (void)
 Retrieves the internal render queue, for advanced users only.
virtual void addRenderQueueListener (RenderQueueListener *newListener)
 Registers a new RenderQueueListener which will be notified when render queues are processed.
virtual void removeRenderQueueListener (RenderQueueListener *delListener)
 Removes a listener previously added with addRenderQueueListener.
virtual void addSpecialCaseRenderQueue (uint8 qid)
 Adds an item to the 'special case' render queue list.
virtual void removeSpecialCaseRenderQueue (uint8 qid)
 Removes an item to the 'special case' render queue list.
virtual void clearSpecialCaseRenderQueues (void)
 Clears the 'special case' render queue list.
virtual void setSpecialCaseRenderQueueMode (SpecialCaseRenderQueueMode mode)
 Sets the way the special case render queue list is processed.
virtual
SpecialCaseRenderQueueMode 
getSpecialCaseRenderQueueMode (void)
 Gets the way the special case render queue list is processed.
virtual bool isRenderQueueToBeProcessed (uint8 qid)
 Returns whether or not the named queue will be rendered based on the current 'special case' render queue list and mode.
virtual void setWorldGeometryRenderQueue (uint8 qid)
 Sets the render queue that the world geometry (if any) this SceneManager renders will be associated with.
virtual uint8 getWorldGeometryRenderQueue (void)
 Gets the render queue that the world geometry (if any) this SceneManager renders will be associated with.
virtual void showBoundingBoxes (bool bShow)
 Allows all bounding boxes of scene nodes to be displayed.
virtual bool getShowBoundingBoxes () const
 Returns if all bounding boxes of scene nodes are to be displayed.
virtual void _notifyAutotrackingSceneNode (SceneNode *node, bool autoTrack)
 Internal method for notifying the manager that a SceneNode is autotracking.
virtual
AxisAlignedBoxSceneQuery
createAABBQuery (const AxisAlignedBox &box, unsigned long mask=0xFFFFFFFF)
 Creates an AxisAlignedBoxSceneQuery for this scene manager.
virtual
SphereSceneQuery
createSphereQuery (const Sphere &sphere, unsigned long mask=0xFFFFFFFF)
 Creates a SphereSceneQuery for this scene manager.
virtual
PlaneBoundedVolumeListSceneQuery
createPlaneBoundedVolumeQuery (const PlaneBoundedVolumeList &volumes, unsigned long mask=0xFFFFFFFF)
 Creates a PlaneBoundedVolumeListSceneQuery for this scene manager.
virtual RaySceneQuerycreateRayQuery (const Ray &ray, unsigned long mask=0xFFFFFFFF)
 Creates a RaySceneQuery for this scene manager.
virtual
IntersectionSceneQuery
createIntersectionQuery (unsigned long mask=0xFFFFFFFF)
 Creates an IntersectionSceneQuery for this scene manager.
virtual void destroyQuery (SceneQuery *query)
 Destroys a scene query of any type.
CameraIterator getCameraIterator (void)
 Returns a specialised MapIterator over all cameras in the scene.
AnimationIterator getAnimationIterator (void)
 Returns a specialised MapIterator over all animations in the scene.
AnimationStateIterator getAnimationStateIterator (void)
 Returns a specialised MapIterator over all animation states in the scene.
virtual void setShadowTechnique (ShadowTechnique technique)
 Sets the general shadow technique to be used in this scene.
virtual ShadowTechnique getShadowTechnique (void) const
 Gets the current shadow technique.
virtual void setShowDebugShadows (bool debug)
 Enables / disables the rendering of debug information for shadows.
virtual bool getShowDebugShadows (void) const
 Are debug shadows shown?
virtual void setShadowColour (const ColourValue &colour)
 Set the colour used to modulate areas in shadow.
virtual const
ColourValue
getShadowColour (void) const
 Get the colour used to modulate areas in shadow.
virtual void setShadowDirectionalLightExtrusionDistance (Real dist)
 Sets the distance a shadow volume is extruded for a directional light.
virtual Real getShadowDirectionalLightExtrusionDistance (void) const
 Gets the distance a shadow volume is extruded for a directional light.
virtual void setShadowFarDistance (Real distance)
 Sets the default maximum distance away from the camera that shadows will be visible.
virtual Real getShadowFarDistance (void) const
 Gets the default maximum distance away from the camera that shadows will be visible.
virtual Real getShadowFarDistanceSquared (void) const
virtual void setShadowIndexBufferSize (size_t size)
 Sets the maximum size of the index buffer used to render shadow primitives.
virtual size_t getShadowIndexBufferSize (void) const
 Get the size of the shadow index buffer.
virtual void setShadowTextureSize (unsigned short size)
 Set the size of the texture used for all texture-based shadows.
virtual void setShadowTextureConfig (size_t shadowIndex, unsigned short width, unsigned short height, PixelFormat format)
 Set the detailed configuration for a shadow texture.
virtual void setShadowTextureConfig (size_t shadowIndex, const ShadowTextureConfig &config)
 Set the detailed configuration for a shadow texture.
ConstShadowTextureConfigIterator getShadowTextureConfigIterator () const
 Get an iterator over the current shadow texture settings.
virtual void setShadowTexturePixelFormat (PixelFormat fmt)
 Set the pixel format of the textures used for texture-based shadows.
virtual void setShadowTextureCount (size_t count)
 Set the number of textures allocated for texture-based shadows.
size_t getShadowTextureCount (void) const
 Get the number of the textures allocated for texture based shadows.
void setShadowTextureCountPerLightType (Light::LightTypes type, size_t count)
 Set the number of shadow textures a light type uses.
size_t getShadowTextureCountPerLightType (Light::LightTypes type) const
 Get the number of shadow textures is assigned for the given light type.
virtual void setShadowTextureSettings (unsigned short size, unsigned short count, PixelFormat fmt=PF_X8R8G8B8)
 Sets the size and count of textures used in texture-based shadows.
virtual const
TexturePtr
getShadowTexture (size_t shadowIndex)
 Get a reference to the shadow texture currently in use at the given index.
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.
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.
virtual void setShadowTextureFadeStart (Real fadeStart)
 Sets the proportional distance at which texture shadows begin to fade out.
virtual void setShadowTextureFadeEnd (Real fadeEnd)
 Sets the proportional distance at which texture shadows finish to fading out.
virtual void setShadowTextureSelfShadow (bool selfShadow)
 Sets whether or not texture shadows should attempt to self-shadow.
virtual bool getShadowTextureSelfShadow (void) const
 Gets whether or not texture shadows attempt to self-shadow.
virtual void setShadowTextureCasterMaterial (const String &name)
 Sets the default material to use for rendering shadow casters.
virtual void setShadowTextureReceiverMaterial (const String &name)
 Sets the default material to use for rendering shadow receivers.
virtual void setShadowCasterRenderBackFaces (bool bf)
 Sets whether or not shadow casters should be rendered into shadow textures using their back faces rather than their front faces.
virtual bool getShadowCasterRenderBackFaces () const
 Gets whether or not shadow casters should be rendered into shadow textures using their back faces rather than their front faces.
virtual void setShadowCameraSetup (const ShadowCameraSetupPtr &shadowSetup)
 Set the shadow camera setup to use for all lights which don't have their own shadow camera setup.
virtual const
ShadowCameraSetupPtr
getShadowCameraSetup () const
 Get the shadow camera setup in use for all lights which don't have their own shadow camera setup.
virtual void setShadowUseInfiniteFarPlane (bool enable)
 Sets whether we should use an inifinite camera far plane when rendering stencil shadows.
virtual bool isShadowTechniqueStencilBased (void) const
 Is there a stencil shadow based shadowing technique in use?
virtual bool isShadowTechniqueTextureBased (void) const
 Is there a texture shadow based shadowing technique in use?
virtual bool isShadowTechniqueModulative (void) const
 Is there a modulative shadowing technique in use?
virtual bool isShadowTechniqueAdditive (void) const
 Is there an additive shadowing technique in use?
virtual bool isShadowTechniqueIntegrated (void) const
 Is the shadow technique integrated into primary materials?
virtual bool isShadowTechniqueInUse (void) const
 Is there any shadowing technique in use?
virtual void setShadowUseLightClipPlanes (bool enabled)
 Sets whether when using a built-in additive shadow mode, user clip planes should be used to restrict light rendering.
virtual bool getShadowUseLightClipPlanes () const
 Gets whether when using a built-in additive shadow mode, user clip planes should be used to restrict light rendering.
virtual void addListener (Listener *s)
 Add a listener which will get called back on scene manager events.
virtual void removeListener (Listener *s)
 Remove a listener.
virtual StaticGeometrycreateStaticGeometry (const String &name)
 Creates a StaticGeometry instance suitable for use with this SceneManager.
virtual StaticGeometrygetStaticGeometry (const String &name) const
 Retrieve a previously created StaticGeometry instance.
virtual bool hasStaticGeometry (const String &name) const
 Returns whether a static geometry instance with the given name exists.
virtual void destroyStaticGeometry (StaticGeometry *geom)
 Remove & destroy a StaticGeometry instance.
virtual void destroyStaticGeometry (const String &name)
 Remove & destroy a StaticGeometry instance.
virtual void destroyAllStaticGeometry (void)
 Remove & destroy all StaticGeometry instances.
virtual
InstancedGeometry
createInstancedGeometry (const String &name)
 Creates a InstancedGeometry instance suitable for use with this SceneManager.
virtual
InstancedGeometry
getInstancedGeometry (const String &name) const
 Retrieve a previously created InstancedGeometry instance.
virtual void destroyInstancedGeometry (InstancedGeometry *geom)
 Remove & destroy a InstancedGeometry instance.
virtual void destroyInstancedGeometry (const String &name)
 Remove & destroy a InstancedGeometry instance.
virtual void destroyAllInstancedGeometry (void)
 Remove & destroy all InstancedGeometry instances.
virtual MovableObjectcreateMovableObject (const String &name, const String &typeName, const NameValuePairList *params=0)
 Create a movable object of the type specified.
virtual void destroyMovableObject (const String &name, const String &typeName)
 Destroys a MovableObject with the name specified, of the type specified.
virtual void destroyMovableObject (MovableObject *m)
 Destroys a MovableObject.
virtual void destroyAllMovableObjectsByType (const String &typeName)
 Destroy all MovableObjects of a given type.
virtual void destroyAllMovableObjects (void)
 Destroy all MovableObjects.
virtual MovableObjectgetMovableObject (const String &name, const String &typeName) const
 Get a reference to a previously created MovableObject.
virtual bool hasMovableObject (const String &name, const String &typeName) const
 Returns whether a movable object instance with the given name exists.
virtual
MovableObjectIterator 
getMovableObjectIterator (const String &typeName)
 Get an iterator over all MovableObect instances of a given type.
virtual void injectMovableObject (MovableObject *m)
 Inject a MovableObject instance created externally.
virtual void extractMovableObject (const String &name, const String &typeName)
 Extract a previously injected MovableObject.
virtual void extractMovableObject (MovableObject *m)
 Extract a previously injected MovableObject.
virtual void extractAllMovableObjectsByType (const String &typeName)
 Extract all injected MovableObjects of a given type.
virtual void setVisibilityMask (uint32 vmask)
 Sets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible.
virtual uint32 getVisibilityMask (void)
 Gets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible.
uint32 _getCombinedVisibilityMask (void) const
 Internal method for getting the combination between the global visibility mask and the per-viewport visibility mask.
virtual void setFindVisibleObjects (bool find)
 Sets whether the SceneManager should search for visible objects, or whether they are being manually handled.
virtual bool getFindVisibleObjects (void)
 Gets whether the SceneManager should search for visible objects, or whether they are being manually handled.
virtual void setNormaliseNormalsOnScale (bool n)
 Set whether to automatically normalise normals on objects whenever they are scaled.
virtual bool getNormaliseNormalsOnScale () const
 Get whether to automatically normalise normals on objects whenever they are scaled.
virtual void setFlipCullingOnNegativeScale (bool n)
 Set whether to automatically flip the culling mode on objects whenever they are negatively scaled.
virtual bool getFlipCullingOnNegativeScale () const
 Get whether to automatically flip the culling mode on objects whenever they are negatively scaled.
virtual void _injectRenderWithPass (Pass *pass, Renderable *rend, bool shadowDerivation=true)
 Render something as if it came from the current queue.
virtual void _suppressRenderStateChanges (bool suppress)
 Indicates to the SceneManager whether it should suppress changing the RenderSystem states when rendering objects.
virtual bool _areRenderStateChangesSuppressed (void) const
 Are render state changes suppressed?
virtual const Pass_setPass (const Pass *pass, bool evenIfSuppressed=false, bool shadowDerivation=true)
 Internal method for setting up the renderstate for a rendering pass.
virtual void _suppressShadows (bool suppress)
 Indicates to the SceneManager whether it should suppress the active shadow rendering technique until told otherwise.
virtual bool _areShadowsSuppressed (void) const
 Are shadows suppressed?
virtual void _renderQueueGroupObjects (RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
 Render the objects in a given queue group.
void setQueuedRenderableVisitor (SceneMgrQueuedRenderableVisitor *visitor)
 Advanced method for supplying an alternative visitor, used for parsing the render queues and sending the results to the renderer.
SceneMgrQueuedRenderableVisitorgetQueuedRenderableVisitor (void) const
 Gets the current visitor object which processes queued renderables.
RenderSystemgetDestinationRenderSystem ()
 Get the rendersystem subclass to which the output of this Scene Manager gets sent.
ViewportgetCurrentViewport (void) const
 Gets the current viewport being rendered (advanced use only, only valid during viewport update.
const
VisibleObjectsBoundsInfo
getVisibleObjectsBoundsInfo (const Camera *cam) const
 Returns a visibility boundary box for a specific camera.
const
VisibleObjectsBoundsInfo
getShadowCasterBoundsInfo (const Light *light, size_t iteration=0) const
 Returns the shadow caster AAB for a specific light-camera combination.
virtual void setCameraRelativeRendering (bool rel)
 Set whether to use camera-relative co-ordinates when rendering, ie to always place the camera at the origin and move the world around it.
virtual bool getCameraRelativeRendering () const
 Get whether to use camera-relative co-ordinates when rendering, ie to always place the camera at the origin and move the world around it.
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
void * operator new (size_t sz)
void * operator new (size_t sz, void *ptr)
 placement operator new
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
void * operator new[] (size_t sz)
void operator delete (void *ptr)
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 *)

Static Public Attributes

static uint32 WORLD_GEOMETRY_TYPE_MASK
 Query type mask which will be used for world geometry.
static uint32 ENTITY_TYPE_MASK
 Query type mask which will be used for entities.
static uint32 FX_TYPE_MASK
 Query type mask which will be used for effects like billboardsets / particle systems.
static uint32 STATICGEOMETRY_TYPE_MASK
 Query type mask which will be used for StaticGeometry.
static uint32 LIGHT_TYPE_MASK
 Query type mask which will be used for lights.
static uint32 FRUSTUM_TYPE_MASK
 Query type mask which will be used for frusta and cameras.
static uint32 USER_TYPE_MASK_LIMIT
 User type mask limit.

Protected Types

enum  BoxPlane {
  BP_FRONT = 0, BP_BACK = 1, BP_LEFT = 2, BP_RIGHT = 3,
  BP_UP = 4, BP_DOWN = 5
}
typedef std::map
< String, Camera * > 
CameraList
typedef std::map
< String,
StaticGeometry * > 
StaticGeometryList
typedef std::map
< String,
InstancedGeometry * > 
InstancedGeometryList
typedef std::map
< String, SceneNode * > 
SceneNodeList
typedef std::set
< SceneNode * > 
AutoTrackingSceneNodes
 Autotracking scene nodes.
typedef std::set< uint8SpecialCaseRenderQueueList
typedef std::map
< const Camera *,
VisibleObjectsBoundsInfo
CamVisibleObjectsMap
 Visible objects bounding box list.
typedef std::map
< const Camera *,
const Light * > 
ShadowCamLightMapping
 ShadowCamera to light mapping.
typedef std::vector
< LightInfo
LightInfoList
typedef std::map
< String,
MovableObject * > 
MovableObjectMap
typedef std::map
< String,
MovableObjectCollection * > 
MovableObjectCollectionMap
typedef std::map
< String, Animation * > 
AnimationList
 Storage of animations, lookup by name.
typedef std::vector
< RenderQueueListener * > 
RenderQueueListenerList
typedef std::vector
< Listener * > 
ListenerList
typedef std::vector
< Camera * > 
ShadowTextureCameraList
typedef std::map
< Light *,
LightClippingInfo
LightClippingInfoMap
typedef std::vector
< ShadowCaster * > 
ShadowCasterList

Protected Member Functions

virtual SceneNodecreateSceneNodeImpl (void)
 Subclasses can override this to ensure their specialised SceneNode is used.
virtual SceneNodecreateSceneNodeImpl (const String &name)
 Subclasses can override this to ensure their specialised SceneNode is used.
MovableObjectCollectiongetMovableObjectCollection (const String &typeName)
 Gets the movable object collection for the given type name.
const
MovableObjectCollection
getMovableObjectCollection (const String &typeName) const
 Gets the movable object collection for the given type name.
virtual void initRenderQueue (void)
 Mutex over the collection of MovableObject types.
virtual const PassderiveShadowCasterPass (const Pass *pass)
 Internal method for turning a regular pass into a shadow caster pass.
virtual const PassderiveShadowReceiverPass (const Pass *pass)
 Internal method for turning a regular pass into a shadow receiver pass.
virtual bool validatePassForRendering (const Pass *pass)
 Internal method to validate whether a Pass should be allowed to render.
virtual bool validateRenderableForRendering (const Pass *pass, const Renderable *rend)
 Internal method to validate whether a Renderable should be allowed to render.
virtual MeshPtr createSkyboxPlane (BoxPlane bp, Real distance, const Quaternion &orientation, const String &groupName)
virtual MeshPtr createSkydomePlane (BoxPlane bp, Real curvature, Real tiling, Real distance, const Quaternion &orientation, int xsegments, int ysegments, int ySegmentsToKeep, const String &groupName)
virtual void useRenderableViewProjMode (const Renderable *pRend)
 Internal method used by _renderSingleObject to deal with renderables which override the camera's own view / projection materices.
virtual void resetViewProjMode (void)
 Internal method used by _renderSingleObject to deal with renderables which override the camera's own view / projection matrices.
virtual bool fireRenderQueueStarted (uint8 id, const String &invocation)
 Internal method for firing the queue start event, returns true if queue is to be skipped.
virtual bool fireRenderQueueEnded (uint8 id, const String &invocation)
 Internal method for firing the queue end event, returns true if queue is to be repeated.
virtual void fireShadowTexturesUpdated (size_t numberOfShadowTextures)
 Internal method for firing the texture shadows updated event.
virtual void fireShadowTexturesPreCaster (Light *light, Camera *camera, size_t iteration)
 Internal method for firing the pre caster texture shadows event.
virtual void fireShadowTexturesPreReceiver (Light *light, Frustum *f)
 Internal method for firing the pre receiver texture shadows event.
virtual void firePreFindVisibleObjects (Viewport *v)
 Internal method for firing find visible objects event.
virtual void firePostFindVisibleObjects (Viewport *v)
 Internal method for firing find visible objects event.
virtual void setViewport (Viewport *vp)
 Internal method for setting the destination viewport for the next render.
virtual void renderVisibleObjectsDefaultSequence (void)
 Internal method for rendering all objects using the default queue sequence.
virtual void renderVisibleObjectsCustomSequence (RenderQueueInvocationSequence *s)
 Internal method for rendering all objects using a custom queue sequence.
virtual void prepareRenderQueue (void)
 Internal method for preparing the render queue for use with each render.
virtual void renderSingleObject (Renderable *rend, const Pass *pass, bool lightScissoringClipping, bool doLightIteration, const LightList *manualLightList=0)
 Internal utility method for rendering a single object.
virtual
AutoParamDataSource
createAutoParamDataSource (void) const
 Internal method for creating the AutoParamDataSource instance.
virtual void findLightsAffectingFrustum (const Camera *camera)
 Internal method for locating a list of lights which could be affecting the frustum.
virtual void initShadowVolumeMaterials (void)
 Internal method for setting up materials for shadows.
virtual void ensureShadowTexturesCreated ()
 Internal method for creating shadow textures (texture-based shadows).
virtual void destroyShadowTextures (void)
 Internal method for destroying shadow textures (texture-based shadows).
virtual void prepareShadowTextures (Camera *cam, Viewport *vp)
 Internal method for preparing shadow textures ready for use in a regular render.
virtual void renderShadowVolumesToStencil (const Light *light, const Camera *cam, bool calcScissor)
 Internal method for rendering all the objects for a given light into the stencil buffer.
virtual void setShadowVolumeStencilState (bool secondpass, bool zfail, bool twosided)
 Internal utility method for setting stencil state for rendering shadow volumes.
void renderShadowVolumeObjects (ShadowCaster::ShadowRenderableListIterator iShadowRenderables, Pass *pass, const LightList *manualLightList, unsigned long flags, bool secondpass, bool zfail, bool twosided)
 Render a set of shadow renderables.
virtual const
ShadowCasterList
findShadowCastersForLight (const Light *light, const Camera *camera)
 Internal method for locating a list of shadow casters which could be affecting the frustum for a given light.
virtual void renderBasicQueueGroupObjects (RenderQueueGroup *pGroup, QueuedRenderableCollection::OrganisationMode om)
 Render a group in the ordinary way.
virtual void renderAdditiveStencilShadowedQueueGroupObjects (RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
 Render a group with the added complexity of additive stencil shadows.
virtual void renderModulativeStencilShadowedQueueGroupObjects (RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
 Render a group with the added complexity of modulative stencil shadows.
virtual void renderTextureShadowCasterQueueGroupObjects (RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
 Render a group rendering only shadow casters.
virtual void renderTextureShadowReceiverQueueGroupObjects (RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
 Render a group rendering only shadow receivers.
virtual void renderModulativeTextureShadowedQueueGroupObjects (RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
 Render a group with the added complexity of modulative texture shadows.
virtual void renderAdditiveTextureShadowedQueueGroupObjects (RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
 Render a group with additive texture shadows.
virtual void renderObjects (const QueuedRenderableCollection &objs, QueuedRenderableCollection::OrganisationMode om, bool lightScissoringClipping, bool doLightIteration, const LightList *manualLightList=0)
 Render a set of objects, see renderSingleObject for param definitions.
virtual void renderTransparentShadowCasterObjects (const QueuedRenderableCollection &objs, QueuedRenderableCollection::OrganisationMode om, bool lightScissoringClipping, bool doLightIteration, const LightList *manualLightList=0)
 Render those objects in the transparent pass list which have shadow casting forced on.
virtual void updateRenderQueueSplitOptions (void)
 Update the state of the global render queue splitting based on a shadow option change.
virtual void updateRenderQueueGroupSplitOptions (RenderQueueGroup *group, bool suppressShadows, bool suppressRenderState)
 Update the state of the render queue group splitting based on a shadow option change.
virtual ClipResult buildAndSetScissor (const LightList &ll, const Camera *cam)
 Set up a scissor rectangle from a group of lights.
virtual void buildScissor (const Light *l, const Camera *cam, RealRect &rect)
 Update a scissor rectangle from a single light.
virtual void resetScissor ()
virtual ClipResult buildAndSetLightClip (const LightList &ll)
 Build a set of user clip planes from a single non-directional light.
virtual void buildLightClip (const Light *l, PlaneList &planes)
virtual void resetLightClip ()
virtual void checkCachedLightClippingInfo ()

Protected Attributes

String mName
 Instance name.
RenderQueuemRenderQueue
 Queue of objects for rendering.
ColourValue mAmbientLight
 Current ambient light, cached for RenderSystem.
RenderSystemmDestRenderSystem
 The rendering system to send the scene to.
CameraList mCameras
 Central list of cameras - for easy memory management and lookup.
StaticGeometryList mStaticGeometryList
InstancedGeometryList mInstancedGeometryList
SceneNodeList mSceneNodes
 Central list of SceneNodes - for easy memory management.
CameramCameraInProgress
 Camera in progress.
ViewportmCurrentViewport
 Current Viewport.
SceneNodemSceneRoot
 Root scene node.
AutoTrackingSceneNodes mAutoTrackingSceneNodes
EntitymSkyPlaneEntity
EntitymSkyDomeEntity [5]
ManualObjectmSkyBoxObj
SceneNodemSkyPlaneNode
SceneNodemSkyDomeNode
SceneNodemSkyBoxNode
bool mSkyPlaneEnabled
uint8 mSkyPlaneRenderQueue
Plane mSkyPlane
SkyPlaneGenParameters mSkyPlaneGenParameters
bool mSkyBoxEnabled
uint8 mSkyBoxRenderQueue
Quaternion mSkyBoxOrientation
SkyBoxGenParameters mSkyBoxGenParameters
bool mSkyDomeEnabled
uint8 mSkyDomeRenderQueue
Quaternion mSkyDomeOrientation
SkyDomeGenParameters mSkyDomeGenParameters
FogMode mFogMode
ColourValue mFogColour
Real mFogStart
Real mFogEnd
Real mFogDensity
SpecialCaseRenderQueueList mSpecialCaseQueueList
SpecialCaseRenderQueueMode mSpecialCaseQueueMode
uint8 mWorldGeometryRenderQueue
unsigned long mLastFrameNumber
Matrix4 mTempXform [256]
bool mResetIdentityView
bool mResetIdentityProj
bool mNormaliseNormalsOnScale
bool mFlipCullingOnNegativeScale
CullingMode mPassCullingMode
CamVisibleObjectsMap mCamVisibleObjectsMap
ShadowCamLightMapping mShadowCamLightMapping
size_t mShadowTextureCountPerType [3]
 Array defining shadow count per light type.
std::vector< size_t > mShadowTextureIndexLightList
 Array defining shadow texture index in light list.
LightList mLightsAffectingFrustum
LightInfoList mCachedLightInfos
LightInfoList mTestLightInfos
ulong mLightsDirtyCounter
MovableObjectCollectionMap mMovableObjectCollectionMap
PassmShadowCasterPlainBlackPass
 A pass designed to let us render shadow colour on white for texture shadows.
PassmShadowReceiverPass
 A pass designed to let us render shadow receivers for texture shadows.
bool mDisplayNodes
AnimationList mAnimationsList
AnimationStateSet mAnimationStates
RenderQueueListenerList mRenderQueueListeners
ListenerList mListeners
bool mShowBoundingBoxes
 Flag that indicates if all of the scene node's bounding boxes should be shown as a wireframe.
AutoParamDataSourcemAutoParamDataSource
 Utility class for calculating automatic parameters for gpu programs.
ShadowTechnique mShadowTechnique
bool mDebugShadows
ColourValue mShadowColour
PassmShadowDebugPass
PassmShadowStencilPass
PassmShadowModulativePass
bool mShadowMaterialInitDone
HardwareIndexBufferSharedPtr mShadowIndexBuffer
size_t mShadowIndexBufferSize
Rectangle2DmFullScreenQuad
Real mShadowDirLightExtrudeDist
IlluminationRenderStage mIlluminationStage
ShadowTextureConfigList mShadowTextureConfigList
bool mShadowTextureConfigDirty
ShadowTextureList mShadowTextures
TexturePtr mNullShadowTexture
ShadowTextureCameraList mShadowTextureCameras
TexturemCurrentShadowTexture
bool mShadowUseInfiniteFarPlane
bool mShadowCasterRenderBackFaces
bool mShadowAdditiveLightClip
LightClippingInfoMap mLightClippingInfoMap
unsigned long mLightClippingInfoMapFrameNumber
ShadowCameraSetupPtr mDefaultShadowCameraSetup
 default shadow camera setup
ShadowCasterList mShadowCasterList
SphereSceneQuerymShadowCasterSphereQuery
AxisAlignedBoxSceneQuerymShadowCasterAABBQuery
Real mDefaultShadowFarDist
Real mDefaultShadowFarDistSquared
Real mShadowTextureOffset
Real mShadowTextureFadeStart
Real mShadowTextureFadeEnd
bool mShadowTextureSelfShadow
PassmShadowTextureCustomCasterPass
PassmShadowTextureCustomReceiverPass
String mShadowTextureCustomCasterVertexProgram
String mShadowTextureCustomReceiverVertexProgram
String mShadowTextureCustomReceiverFragmentProgram
GpuProgramParametersSharedPtr mShadowTextureCustomCasterVPParams
GpuProgramParametersSharedPtr mShadowTextureCustomReceiverVPParams
GpuProgramParametersSharedPtr mShadowTextureCustomReceiverFPParams
uint32 mVisibilityMask
 Visibility mask used to show / hide objects.
bool mFindVisibleObjects
bool mSuppressRenderStateChanges
 Suppress render state changes?
bool mSuppressShadows
 Suppress shadows?
GpuProgramParametersSharedPtr mInfiniteExtrusionParams
GpuProgramParametersSharedPtr mFiniteExtrusionParams
ShadowCasterSceneQueryListenermShadowCasterQueryListener
SceneMgrQueuedRenderableVisitormActiveQueuedRenderableVisitor
 The active renderable visitor class - subclasses could override this.
SceneMgrQueuedRenderableVisitor mDefaultQueuedRenderableVisitor
 Storage for default renderable visitor.
bool mCameraRelativeRendering
 Whether to use camera-relative rendering.
Matrix4 mCachedViewMatrix
Vector3 mCameraRelativePosition

Friends

class SceneMgrQueuedRenderableVisitor
 Allow visitor helper to access protected methods.

Classes

struct  LightClippingInfo
 Struct for cacheing light clipping information for re-use in a frame. More...
struct  LightInfo
 Cached light information, used to tracking light's changes. More...
struct  lightLess
 Comparator for sorting lights relative to a point. More...
struct  lightsForShadowTextureLess
 Default sorting routine which sorts lights which cast shadows to the front of a list, sub-sorting by distance. More...
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  materialLess
 Comparator for material map, for sorting materials into render order (e.g. More...
struct  MovableObjectCollection
 Simple structure to hold MovableObject map and a mutex to go with it. More...
class  SceneMgrQueuedRenderableVisitor
 Inner helper class to implement the visitor pattern for rendering objects in a queue. More...
class  ShadowCasterSceneQueryListener
 Inner class to use as callback for shadow caster scene query. More...
struct  SkyBoxGenParameters
struct  SkyDomeGenParameters
struct  SkyPlaneGenParameters


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.

Definition at line 141 of file OgreSceneManager.h.


Member Typedef Documentation

typedef std::map<String, Camera* > Ogre::SceneManager::CameraList [protected]

Definition at line 344 of file OgreSceneManager.h.

typedef std::map<String, StaticGeometry* > Ogre::SceneManager::StaticGeometryList [protected]

Definition at line 350 of file OgreSceneManager.h.

typedef std::map<String, InstancedGeometry* > Ogre::SceneManager::InstancedGeometryList [protected]

Definition at line 352 of file OgreSceneManager.h.

typedef std::map<String, SceneNode*> Ogre::SceneManager::SceneNodeList [protected]

Definition at line 355 of file OgreSceneManager.h.

typedef std::set<SceneNode*> Ogre::SceneManager::AutoTrackingSceneNodes [protected]

Autotracking scene nodes.

Definition at line 374 of file OgreSceneManager.h.

typedef std::set<uint8> Ogre::SceneManager::SpecialCaseRenderQueueList [protected]

Definition at line 410 of file OgreSceneManager.h.

typedef std::map< const Camera*, VisibleObjectsBoundsInfo> Ogre::SceneManager::CamVisibleObjectsMap [protected]

Visible objects bounding box list.

Remarks:
Holds an ABB for each camera that contains the physical extends of the visible scene elements by each camera. The map is crucial for shadow algorithms which have a focus step to limit the shadow sample distribution to only valid visible scene elements.

Definition at line 433 of file OgreSceneManager.h.

typedef std::map< const Camera*, const Light* > Ogre::SceneManager::ShadowCamLightMapping [protected]

ShadowCamera to light mapping.

Definition at line 437 of file OgreSceneManager.h.

typedef std::vector<LightInfo> Ogre::SceneManager::LightInfoList [protected]

Definition at line 466 of file OgreSceneManager.h.

typedef std::map<String, MovableObject*> Ogre::SceneManager::MovableObjectMap [protected]

Definition at line 473 of file OgreSceneManager.h.

typedef std::map<String, MovableObjectCollection*> Ogre::SceneManager::MovableObjectCollectionMap [protected]

Definition at line 480 of file OgreSceneManager.h.

typedef std::map<String, Animation*> Ogre::SceneManager::AnimationList [protected]

Storage of animations, lookup by name.

Definition at line 571 of file OgreSceneManager.h.

typedef std::vector<RenderQueueListener*> Ogre::SceneManager::RenderQueueListenerList [protected]

Definition at line 585 of file OgreSceneManager.h.

typedef std::vector<Listener*> Ogre::SceneManager::ListenerList [protected]

Definition at line 588 of file OgreSceneManager.h.

typedef std::vector<Camera*> Ogre::SceneManager::ShadowTextureCameraList [protected]

Definition at line 662 of file OgreSceneManager.h.

typedef std::map<Light*, LightClippingInfo> Ogre::SceneManager::LightClippingInfoMap [protected]

Definition at line 678 of file OgreSceneManager.h.

typedef std::vector<ShadowCaster*> Ogre::SceneManager::ShadowCasterList [protected]

Definition at line 734 of file OgreSceneManager.h.

typedef MapIterator<CameraList> Ogre::SceneManager::CameraIterator

Definition at line 2378 of file OgreSceneManager.h.

typedef MapIterator<AnimationList> Ogre::SceneManager::AnimationIterator

Definition at line 2379 of file OgreSceneManager.h.

typedef MapIterator<MovableObjectMap> Ogre::SceneManager::MovableObjectIterator

Definition at line 2884 of file OgreSceneManager.h.


Member Enumeration Documentation

enum Ogre::SceneManager::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.
IRS_RENDER_RECEIVER_PASS  Render from shadow texture to receivers stage.

Definition at line 171 of file OgreSceneManager.h.

enum Ogre::SceneManager::SpecialCaseRenderQueueMode

Enumeration of the possible modes allowed for processing the special case render queue list.

See also:
SceneManager::setSpecialCaseRenderQueueMode
Enumerator:
SCRQM_INCLUDE  Render only the queues in the special case list.
SCRQM_EXCLUDE  Render all except the queues in the special case list.

Definition at line 185 of file OgreSceneManager.h.

enum Ogre::SceneManager::BoxPlane [protected]

Enumerator:
BP_FRONT 
BP_BACK 
BP_LEFT 
BP_RIGHT 
BP_UP 
BP_DOWN 

Definition at line 540 of file OgreSceneManager.h.

enum Ogre::SceneManager::PrefabType

Prefab shapes available without loading a model.

Note:
Minimal implementation at present.
Enumerator:
PT_PLANE 
PT_CUBE 
PT_SPHERE 

Definition at line 1192 of file OgreSceneManager.h.


Constructor & Destructor Documentation

Ogre::SceneManager::SceneManager ( const String instanceName  ) 

Constructor.

virtual Ogre::SceneManager::~SceneManager (  )  [virtual]

Default destructor.


Member Function Documentation

virtual SceneNode* Ogre::SceneManager::createSceneNodeImpl ( void   )  [protected, virtual]

Subclasses can override this to ensure their specialised SceneNode is used.

virtual SceneNode* Ogre::SceneManager::createSceneNodeImpl ( const String name  )  [protected, virtual]

Subclasses can override this to ensure their specialised SceneNode is used.

MovableObjectCollection* Ogre::SceneManager::getMovableObjectCollection ( const String typeName  )  [protected]

Gets the movable object collection for the given type name.

Remarks:
This method create new collection if the collection does not exist.

const MovableObjectCollection* Ogre::SceneManager::getMovableObjectCollection ( const String typeName  )  const [protected]

Gets the movable object collection for the given type name.

Remarks:
This method throw exception if the collection does not exist.

virtual void Ogre::SceneManager::initRenderQueue ( void   )  [protected, virtual]

Mutex over the collection of MovableObject types.

Internal method for initialising the render queue.

Remarks:
Subclasses can use this to install their own RenderQueue implementation.

virtual const Pass* Ogre::SceneManager::deriveShadowCasterPass ( const Pass pass  )  [protected, virtual]

Internal method for turning a regular pass into a shadow caster pass.

Remarks:
This is only used for texture shadows, basically we're trying to ensure that objects are rendered solid black. This method will usually return the standard solid black pass for all fixed function passes, but will merge in a vertex program and fudge the AutpoParamDataSource to set black lighting for passes with vertex programs.

virtual const Pass* Ogre::SceneManager::deriveShadowReceiverPass ( const Pass pass  )  [protected, virtual]

Internal method for turning a regular pass into a shadow receiver pass.

Remarks:
This is only used for texture shadows, basically we're trying to ensure that objects are rendered with a projective texture. This method will usually return a standard single-texture pass for all fixed function passes, but will merge in a vertex program for passes with vertex programs.

virtual bool Ogre::SceneManager::validatePassForRendering ( const Pass pass  )  [protected, virtual]

Internal method to validate whether a Pass should be allowed to render.

Remarks:
Called just before a pass is about to be used for rendering a group to allow the SceneManager to omit it if required. A return value of false skips this pass.

virtual bool Ogre::SceneManager::validateRenderableForRendering ( const Pass pass,
const Renderable rend 
) [protected, virtual]

Internal method to validate whether a Renderable should be allowed to render.

Remarks:
Called just before a pass is about to be used for rendering a Renderable to allow the SceneManager to omit it if required. A return value of false skips it.

virtual MeshPtr Ogre::SceneManager::createSkyboxPlane ( BoxPlane  bp,
Real  distance,
const Quaternion orientation,
const String groupName 
) [protected, virtual]

virtual MeshPtr Ogre::SceneManager::createSkydomePlane ( BoxPlane  bp,
Real  curvature,
Real  tiling,
Real  distance,
const Quaternion orientation,
int  xsegments,
int  ysegments,
int  ySegmentsToKeep,
const String groupName 
) [protected, virtual]

virtual void Ogre::SceneManager::useRenderableViewProjMode ( const Renderable pRend  )  [protected, virtual]

Internal method used by _renderSingleObject to deal with renderables which override the camera's own view / projection materices.

virtual void Ogre::SceneManager::resetViewProjMode ( void   )  [protected, virtual]

Internal method used by _renderSingleObject to deal with renderables which override the camera's own view / projection matrices.

virtual bool Ogre::SceneManager::fireRenderQueueStarted ( uint8  id,
const String invocation 
) [protected, virtual]

Internal method for firing the queue start event, returns true if queue is to be skipped.

virtual bool Ogre::SceneManager::fireRenderQueueEnded ( uint8  id,
const String invocation 
) [protected, virtual]

Internal method for firing the queue end event, returns true if queue is to be repeated.

virtual void Ogre::SceneManager::fireShadowTexturesUpdated ( size_t  numberOfShadowTextures  )  [protected, virtual]

Internal method for firing the texture shadows updated event.

virtual void Ogre::SceneManager::fireShadowTexturesPreCaster ( Light light,
Camera camera,
size_t  iteration 
) [protected, virtual]

Internal method for firing the pre caster texture shadows event.

virtual void Ogre::SceneManager::fireShadowTexturesPreReceiver ( Light light,
Frustum f 
) [protected, virtual]

Internal method for firing the pre receiver texture shadows event.

virtual void Ogre::SceneManager::firePreFindVisibleObjects ( Viewport v  )  [protected, virtual]

Internal method for firing find visible objects event.

virtual void Ogre::SceneManager::firePostFindVisibleObjects ( Viewport v  )  [protected, virtual]

Internal method for firing find visible objects event.

virtual void Ogre::SceneManager::setViewport ( Viewport vp  )  [protected, virtual]

Internal method for setting the destination viewport for the next render.

virtual void Ogre::SceneManager::renderVisibleObjectsDefaultSequence ( void   )  [protected, virtual]

Internal method for rendering all objects using the default queue sequence.

virtual void Ogre::SceneManager::renderVisibleObjectsCustomSequence ( RenderQueueInvocationSequence s  )  [protected, virtual]

Internal method for rendering all objects using a custom queue sequence.

virtual void Ogre::SceneManager::prepareRenderQueue ( void   )  [protected, virtual]

Internal method for preparing the render queue for use with each render.

virtual void Ogre::SceneManager::renderSingleObject ( Renderable rend,
const Pass pass,
bool  lightScissoringClipping,
bool  doLightIteration,
const LightList manualLightList = 0 
) [protected, virtual]

Internal utility method for rendering a single object.

Remarks:
Assumes that the pass has already been set up.
Parameters:
rend The renderable to issue to the pipeline
pass The pass which is being used
lightScissoringClipping If true, passes that have the getLightScissorEnabled and/or getLightClipPlanesEnabled flags will cause calculation and setting of scissor rectangle and user clip planes.
doLightIteration If true, this method will issue the renderable to the pipeline possibly multiple times, if the pass indicates it should be done once per light
manualLightList Only applicable if doLightIteration is false, this method allows you to pass in a previously determined set of lights which will be used for a single render of this object.

virtual AutoParamDataSource* Ogre::SceneManager::createAutoParamDataSource ( void   )  const [protected, virtual]

Internal method for creating the AutoParamDataSource instance.

Definition at line 638 of file OgreSceneManager.h.

References OGRE_NEW.

virtual void Ogre::SceneManager::findLightsAffectingFrustum ( const Camera camera  )  [protected, virtual]

Internal method for locating a list of lights which could be affecting the frustum.

Remarks:
Custom scene managers are encouraged to override this method to make use of their scene partitioning scheme to more efficiently locate lights, and to eliminate lights which may be occluded by word geometry.

virtual void Ogre::SceneManager::initShadowVolumeMaterials ( void   )  [protected, virtual]

Internal method for setting up materials for shadows.

virtual void Ogre::SceneManager::ensureShadowTexturesCreated (  )  [protected, virtual]

Internal method for creating shadow textures (texture-based shadows).

virtual void Ogre::SceneManager::destroyShadowTextures ( void   )  [protected, virtual]

Internal method for destroying shadow textures (texture-based shadows).

virtual void Ogre::SceneManager::prepareShadowTextures ( Camera cam,
Viewport vp 
) [protected, virtual]

Internal method for preparing shadow textures ready for use in a regular render.

virtual void Ogre::SceneManager::renderShadowVolumesToStencil ( const Light light,
const Camera cam,
bool  calcScissor 
) [protected, virtual]

Internal method for rendering all the objects for a given light into the stencil buffer.

Parameters:
light The light source
cam The camera being viewed from
calcScissor Whether the method should set up any scissor state, or false if that's already been done

virtual void Ogre::SceneManager::setShadowVolumeStencilState ( bool  secondpass,
bool  zfail,
bool  twosided 
) [protected, virtual]

Internal utility method for setting stencil state for rendering shadow volumes.

Parameters:
secondpass Is this the second pass?
zfail Should we be using the zfail method?
twosided Should we use a 2-sided stencil?

void Ogre::SceneManager::renderShadowVolumeObjects ( ShadowCaster::ShadowRenderableListIterator  iShadowRenderables,
Pass pass,
const LightList manualLightList,
unsigned long  flags,
bool  secondpass,
bool  zfail,
bool  twosided 
) [protected]

Render a set of shadow renderables.

virtual const ShadowCasterList& Ogre::SceneManager::findShadowCastersForLight ( const Light light,
const Camera camera 
) [protected, virtual]

Internal method for locating a list of shadow casters which could be affecting the frustum for a given light.

Remarks:
Custom scene managers are encouraged to override this method to add optimisations, and to add their own custom shadow casters (perhaps for world geometry)

virtual void Ogre::SceneManager::renderBasicQueueGroupObjects ( RenderQueueGroup pGroup,
QueuedRenderableCollection::OrganisationMode  om 
) [protected, virtual]

Render a group in the ordinary way.

virtual void Ogre::SceneManager::renderAdditiveStencilShadowedQueueGroupObjects ( RenderQueueGroup group,
QueuedRenderableCollection::OrganisationMode  om 
) [protected, virtual]

Render a group with the added complexity of additive stencil shadows.

virtual void Ogre::SceneManager::renderModulativeStencilShadowedQueueGroupObjects ( RenderQueueGroup group,
QueuedRenderableCollection::OrganisationMode  om 
) [protected, virtual]

Render a group with the added complexity of modulative stencil shadows.

virtual void Ogre::SceneManager::renderTextureShadowCasterQueueGroupObjects ( RenderQueueGroup group,
QueuedRenderableCollection::OrganisationMode  om 
) [protected, virtual]

Render a group rendering only shadow casters.

virtual void Ogre::SceneManager::renderTextureShadowReceiverQueueGroupObjects ( RenderQueueGroup group,
QueuedRenderableCollection::OrganisationMode  om 
) [protected, virtual]

Render a group rendering only shadow receivers.

virtual void Ogre::SceneManager::renderModulativeTextureShadowedQueueGroupObjects ( RenderQueueGroup group,
QueuedRenderableCollection::OrganisationMode  om 
) [protected, virtual]

Render a group with the added complexity of modulative texture shadows.

virtual void Ogre::SceneManager::renderAdditiveTextureShadowedQueueGroupObjects ( RenderQueueGroup group,
QueuedRenderableCollection::OrganisationMode  om 
) [protected, virtual]

Render a group with additive texture shadows.

virtual void Ogre::SceneManager::renderObjects ( const QueuedRenderableCollection objs,
QueuedRenderableCollection::OrganisationMode  om,
bool  lightScissoringClipping,
bool  doLightIteration,
const LightList manualLightList = 0 
) [protected, virtual]

Render a set of objects, see renderSingleObject for param definitions.

virtual void Ogre::SceneManager::renderTransparentShadowCasterObjects ( const QueuedRenderableCollection objs,
QueuedRenderableCollection::OrganisationMode  om,
bool  lightScissoringClipping,
bool  doLightIteration,
const LightList manualLightList = 0 
) [protected, virtual]

Render those objects in the transparent pass list which have shadow casting forced on.

Remarks:
This function is intended to be used to render the shadows of transparent objects which have transparency_casts_shadows set to 'on' in their material

virtual void Ogre::SceneManager::updateRenderQueueSplitOptions ( void   )  [protected, virtual]

Update the state of the global render queue splitting based on a shadow option change.

virtual void Ogre::SceneManager::updateRenderQueueGroupSplitOptions ( RenderQueueGroup group,
bool  suppressShadows,
bool  suppressRenderState 
) [protected, virtual]

Update the state of the render queue group splitting based on a shadow option change.

virtual ClipResult Ogre::SceneManager::buildAndSetScissor ( const LightList ll,
const Camera cam 
) [protected, virtual]

Set up a scissor rectangle from a group of lights.

virtual void Ogre::SceneManager::buildScissor ( const Light l,
const Camera cam,
RealRect rect 
) [protected, virtual]

Update a scissor rectangle from a single light.

virtual void Ogre::SceneManager::resetScissor (  )  [protected, virtual]

virtual ClipResult Ogre::SceneManager::buildAndSetLightClip ( const LightList ll  )  [protected, virtual]

Build a set of user clip planes from a single non-directional light.

virtual void Ogre::SceneManager::buildLightClip ( const Light l,
PlaneList planes 
) [protected, virtual]

virtual void Ogre::SceneManager::resetLightClip (  )  [protected, virtual]

virtual void Ogre::SceneManager::checkCachedLightClippingInfo (  )  [protected, virtual]

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

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. Return the instance name of this SceneManager.

Definition at line 940 of file OgreSceneManager.h.

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.

virtual Camera* Ogre::SceneManager::createCamera ( const String name  )  [virtual]

Creates a camera to be managed by this scene manager.

Remarks:
This camera must be added to the scene at a later time using the attachObject method of the SceneNode class.
Parameters:
name Name to give the new camera.

virtual Camera* Ogre::SceneManager::getCamera ( const String name  )  const [virtual]

Retrieves a pointer to the named camera.

Note:
Throws an exception if the named instance does not exist

virtual bool Ogre::SceneManager::hasCamera ( const String name  )  const [virtual]

Returns whether a camera with the given name exists.

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:
cam Pointer to the camera to remove

virtual void Ogre::SceneManager::destroyCamera ( const String name  )  [virtual]

Removes a camera from the scene.

Remarks:
This method removes an camera from the scene based on the camera's name rather than a pointer.

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, their aren't supposed to destroy outside. So, while you are using texture shadow, don't call this method, or you can set the shadow technique other than texture-based, which will destroy all internal created shadow cameras and textures.

virtual Light* Ogre::SceneManager::createLight ( const String name  )  [virtual]

Creates a light for use in the scene.

Remarks:
Lights can either be in a fixed position and independent of the scene graph, or they can be attached to SceneNodes so they derive their position from the parent node. Either way, they are created using this method so that the SceneManager manages their existence.
Parameters:
name The name of the new light, to identify it later.

virtual Light* Ogre::SceneManager::getLight ( const String name  )  const [virtual]

Returns a pointer to the named Light which has previously been added to the scene.

Note:
Throws an exception if the named instance does not exist

virtual bool Ogre::SceneManager::hasLight ( const String name  )  const [virtual]

Returns whether a light with the given name exists.

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

Retrieve a set of clipping planes for a given light.

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

Retrieve a scissor rectangle for a given light and camera.

virtual void Ogre::SceneManager::destroyLight ( const String name  )  [virtual]

Removes the named light from the scene and destroys it.

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

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.

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

Removes and destroys all lights in the scene.

virtual void Ogre::SceneManager::_notifyLightsDirty ( void   )  [virtual]

Advance method to increase the lights dirty counter due lights changed.

Remarks:
Scene manager tracking lights that affecting the frustum, if changes detected (the changes includes light list itself and the light's position and attenuation range), then increase the lights dirty counter.
For some reason, you can call this method to force whole scene objects re-populate their light list. But near in mind, call to this method will harm performance, so should avoid if possible.

ulong Ogre::SceneManager::_getLightsDirtyCounter ( void   )  const

Advance method to gets the lights dirty counter.

Remarks:
Scene manager tracking lights that affecting the frustum, if changes detected (the changes includes light list itself and the light's position and attenuation range), then increase the lights dirty counter.
When implementing customise lights finding algorithm relied on either SceneManager::_getLightsAffectingFrustum or SceneManager::_populateLightList, might check this value for sure that the light list are really need to re-populate, otherwise, returns cached light list (if exists) for better performance.

Definition at line 1063 of file OgreSceneManager.h.

virtual const LightList& Ogre::SceneManager::_getLightsAffectingFrustum ( void   )  const [virtual]

Get the list of lights which could be affecting the frustum.

Remarks:
Note that default implementation of this method returns a cached light list, which is populated when rendering the scene. So by default the list of lights is only available during scene rendering.

virtual void Ogre::SceneManager::_populateLightList ( const Vector3 position,
Real  radius,
LightList destList 
) [virtual]

Populate a light list with an ordered set of the lights which are closest to the position specified.

Remarks:
Note that since directional lights have no position, they are always considered closer than any point lights and as such will always take precedence.
Subclasses of the default SceneManager may wish to take into account other issues such as possible visibility of the light if that information is included in their data structures. This basic scenemanager simply orders by distance, eliminating those lights which are out of range or could not be affecting the frustum (i.e. only the lights returned by SceneManager::_getLightsAffectingFrustum are take into account).
The number of items in the list max exceed the maximum number of lights supported by the renderer, but the extraneous ones will never be used. In fact the limit will be imposed by Pass::getMaxSimultaneousLights.
Parameters:
position The position at which to evaluate the list of lights
radius The bounding radius to test
destList List to be populated with ordered set of lights; will be cleared by this method before population.

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

virtual SceneNode* Ogre::SceneManager::createSceneNode ( const String name  )  [virtual]

Creates an instance of a SceneNode with a given name.

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 a name parameter, which makes the node easier to retrieve directly again later.

virtual void Ogre::SceneManager::destroySceneNode ( const String name  )  [virtual]

Destroys a SceneNode with a given name.

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.

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.

virtual SceneNode* Ogre::SceneManager::getRootSceneNode ( void   )  [virtual]

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.

virtual SceneNode* Ogre::SceneManager::getSceneNode ( const String name  )  const [virtual]

Retrieves a named SceneNode from the scene graph.

Remarks:
If you chose to name a SceneNode as you created it, or if you happened to make a note of the generated name, you can look it up wherever it is in the scene graph using this method.
Note:
Throws an exception if the named instance does not exist

virtual bool Ogre::SceneManager::hasSceneNode ( const String name  )  const [virtual]

Returns whether a scene node with the given name exists.

virtual Entity* Ogre::SceneManager::createEntity ( const String entityName,
const String meshName 
) [virtual]

Create an Entity (instance of a discrete mesh).

Parameters:
entityName The name to be given to the entity (must be unique).
meshName The name of the Mesh it is to be based on (e.g. 'knot.oof'). The mesh will be loaded if it is not already.

virtual Entity* Ogre::SceneManager::createEntity ( const String entityName,
PrefabType  ptype 
) [virtual]

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

Parameters:
entityName The name to be given to the entity (must be unique).
ptype The prefab type.

virtual Entity* Ogre::SceneManager::getEntity ( const String name  )  const [virtual]

Retrieves a pointer to the named Entity.

Note:
Throws an exception if the named instance does not exist

virtual bool Ogre::SceneManager::hasEntity ( const String name  )  const [virtual]

Returns whether an entity with the given name exists.

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

virtual void Ogre::SceneManager::destroyEntity ( const String name  )  [virtual]

Removes & destroys an Entity from the SceneManager by name.

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

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

virtual ManualObject* Ogre::SceneManager::createManualObject ( const String name  )  [virtual]

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

Parameters:
name The name to be given to the object (must be unique).

virtual ManualObject* Ogre::SceneManager::getManualObject ( const String name  )  const [virtual]

Retrieves a pointer to the named ManualObject.

Note:
Throws an exception if the named instance does not exist

virtual bool Ogre::SceneManager::hasManualObject ( const String name  )  const [virtual]

Returns whether a manual object with the given name exists.

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

Removes & destroys a ManualObject from the SceneManager.

virtual void Ogre::SceneManager::destroyManualObject ( const String name  )  [virtual]

Removes & destroys a ManualObject from the SceneManager.

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

Removes & destroys all ManualObjects from the SceneManager.

virtual BillboardChain* Ogre::SceneManager::createBillboardChain ( const String name  )  [virtual]

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

Parameters:
name The name to be given to the object (must be unique).

virtual BillboardChain* Ogre::SceneManager::getBillboardChain ( const String name  )  const [virtual]

Retrieves a pointer to the named BillboardChain.

Note:
Throws an exception if the named instance does not exist

virtual bool Ogre::SceneManager::hasBillboardChain ( const String name  )  const [virtual]

Returns whether a billboard chain with the given name exists.

virtual void Ogre::SceneManager::destroyBillboardChain ( BillboardChain obj  )  [virtual]

Removes & destroys a BillboardChain from the SceneManager.

virtual void Ogre::SceneManager::destroyBillboardChain ( const String name  )  [virtual]

Removes & destroys a BillboardChain from the SceneManager.

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

Removes & destroys all BillboardChains from the SceneManager.

virtual RibbonTrail* Ogre::SceneManager::createRibbonTrail ( const String name  )  [virtual]

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

Parameters:
name The name to be given to the object (must be unique).

virtual RibbonTrail* Ogre::SceneManager::getRibbonTrail ( const String name  )  const [virtual]

Retrieves a pointer to the named RibbonTrail.

Note:
Throws an exception if the named instance does not exist

virtual bool Ogre::SceneManager::hasRibbonTrail ( const String name  )  const [virtual]

Returns whether a ribbon trail with the given name exists.

virtual void Ogre::SceneManager::destroyRibbonTrail ( RibbonTrail obj  )  [virtual]

Removes & destroys a RibbonTrail from the SceneManager.

virtual void Ogre::SceneManager::destroyRibbonTrail ( const String name  )  [virtual]

Removes & destroys a RibbonTrail from the SceneManager.

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

Removes & destroys all RibbonTrails from the SceneManager.

virtual ParticleSystem* Ogre::SceneManager::createParticleSystem ( const String name,
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:
name The name to give the new particle system instance.
templateName The name of the template to base the new instance on.

virtual ParticleSystem* Ogre::SceneManager::createParticleSystem ( const String name,
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:
name The name to give the ParticleSystem.
quota The maximum number of particles to allow in this system.
resourceGroup The resource group which will be used to load dependent resources

virtual ParticleSystem* Ogre::SceneManager::getParticleSystem ( const String name  )  const [virtual]

Retrieves a pointer to the named ParticleSystem.

Note:
Throws an exception if the named instance does not exist

virtual bool Ogre::SceneManager::hasParticleSystem ( const String name  )  const [virtual]

Returns whether a particle system with the given name exists.

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

Removes & destroys a ParticleSystem from the SceneManager.

virtual void Ogre::SceneManager::destroyParticleSystem ( const String name  )  [virtual]

Removes & destroys a ParticleSystem from the SceneManager.

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

Removes & destroys all ParticleSystems from the SceneManager.

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

void Ogre::SceneManager::setAmbientLight ( const ColourValue colour  ) 

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

Remarks:
This sets the colour and intensity of the ambient light in the scene, i.e. the light which is 'sourceless' and illuminates all objects equally. The colour of an object is affected by a combination of the light in the scene, and the amount of light that object reflects (in this case based on the Material::ambient property).

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.

const ColourValue& Ogre::SceneManager::getAmbientLight ( void   )  const

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

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

virtual void Ogre::SceneManager::prepareWorldGeometry ( DataStreamPtr stream,
const String typeName = StringUtil::BLANK 
) [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:
stream Data stream containing data to load
typeName String identifying the type of world geometry contained in the stream - not required if this manager only supports one type of world geometry.

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

virtual void Ogre::SceneManager::setWorldGeometry ( DataStreamPtr stream,
const String typeName = StringUtil::BLANK 
) [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:
stream Data stream containing data to load
typeName String identifying the type of world geometry contained in the stream - not required if this manager only supports one type of world geometry.

virtual size_t Ogre::SceneManager::estimateWorldGeometry ( const String filename  )  [virtual]

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 (setWorldGeomtry), 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.

Definition at line 1482 of file OgreSceneManager.h.

virtual size_t Ogre::SceneManager::estimateWorldGeometry ( DataStreamPtr stream,
const String typeName = StringUtil::BLANK 
) [virtual]

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:
stream Data stream containing data to load
typeName String identifying the type of world geometry contained in the stream - not required if this manager only supports one type of world geometry.

Definition at line 1496 of file OgreSceneManager.h.

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:
random If 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 failiure, false is returned.

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

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:
strKey The name of the option to set
pValue A pointer to the value - the size should be calculated by the scene manager based on the key
Returns:
On success, true is returned.
On failiure, false is returned.

Definition at line 1527 of file OgreSceneManager.h.

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

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

Parameters:
strKey The name of the option
pDestValue A 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 failiure, false is returned and pDestValue is set to NULL.

Definition at line 1542 of file OgreSceneManager.h.

virtual bool Ogre::SceneManager::hasOption ( const String strKey  )  const [virtual]

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

Parameters:
strKey The 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.

Definition at line 1553 of file OgreSceneManager.h.

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

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:
strKey The name of the option to get the values for.
refValueList A 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.

Definition at line 1568 of file OgreSceneManager.h.

virtual bool Ogre::SceneManager::getOptionKeys ( StringVector refKeys  )  [virtual]

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

Parameters:
refKeys A reference to a list that will be filled with all the available options.
Returns:
On success, true is returned. On failiure, false is returned.

Definition at line 1576 of file OgreSceneManager.h.

virtual void Ogre::SceneManager::_updateSceneGraph ( Camera cam  )  [virtual]

Internal method for updating the scene graph ie the tree of SceneNode instances managed by this class.

Remarks:
This must be done before issuing objects to the rendering pipeline, since derived transformations from parent nodes are not updated until required. This SceneManager is a basic implementation which simply updates all nodes from the root. This ensures the scene is up to date but requires all the nodes to be updated even if they are not visible. Subclasses could trim this such that only potentially visible nodes are updated.

virtual void Ogre::SceneManager::_findVisibleObjects ( Camera cam,
VisibleObjectsBoundsInfo visibleBounds,
bool  onlyShadowCasters 
) [virtual]

Internal method which parses the scene to find visible objects to render.

Remarks:
If you're implementing a custom scene manager, this is the most important method to override since it's here you can apply your custom world partitioning scheme. Once you have added the appropriate objects to the render queue, you can let the default SceneManager objects _renderVisibleObjects handle the actual rendering of the objects you pick.
Any visible objects will be added to a rendering queue, which is indexed by material in order to ensure objects with the same material are rendered together to minimise render state changes.

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.

virtual void Ogre::SceneManager::_renderVisibleObjects ( void   )  [virtual]

Sends visible objects found in _findVisibleObjects to the rendering engine.

virtual void Ogre::SceneManager::_renderScene ( Camera camera,
Viewport vp,
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, possibly preceded by some sorting, culling or other scene management tasks. Note that this method is not normally called directly by the user application; it is called automatically by the Ogre rendering loop.
Parameters:
camera Pointer to a camera from whose viewpoint the scene is to be rendered.
vp The target viewport
includeOverlays Whether or not overlay objects should be rendered

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.

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:
sys Pointer to the RenderSystem subclass to be used as a render target.

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:
enable True to enable the plane, false to disable it
plane Details of the plane, i.e. it's normal and it's distance from the camera.
materialName The name of the material the plane will use
scale The 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
tiling How 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.
drawFirst If 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.
bow If 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 compatable with fog.
xsegments,ysegments Determines 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 tesselation on the plane to perform per-vertex effects.
groupName The name of the resource group to which to assign the plane mesh.

virtual void Ogre::SceneManager::_setSkyPlane ( bool  enable,
const Plane plane,
const String materialName,
Real  scale = 1000,
Real  tiling = 10,
uint8  renderQueue = RENDER_QUEUE_SKIES_EARLY,
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:
enable True to enable the plane, false to disable it
plane Details of the plane, i.e. it's normal and it's distance from the camera.
materialName The name of the material the plane will use
scale The 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
tiling How 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.
renderQueue The render queue to use when rendering this object
bow If 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 compatable with fog.
xsegments,ysegments Determines 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 tesselation on the plane to perform per-vertex effects.
groupName The name of the resource group to which to assign the plane mesh.

virtual bool Ogre::SceneManager::isSkyPlaneEnabled ( void   )  const [virtual]

Return whether a key plane is enabled.

Definition at line 1753 of file OgreSceneManager.h.

virtual SceneNode* Ogre::SceneManager::getSkyPlaneNode ( void   )  const [virtual]

Get the sky plane node, if enabled.

Definition at line 1756 of file OgreSceneManager.h.

virtual const SkyPlaneGenParameters& Ogre::SceneManager::getSkyPlaneGenParameters ( void   )  const [virtual]

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

Definition at line 1759 of file OgreSceneManager.h.

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:
enable True to enable the skybox, false to disable it
materialName The name of the material the box will use
distance Distance in world coorinates from the camera to each plane of the box. The default is normally OK.
drawFirst If 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.
orientation Optional 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.
groupName The name of the resource group to which to assign the plane mesh.

virtual void Ogre::SceneManager::_setSkyBox ( bool  enable,
const String materialName,
Real  distance = 5000,
uint8  renderQueue = RENDER_QUEUE_SKIES_EARLY,
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:
enable True to enable the skybox, false to disable it
materialName The name of the material the box will use
distance Distance in world coorinates from the camera to each plane of the box. The default is normally OK.
renderQueue The render queue to use when rendering this object
orientation Optional 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.
groupName The name of the resource group to which to assign the plane mesh.

virtual bool Ogre::SceneManager::isSkyBoxEnabled ( void   )  const [virtual]

Return whether a skybox is enabled.

Definition at line 1845 of file OgreSceneManager.h.

virtual SceneNode* Ogre::SceneManager::getSkyBoxNode ( void   )  const [virtual]

Get the skybox node, if enabled.

Definition at line 1848 of file OgreSceneManager.h.

virtual const SkyBoxGenParameters& Ogre::SceneManager::getSkyBoxGenParameters ( void   )  const [virtual]

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

Definition at line 1851 of file OgreSceneManager.h.

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 apparant '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:
enable True to enable the skydome, false to disable it
materialName The name of the material the dome will use
curvature The 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.
tiling How many times to tile the texture(s) across the dome.
distance Distance in world coorinates from the camera to each plane of the box the dome is rendered on. The default is normally OK.
drawFirst If 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.
orientation Optional 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.
groupName The name of the resource group to which to assign the plane mesh.

virtual void Ogre::SceneManager::_setSkyDome ( bool  enable,
const String materialName,
Real  curvature = 10,
Real  tiling = 8,
Real  distance = 4000,
uint8  renderQueue = RENDER_QUEUE_SKIES_EARLY,
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 apparant '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:
enable True to enable the skydome, false to disable it
materialName The name of the material the dome will use
curvature The 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.
tiling How many times to tile the texture(s) across the dome.
distance Distance in world coorinates from the camera to each plane of the box the dome is rendered on. The default is normally OK.
renderQueue The render queue to use when rendering this object
orientation Optional 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.
groupName The name of the resource group to which to assign the plane mesh.

virtual bool Ogre::SceneManager::isSkyDomeEnabled ( void   )  const [virtual]

Return whether a skydome is enabled.

Definition at line 1969 of file OgreSceneManager.h.

virtual SceneNode* Ogre::SceneManager::getSkyDomeNode ( void   )  const [virtual]

Get the sky dome node, if enabled.

Definition at line 1972 of file OgreSceneManager.h.

virtual const SkyDomeGenParameters& Ogre::SceneManager::getSkyDomeGenParameters ( void   )  const [virtual]

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

Definition at line 1975 of file OgreSceneManager.h.

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:
mode Set up the mode of fog as described in the FogMode enum, or set to FOG_NONE to turn off.
colour The colour of the fog. Either set this to the same as your viewport background colour, or to blend in with a skydome or skybox.
expDensity The density of the fog in FOG_EXP or FOG_EXP2 mode, as a value between 0 and 1. The default is 0.001.
linearStart Distance in world units at which linear fog starts to encroach. Only applicable if mode is FOG_LINEAR.
linearEnd Distance in world units at which linear fog becomes completely opaque. Only applicable if mode is FOG_LINEAR.

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

Returns the fog mode for the scene.

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

Returns the fog colour for the scene.

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

Returns the fog start distance for the scene.

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

Returns the fog end distance for the scene.

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

Returns the fog density for the scene.

virtual BillboardSet* Ogre::SceneManager::createBillboardSet ( const String name,
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:
name The name to give to this billboard set. Must be unique.
poolSize The initial size of the pool of billboards (see BillboardSet for more information)
See also:
BillboardSet

virtual BillboardSet* Ogre::SceneManager::getBillboardSet ( const String name  )  const [virtual]

Retrieves a pointer to the named BillboardSet.

Note:
Throws an exception if the named instance does not exist

virtual bool Ogre::SceneManager::hasBillboardSet ( const String name  )  const [virtual]

Returns whether a billboardset with the given name exists.

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

virtual void Ogre::SceneManager::destroyBillboardSet ( const String name  )  [virtual]

Removes & destroys an BillboardSet from the SceneManager by name.

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.

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