OGRE
1.12.13
Object-Oriented Graphics Rendering Engine
|
Manages the organisation and rendering of a 'scene': a collection of objects and potentially world geometry. More...
#include <OgreSceneManager.h>
Classes | |
struct | lightLess |
Comparator for sorting lights relative to a point. 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 | RenderContext |
class | SceneMgrQueuedRenderableVisitor |
Inner helper class to implement the visitor pattern for rendering objects in a queue. More... | |
struct | SkyBoxGenParameters |
struct | SkyDomeGenParameters |
struct | SkyPlaneGenParameters |
Public Member Functions | |
SceneManager (const String &instanceName) | |
Constructor. More... | |
virtual | ~SceneManager () |
Default destructor. More... | |
bool | _areRenderStateChangesSuppressed (void) const |
Are render state changes suppressed? More... | |
virtual void | _findVisibleObjects (Camera *cam, VisibleObjectsBoundsInfo *visibleBounds, bool onlyShadowCasters) |
Internal method which parses the scene to find visible objects to render. More... | |
CompositorChain * | _getActiveCompositorChain () const |
Gets the active compositor chain of the current scene being rendered. More... | |
const AutoParamDataSource * | _getAutoParamDataSource () |
uint32 | _getCombinedVisibilityMask (void) const |
Internal method for getting the combination between the global visibility mask and the per-viewport visibility mask. More... | |
IlluminationRenderStage | _getCurrentRenderStage () |
void | _handleLodEvents () |
Handle LOD events. More... | |
void | _injectRenderWithPass (Pass *pass, Renderable *rend, bool shadowDerivation=true, bool doLightIteration=false, const LightList *manualLightList=0) |
Render something as if it came from the current queue. More... | |
void | _issueRenderOp (Renderable *rend, const Pass *pass) |
Internal method for issuing the render operation. More... | |
void | _markGpuParamsDirty (uint16 mask) |
Method to allow you to mark gpu parameters as dirty, causing them to be updated according to the mask that you set when updateGpuProgramParameters is next called. More... | |
void | _notifyAutotrackingSceneNode (SceneNode *node, bool autoTrack) |
Internal method for notifying the manager that a SceneNode is autotracking. More... | |
void | _notifyEntityMaterialLodChanged (EntityMaterialLodChangedEvent &evt) |
Notify that an entity material LOD change event has occurred. More... | |
void | _notifyEntityMeshLodChanged (EntityMeshLodChangedEvent &evt) |
Notify that an entity mesh LOD change event has occurred. More... | |
void | _notifyMovableObjectLodChanged (MovableObjectLodChangedEvent &evt) |
Notify that a movable object LOD change event has occurred. More... | |
RenderContext * | _pauseRendering () |
Pause rendering of the frame. More... | |
void | _releaseManualHardwareResources () |
Notifies the scene manager that hardware resources were lost. More... | |
void | _renderQueueGroupObjects (RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om) |
Render the objects in a given queue group. More... | |
virtual void | _renderScene (Camera *camera, Viewport *vp, bool includeOverlays=true) |
Prompts the class to send its contents to the renderer. More... | |
void | _renderVisibleObjects (void) |
Sends visible objects found in _findVisibleObjects to the rendering engine. More... | |
void | _restoreManualHardwareResources () |
Notifies the scene manager that hardware resources should be restored. More... | |
void | _resumeRendering (RenderContext *context) |
Resume rendering of the frame. More... | |
void | _setActiveCompositorChain (CompositorChain *chain) |
Sets the active compositor chain of the current scene being rendered. More... | |
void | _setDestinationRenderSystem (RenderSystem *sys) |
Notifies the scene manager of its destination render system. More... | |
const Pass * | _setPass (const Pass *pass, bool evenIfSuppressed=false, bool shadowDerivation=true) |
Internal method for setting up the renderstate for a rendering pass. More... | |
void | _suppressRenderStateChanges (bool suppress) |
Indicates to the SceneManager whether it should suppress changing the RenderSystem states when rendering objects. More... | |
virtual void | _updateSceneGraph (Camera *cam) |
Internal method for updating the scene graph ie the tree of SceneNode instances managed by this class. More... | |
void | addListener (Listener *s) |
Add a listener which will get called back on scene manager events. More... | |
void | addLodListener (LodListener *listener) |
Add a level of detail listener. More... | |
void | addRenderObjectListener (RenderObjectListener *newListener) |
Registers a new Render Object Listener which will be notified when rendering an object. More... | |
void | addRenderQueueListener (RenderQueueListener *newListener) |
Registers a new RenderQueueListener which will be notified when render queues are processed. More... | |
void | addSpecialCaseRenderQueue (uint8 qid) |
Adds an item to the 'special case' render queue list. More... | |
virtual void | clearScene (void) |
Empties the entire scene, inluding all SceneNodes, Entities, Lights, BillboardSets etc. More... | |
void | clearSpecialCaseRenderQueues (void) |
Clears the 'special case' render queue list. More... | |
const ColourValue & | getAmbientLight (void) const |
Returns the ambient light level to be used for the scene. More... | |
Viewport * | getCurrentViewport (void) const |
Gets the current viewport being rendered (advanced use only, only valid during viewport update. More... | |
RenderSystem * | getDestinationRenderSystem () |
Get the rendersystem subclass to which the output of this Scene Manager gets sent. More... | |
bool | getFindVisibleObjects (void) |
Gets whether the SceneManager should search for visible objects, or whether they are being manually handled. More... | |
bool | getFlipCullingOnNegativeScale () const |
Get whether to automatically flip the culling mode on objects whenever they are negatively scaled. More... | |
const String & | getName (void) const |
Return the instance name of this SceneManager. More... | |
bool | getNormaliseNormalsOnScale () const |
Get whether to automatically normalise normals on objects whenever they are scaled. More... | |
virtual bool | getOption (const String &strKey, void *pDestValue) |
Method for getting the value of an implementation-specific Scene Manager option. More... | |
virtual bool | getOptionKeys (StringVector &refKeys) |
Method for getting all the implementation-specific options of the scene manager. More... | |
virtual bool | getOptionValues (const String &strKey, StringVector &refValueList) |
Method for getting all possible values for a specific option. More... | |
SceneMgrQueuedRenderableVisitor * | getQueuedRenderableVisitor (void) const |
Gets the current visitor object which processes queued renderables. More... | |
RenderQueue * | getRenderQueue (void) |
Retrieves the internal render queue, for advanced users only. More... | |
const VisibleObjectsBoundsInfo & | getShadowCasterBoundsInfo (const Light *light, size_t iteration=0) const |
Returns the shadow caster AAB for a specific light-camera combination. More... | |
SpecialCaseRenderQueueMode | getSpecialCaseRenderQueueMode (void) |
Gets the way the special case render queue list is processed. More... | |
virtual ViewPoint | getSuggestedViewpoint (bool random=false) |
Asks the SceneManager to provide a suggested viewpoint from which the scene should be viewed. More... | |
virtual const String & | getTypeName (void) const =0 |
Retrieve the type name of this scene manager. More... | |
uint32 | getVisibilityMask (void) |
Gets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible. More... | |
const VisibleObjectsBoundsInfo & | getVisibleObjectsBoundsInfo (const Camera *cam) const |
Returns a visibility boundary box for a specific camera. More... | |
uint8 | getWorldGeometryRenderQueue (void) |
Gets the render queue that the world geometry (if any) this SceneManager renders will be associated with. More... | |
virtual bool | hasOption (const String &strKey) const |
Method for verifying whether the scene manager has an implementation-specific option. More... | |
bool | isLateMaterialResolving () const |
Gets whether using late material resolving or not. More... | |
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. More... | |
void | manualRender (Renderable *rend, const Pass *pass, Viewport *vp, const Affine3 &viewMatrix, const Matrix4 &projMatrix, bool doBeginEndFrame=false, bool lightScissoringClipping=true, bool doLightIteration=true, const LightList *manualLightList=0) |
Manual rendering method for rendering a single object. More... | |
void | manualRender (RenderOperation *rend, Pass *pass, Viewport *vp, const Affine3 &worldMatrix, const Affine3 &viewMatrix, const Matrix4 &projMatrix, bool doBeginEndFrame=false) |
Manual rendering method, for advanced users only. More... | |
OGRE_MUTEX (sceneGraphMutex) | |
Mutex to protect the scene graph from simultaneous access from multiple threads. More... | |
void | removeListener (Listener *s) |
Remove a listener. More... | |
void | removeLodListener (LodListener *listener) |
Remove a level of detail listener. More... | |
void | removeRenderObjectListener (RenderObjectListener *delListener) |
Removes a listener previously added with addRenderObjectListener. More... | |
void | removeRenderQueueListener (RenderQueueListener *delListener) |
Removes a listener previously added with addRenderQueueListener. More... | |
void | removeSpecialCaseRenderQueue (uint8 qid) |
Removes an item to the 'special case' render queue list. More... | |
void | setAmbientLight (const ColourValue &colour) |
Sets the ambient light level to be used for the scene. More... | |
void | setFindVisibleObjects (bool find) |
Sets whether the SceneManager should search for visible objects, or whether they are being manually handled. More... | |
void | setFlipCullingOnNegativeScale (bool n) |
Set whether to automatically flip the culling mode on objects whenever they are negatively scaled. More... | |
void | setLateMaterialResolving (bool isLate) |
Sets whether to use late material resolving or not. More... | |
void | setNormaliseNormalsOnScale (bool n) |
Set whether to automatically normalise normals on objects whenever they are scaled. More... | |
virtual bool | setOption (const String &strKey, const void *pValue) |
Method for setting a specific option of the Scene Manager. More... | |
void | setQueuedRenderableVisitor (SceneMgrQueuedRenderableVisitor *visitor) |
Advanced method for supplying an alternative visitor, used for parsing the render queues and sending the results to the renderer. More... | |
void | setSpecialCaseRenderQueueMode (SpecialCaseRenderQueueMode mode) |
Sets the way the special case render queue list is processed. More... | |
void | setVisibilityMask (uint32 vmask) |
Sets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible. More... | |
void | setWorldGeometryRenderQueue (uint8 qid) |
Sets the render queue that the world geometry (if any) this SceneManager renders will be associated with. More... | |
Cameras | |
virtual Camera * | createCamera (const String &name) |
Creates a camera to be managed by this scene manager. More... | |
Camera * | getCamera (const String &name) const |
Retrieves a pointer to the named camera. More... | |
bool | hasCamera (const String &name) const |
Returns whether a camera with the given name exists. More... | |
virtual void | destroyCamera (Camera *cam) |
Removes a camera from the scene. More... | |
virtual void | destroyCamera (const String &name) |
Removes a camera from the scene. More... | |
virtual void | destroyAllCameras (void) |
Removes (and destroys) all cameras from the scene. More... | |
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. More... | |
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. More... | |
CameraIterator | getCameraIterator (void) |
Returns a specialised MapIterator over all cameras in the scene. More... | |
const CameraList & | getCameras () const |
Returns a const version of the camera list. More... | |
Lights | |
virtual Light * | createLight (const String &name) |
Creates a light for use in the scene. More... | |
Light * | createLight (const String &name, Light::LightTypes type) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
virtual Light * | createLight () |
Creates a light with a generated name. More... | |
Light * | createLight (Light::LightTypes type) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
virtual Light * | getLight (const String &name) const |
Returns a pointer to the named Light which has previously been added to the scene. More... | |
virtual bool | hasLight (const String &name) const |
Returns whether a light with the given name exists. More... | |
const PlaneList & | getLightClippingPlanes (Light *l) |
Retrieve a set of clipping planes for a given light. More... | |
const RealRect & | getLightScissorRect (Light *l, const Camera *cam) |
Retrieve a scissor rectangle for a given light and camera. More... | |
virtual void | invalidatePerFrameScissorRectCache () |
Scissor rects are cached during frame, and this cache should be explicitly invalidated if several renders are done during one frame using different projections matrices, for example for tiled, stereo or multiview orthographic projection rendering. More... | |
virtual void | destroyLight (const String &name) |
Removes the named light from the scene and destroys it. More... | |
virtual void | destroyLight (Light *light) |
Removes the light from the scene and destroys it based on a pointer. More... | |
virtual void | destroyAllLights (void) |
Removes and destroys all lights in the scene. More... | |
void | _notifyLightsDirty (void) |
Advanced method to increase the lights dirty counter due to lights having changed. More... | |
ulong | _getLightsDirtyCounter (void) const |
Advanced method to gets the lights dirty counter. More... | |
const LightList & | _getLightsAffectingFrustum (void) const |
Get the list of lights which could be affecting the frustum. More... | |
void | _populateLightList (const Vector3 &position, Real radius, LightList &destList, uint32 lightMask=0xFFFFFFFF) |
Populate a light list with an ordered set of the lights which are closest to the position specified. More... | |
void | _populateLightList (const SceneNode *sn, Real radius, LightList &destList, uint32 lightMask=0xFFFFFFFF) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
Scene Nodes | |
virtual SceneNode * | createSceneNode (void) |
Creates an instance of a SceneNode. More... | |
virtual SceneNode * | createSceneNode (const String &name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
virtual void | destroySceneNode (SceneNode *sn) |
Destroys a SceneNode. More... | |
virtual void | destroySceneNode (const String &name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
SceneNode * | getRootSceneNode (void) |
Gets the SceneNode at the root of the scene hierarchy. More... | |
SceneNode * | getSceneNode (const String &name, bool throwExceptionIfNotFound=true) const |
Retrieves a named SceneNode from the scene graph. More... | |
bool | hasSceneNode (const String &name) const |
Returns whether a scene node with the given name exists. More... | |
void | setDisplaySceneNodes (bool display) |
Tells the SceneManager whether it should render the SceneNodes which make up the scene as well as the objects in the scene. More... | |
bool | getDisplaySceneNodes (void) const |
Returns true if all scene nodes axis are to be displayed. More... | |
void | showBoundingBoxes (bool bShow) |
Allows all bounding boxes of scene nodes to be displayed. More... | |
bool | getShowBoundingBoxes () const |
Returns if all bounding boxes of scene nodes are to be displayed. More... | |
DebugDrawer * | getDebugDrawer () |
Entities | |
Entity * | createEntity (const String &entityName, const String &meshName, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME) |
Create an Entity (instance of a discrete mesh). More... | |
Entity * | createEntity (const String &entityName, const MeshPtr &pMesh) |
Create an Entity (instance of a discrete mesh). More... | |
Entity * | createEntity (const String &meshName) |
Create an Entity (instance of a discrete mesh) with an autogenerated name. More... | |
Entity * | createEntity (const MeshPtr &pMesh) |
Create an Entity (instance of a discrete mesh) with an autogenerated name. More... | |
Entity * | createEntity (const String &entityName, PrefabType ptype) |
Create an Entity (instance of a discrete mesh) from a range of prefab shapes. More... | |
Entity * | createEntity (PrefabType ptype) |
Create an Entity (instance of a discrete mesh) from a range of prefab shapes, generating the name. More... | |
Entity * | getEntity (const String &name) const |
Retrieves a pointer to the named Entity. More... | |
bool | hasEntity (const String &name) const |
Returns whether an entity with the given name exists. More... | |
void | destroyEntity (Entity *ent) |
Removes & destroys an Entity from the SceneManager. More... | |
void | destroyEntity (const String &name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
virtual void | destroyAllEntities (void) |
Removes & destroys all Entities. More... | |
Manual Objects | |
ManualObject * | createManualObject (const String &name) |
Create a ManualObject, an object which you populate with geometry manually through a GL immediate-mode style interface. More... | |
ManualObject * | createManualObject () |
Create a ManualObject, an object which you populate with geometry manually through a GL immediate-mode style interface, generating the name. More... | |
ManualObject * | getManualObject (const String &name) const |
Retrieves a pointer to the named ManualObject. More... | |
bool | hasManualObject (const String &name) const |
Returns whether a manual object with the given name exists. More... | |
void | destroyManualObject (ManualObject *obj) |
Removes & destroys a ManualObject from the SceneManager. More... | |
void | destroyManualObject (const String &name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | destroyAllManualObjects (void) |
Removes & destroys all ManualObjects from the SceneManager. More... | |
Billboard Chains | |
BillboardChain * | createBillboardChain (const String &name) |
Create a BillboardChain, an object which you can use to render a linked chain of billboards. More... | |
BillboardChain * | createBillboardChain () |
Create a BillboardChain, an object which you can use to render a linked chain of billboards, with a generated name. More... | |
BillboardChain * | getBillboardChain (const String &name) const |
Retrieves a pointer to the named BillboardChain. More... | |
bool | hasBillboardChain (const String &name) const |
Returns whether a billboard chain with the given name exists. More... | |
void | destroyBillboardChain (BillboardChain *obj) |
Removes & destroys a BillboardChain from the SceneManager. More... | |
void | destroyBillboardChain (const String &name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | destroyAllBillboardChains (void) |
Removes & destroys all BillboardChains from the SceneManager. More... | |
RibbonTrail * | createRibbonTrail (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. More... | |
RibbonTrail * | createRibbonTrail () |
Create a RibbonTrail, an object which you can use to render a linked chain of billboards which follows one or more nodes, generating the name. More... | |
RibbonTrail * | getRibbonTrail (const String &name) const |
Retrieves a pointer to the named RibbonTrail. More... | |
bool | hasRibbonTrail (const String &name) const |
Returns whether a ribbon trail with the given name exists. More... | |
void | destroyRibbonTrail (RibbonTrail *obj) |
Removes & destroys a RibbonTrail from the SceneManager. More... | |
void | destroyRibbonTrail (const String &name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | destroyAllRibbonTrails (void) |
Removes & destroys all RibbonTrails from the SceneManager. More... | |
Particle System | |
ParticleSystem * | createParticleSystem (const String &name, const String &templateName) |
Creates a particle system based on a template. More... | |
ParticleSystem * | createParticleSystem (const String &name, size_t quota=500, const String &resourceGroup=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) |
Create a blank particle system. More... | |
ParticleSystem * | createParticleSystem (size_t quota=500, const String &resourceGroup=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) |
Create a blank particle system with a generated name. More... | |
ParticleSystem * | getParticleSystem (const String &name) const |
Retrieves a pointer to the named ParticleSystem. More... | |
bool | hasParticleSystem (const String &name) const |
Returns whether a particle system with the given name exists. More... | |
void | destroyParticleSystem (ParticleSystem *obj) |
Removes & destroys a ParticleSystem from the SceneManager. More... | |
void | destroyParticleSystem (const String &name) |
Removes & destroys a ParticleSystem from the SceneManager. More... | |
void | destroyAllParticleSystems (void) |
Removes & destroys all ParticleSystems from the SceneManager. More... | |
World Geometry | |
virtual void | prepareWorldGeometry (const String &filename) |
Sets the source of the 'world' geometry, i.e. More... | |
virtual void | prepareWorldGeometry (DataStreamPtr &stream, const String &typeName=BLANKSTRING) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
virtual void | setWorldGeometry (const String &filename) |
Sets the source of the 'world' geometry, i.e. More... | |
virtual void | setWorldGeometry (DataStreamPtr &stream, const String &typeName=BLANKSTRING) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
virtual size_t | estimateWorldGeometry (const String &filename) |
Estimate the number of loading stages required to load the named world geometry. More... | |
virtual size_t | estimateWorldGeometry (DataStreamPtr &stream, const String &typeName=BLANKSTRING) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
Sky Rendering | |
void | _queueSkiesForRendering (Camera *cam) |
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::AUTODETECT_RESOURCE_GROUP_NAME) |
Enables / disables a 'sky plane' i.e. More... | |
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::AUTODETECT_RESOURCE_GROUP_NAME) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | setSkyPlaneEnabled (bool enable) |
Enables / disables a 'sky plane'. More... | |
bool | isSkyPlaneEnabled (void) const |
Return whether a key plane is enabled. More... | |
SceneNode * | getSkyPlaneNode (void) const |
Get the sky plane node, if enabled. More... | |
const SkyPlaneGenParameters & | getSkyPlaneGenParameters (void) const |
Get the parameters used to construct the SkyPlane, if any. More... | |
void | setSkyBox (bool enable, const String &materialName, Real distance=5000, bool drawFirst=true, const Quaternion &orientation=Quaternion::IDENTITY, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME) |
Enables / disables a 'sky box' i.e. More... | |
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::AUTODETECT_RESOURCE_GROUP_NAME) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | setSkyBoxEnabled (bool enable) |
Enables / disables a 'sky box'. More... | |
bool | isSkyBoxEnabled (void) const |
Return whether a skybox is enabled. More... | |
SceneNode * | getSkyBoxNode (void) const |
Get the skybox node, if enabled. More... | |
const SkyBoxGenParameters & | getSkyBoxGenParameters (void) const |
Get the parameters used to generate the current SkyBox, if any. More... | |
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::AUTODETECT_RESOURCE_GROUP_NAME) |
Enables / disables a 'sky dome' i.e. More... | |
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::AUTODETECT_RESOURCE_GROUP_NAME) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | setSkyDomeEnabled (bool enable) |
Enables / disables a 'sky dome'. More... | |
bool | isSkyDomeEnabled (void) const |
Return whether a skydome is enabled. More... | |
SceneNode * | getSkyDomeNode (void) const |
Get the sky dome node, if enabled. More... | |
const SkyDomeGenParameters & | getSkyDomeGenParameters (void) const |
Get the parameters used to generate the current SkyDome, if any. More... | |
Fogging | |
void | setFog (FogMode mode=FOG_NONE, const ColourValue &colour=ColourValue::White, Real expDensity=0.001f, Real linearStart=0.0f, Real linearEnd=1.0f) |
Sets the fogging mode applied to the scene. More... | |
FogMode | getFogMode (void) const |
Returns the fog mode for the scene. More... | |
const ColourValue & | getFogColour (void) const |
Returns the fog colour for the scene. More... | |
Real | getFogStart (void) const |
Returns the fog start distance for the scene. More... | |
Real | getFogEnd (void) const |
Returns the fog end distance for the scene. More... | |
Real | getFogDensity (void) const |
Returns the fog density for the scene. More... | |
Billboard Sets | |
BillboardSet * | createBillboardSet (unsigned int poolSize=20) |
Creates a new BillboardSet for use with this scene manager. More... | |
BillboardSet * | createBillboardSet (const String &name, unsigned int poolSize=20) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
BillboardSet * | getBillboardSet (const String &name) const |
Retrieves a pointer to the named BillboardSet. More... | |
bool | hasBillboardSet (const String &name) const |
Returns whether a billboardset with the given name exists. More... | |
void | destroyBillboardSet (BillboardSet *set) |
Removes & destroys an BillboardSet from the SceneManager. More... | |
void | destroyBillboardSet (const String &name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | destroyAllBillboardSets (void) |
Removes & destroys all BillboardSets. More... | |
Scene Node Animation | |
void | _applySceneAnimations (void) |
Internal method for applying animations to scene nodes. More... | |
Animation * | createAnimation (const String &name, Real length) |
Creates an animation which can be used to animate scene nodes. More... | |
Animation * | getAnimation (const String &name) const |
Looks up an Animation object previously created with createAnimation. More... | |
bool | hasAnimation (const String &name) const |
Returns whether an animation with the given name exists. More... | |
void | destroyAnimation (const String &name) |
Destroys an Animation. More... | |
void | destroyAllAnimations (void) |
Removes all animations created using this SceneManager. More... | |
AnimationState * | createAnimationState (const String &animName) |
Create an AnimationState object for managing application of animations. More... | |
AnimationState * | getAnimationState (const String &animName) const |
Retrieves animation state as previously created using createAnimationState. More... | |
bool | hasAnimationState (const String &name) const |
Returns whether an animation state with the given name exists. More... | |
void | destroyAnimationState (const String &name) |
Destroys an AnimationState. More... | |
void | destroyAllAnimationStates (void) |
Removes all animation states created using this SceneManager. More... | |
AnimationIterator | getAnimationIterator (void) |
Returns a specialised MapIterator over all animations in the scene. More... | |
const AnimationList & | getAnimations () const |
Returns a const version of the animation list. More... | |
AnimationStateIterator | getAnimationStateIterator (void) |
Returns a specialised MapIterator over all animation states in the scene. More... | |
const AnimationStateMap & | getAnimationStates () |
Returns a specialised Map over all animation states in the scene. More... | |
Scene Queries | |
virtual AxisAlignedBoxSceneQuery * | createAABBQuery (const AxisAlignedBox &box, uint32 mask=0xFFFFFFFF) |
Creates an AxisAlignedBoxSceneQuery for this scene manager. More... | |
virtual SphereSceneQuery * | createSphereQuery (const Sphere &sphere, uint32 mask=0xFFFFFFFF) |
Creates a SphereSceneQuery for this scene manager. More... | |
virtual PlaneBoundedVolumeListSceneQuery * | createPlaneBoundedVolumeQuery (const PlaneBoundedVolumeList &volumes, uint32 mask=0xFFFFFFFF) |
Creates a PlaneBoundedVolumeListSceneQuery for this scene manager. More... | |
virtual RaySceneQuery * | createRayQuery (const Ray &ray, uint32 mask=0xFFFFFFFF) |
Creates a RaySceneQuery for this scene manager. More... | |
virtual IntersectionSceneQuery * | createIntersectionQuery (uint32 mask=0xFFFFFFFF) |
Creates an IntersectionSceneQuery for this scene manager. More... | |
void | destroyQuery (SceneQuery *query) |
Destroys a scene query of any type. More... | |
Shadow Setup | |
void | _suppressShadows (bool suppress) |
Indicates to the SceneManager whether it should suppress the active shadow rendering technique until told otherwise. More... | |
bool | _areShadowsSuppressed (void) const |
Are shadows suppressed? More... | |
void | setShadowTechnique (ShadowTechnique technique) |
Sets the general shadow technique to be used in this scene. More... | |
ShadowTechnique | getShadowTechnique (void) const |
Gets the current shadow technique. More... | |
void | setShowDebugShadows (bool debug) |
Enables / disables the rendering of debug information for shadows. More... | |
bool | getShowDebugShadows (void) const |
Are debug shadows shown? More... | |
void | setShadowColour (const ColourValue &colour) |
Set the colour used to modulate areas in shadow. More... | |
const ColourValue & | getShadowColour (void) const |
Get the colour used to modulate areas in shadow. More... | |
void | setShadowDirectionalLightExtrusionDistance (Real dist) |
Sets the distance a shadow volume is extruded for a directional light. More... | |
Real | getShadowDirectionalLightExtrusionDistance (void) const |
Gets the distance a shadow volume is extruded for a directional light. More... | |
void | setShadowFarDistance (Real distance) |
Sets the default maximum distance away from the camera that shadows will be visible. More... | |
Real | getShadowFarDistance (void) const |
Gets the default maximum distance away from the camera that shadows will be visible. More... | |
Real | getShadowFarDistanceSquared (void) const |
void | setShadowIndexBufferSize (size_t size) |
Sets the maximum size of the index buffer used to render shadow primitives. More... | |
size_t | getShadowIndexBufferSize (void) const |
Get the size of the shadow index buffer. More... | |
const ShadowCameraSetupPtr & | getShadowCameraSetup () const |
Get the shadow camera setup in use for all lights which don't have their own shadow camera setup. More... | |
void | setShadowUseInfiniteFarPlane (bool enable) |
Sets whether we should use an inifinite camera far plane when rendering stencil shadows. More... | |
bool | isShadowTechniqueStencilBased (void) const |
Is there a stencil shadow based shadowing technique in use? More... | |
bool | isShadowTechniqueTextureBased (void) const |
Is there a texture shadow based shadowing technique in use? More... | |
bool | isShadowTechniqueModulative (void) const |
Is there a modulative shadowing technique in use? More... | |
bool | isShadowTechniqueAdditive (void) const |
Is there an additive shadowing technique in use? More... | |
bool | isShadowTechniqueIntegrated (void) const |
Is the shadow technique integrated into primary materials? More... | |
bool | isShadowTechniqueInUse (void) const |
Is there any shadowing technique in use? More... | |
void | setShadowUseLightClipPlanes (bool enabled) |
Sets whether when using a built-in additive shadow mode, user clip planes should be used to restrict light rendering. More... | |
bool | getShadowUseLightClipPlanes () const |
Gets whether when using a built-in additive shadow mode, user clip planes should be used to restrict light rendering. More... | |
Shadow Texture Config | |
virtual void | prepareShadowTextures (Camera *cam, Viewport *vp, const LightList *lightList=0) |
Method for preparing shadow textures ready for use in a regular render Do not call manually unless before frame start or rendering is paused If lightList is not supplied, will render all lights in frustum. More... | |
void | setShadowTextureSize (unsigned short size) |
Set the size of the texture used for all texture-based shadows. More... | |
void | setShadowTextureConfig (size_t shadowIndex, uint16 width, uint16 height, PixelFormat format, uint16 fsaa=0, uint16 depthBufferPoolId=1) |
Set the detailed configuration for a shadow texture. More... | |
void | setShadowTextureConfig (size_t shadowIndex, const ShadowTextureConfig &config) |
Set the detailed configuration for a shadow texture. More... | |
const ShadowTextureConfigList & | getShadowTextureConfigList () const |
Get the current shadow texture settings. More... | |
ConstShadowTextureConfigIterator | getShadowTextureConfigIterator () const |
void | setShadowTexturePixelFormat (PixelFormat fmt) |
Set the pixel format of the textures used for texture-based shadows. More... | |
void | setShadowTextureFSAA (unsigned short fsaa) |
Set the level of multisample AA of the textures used for texture-based shadows. More... | |
void | setShadowTextureCount (size_t count) |
Set the number of textures allocated for texture-based shadows. More... | |
size_t | getShadowTextureCount (void) const |
void | setShadowTextureCountPerLightType (Light::LightTypes type, size_t count) |
Set the number of shadow textures a light type uses. More... | |
size_t | getShadowTextureCountPerLightType (Light::LightTypes type) const |
Get the number of shadow textures is assigned for the given light type. More... | |
void | setShadowTextureSettings (uint16 size, uint16 count, PixelFormat fmt=PF_X8R8G8B8, uint16 fsaa=0, uint16 depthBufferPoolId=1) |
Sets the size and count of textures used in texture-based shadows. More... | |
const TexturePtr & | getShadowTexture (size_t shadowIndex) |
Get a reference to the shadow texture currently in use at the given index. More... | |
void | setShadowDirLightTextureOffset (Real offset) |
Sets the proportional distance which a texture shadow which is generated from a directional light will be offset into the camera view to make best use of texture space. More... | |
Real | getShadowDirLightTextureOffset (void) const |
Gets the proportional distance which a texture shadow which is generated from a directional light will be offset into the camera view to make best use of texture space. More... | |
void | setShadowTextureFadeStart (Real fadeStart) |
Sets the proportional distance at which texture shadows begin to fade out. More... | |
void | setShadowTextureFadeEnd (Real fadeEnd) |
Sets the proportional distance at which texture shadows finish to fading out. More... | |
void | setShadowTextureSelfShadow (bool selfShadow) |
Sets whether or not texture shadows should attempt to self-shadow. More... | |
bool | getShadowTextureSelfShadow (void) const |
Gets whether or not texture shadows attempt to self-shadow. More... | |
void | setShadowTextureCasterMaterial (const MaterialPtr &mat) |
Sets the default material to use for rendering shadow casters. More... | |
void | setShadowTextureReceiverMaterial (const MaterialPtr &mat) |
Sets the default material to use for rendering shadow receivers. More... | |
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. More... | |
bool | getShadowCasterRenderBackFaces () const |
Gets whether or not shadow casters should be rendered into shadow textures using their back faces rather than their front faces. More... | |
void | setShadowCameraSetup (const ShadowCameraSetupPtr &shadowSetup) |
Set the shadow camera setup to use for all lights which don't have their own shadow camera setup. More... | |
Static Geometry | |
StaticGeometry * | createStaticGeometry (const String &name) |
Creates a StaticGeometry instance suitable for use with this SceneManager. More... | |
StaticGeometry * | getStaticGeometry (const String &name) const |
Retrieve a previously created StaticGeometry instance. More... | |
bool | hasStaticGeometry (const String &name) const |
Returns whether a static geometry instance with the given name exists. More... | |
void | destroyStaticGeometry (StaticGeometry *geom) |
Remove & destroy a StaticGeometry instance. More... | |
void | destroyStaticGeometry (const String &name) |
Remove & destroy a StaticGeometry instance. More... | |
void | destroyAllStaticGeometry (void) |
Remove & destroy all StaticGeometry instances. More... | |
Instancing | |
InstanceManager * | createInstanceManager (const String &customName, const String &meshName, const String &groupName, InstanceManager::InstancingTechnique technique, size_t numInstancesPerBatch, uint16 flags=0, unsigned short subMeshIdx=0) |
Creates an InstanceManager interface to create & manipulate instanced entities You need to call this function at least once before start calling createInstancedEntity to build up an instance based on the given mesh. More... | |
InstanceManager * | getInstanceManager (const String &managerName) const |
Retrieves an existing InstanceManager by it's name. More... | |
bool | hasInstanceManager (const String &managerName) const |
Returns whether an InstanceManager with the given name exists. More... | |
void | destroyInstanceManager (const String &name) |
Destroys an InstanceManager if it was created with createInstanceManager() More... | |
void | destroyInstanceManager (InstanceManager *instanceManager) |
void | destroyAllInstanceManagers (void) |
size_t | getNumInstancesPerBatch (const String &meshName, const String &groupName, const String &materialName, InstanceManager::InstancingTechnique technique, size_t numInstancesPerBatch, uint16 flags=0, unsigned short subMeshIdx=0) |
InstancedEntity * | createInstancedEntity (const String &materialName, const String &managerName) |
Creates an InstancedEntity based on an existing InstanceManager. More... | |
void | destroyInstancedEntity (InstancedEntity *instancedEntity) |
Removes an InstancedEntity,. More... | |
void | _addDirtyInstanceManager (InstanceManager *dirtyManager) |
Called by an InstanceManager when it has at least one InstanceBatch that needs their bounds to be updated for proper culling. More... | |
Movable Objects | |
MovableObject * | createMovableObject (const String &name, const String &typeName, const NameValuePairList *params=0) |
Create a movable object of the type specified. More... | |
MovableObject * | createMovableObject (const String &typeName, const NameValuePairList *params=0) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | destroyMovableObject (const String &name, const String &typeName) |
Destroys a MovableObject with the name specified, of the type specified. More... | |
void | destroyMovableObject (MovableObject *m) |
Destroys a MovableObject. More... | |
void | destroyAllMovableObjectsByType (const String &typeName) |
Destroy all MovableObjects of a given type. More... | |
void | destroyAllMovableObjects (void) |
Destroy all MovableObjects. More... | |
MovableObject * | getMovableObject (const String &name, const String &typeName) const |
Get a reference to a previously created MovableObject. More... | |
bool | hasMovableObject (const String &name, const String &typeName) const |
Returns whether a movable object instance with the given name exists. More... | |
const MovableObjectMap & | getMovableObjects (const String &typeName) |
Get all MovableObect instances of a given type. More... | |
MovableObjectIterator | getMovableObjectIterator (const String &typeName) |
void | injectMovableObject (MovableObject *m) |
Inject a MovableObject instance created externally. More... | |
void | extractMovableObject (const String &name, const String &typeName) |
Extract a previously injected MovableObject. More... | |
void | extractMovableObject (MovableObject *m) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | extractAllMovableObjectsByType (const String &typeName) |
Extract all injected MovableObjects of a given type. More... | |
Manages the organisation and rendering of a 'scene': a collection of objects and potentially world geometry.
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 OctreeSceneManager), a BSP tree (see 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.
typedef std::map<String, Camera* > Ogre::SceneManager::CameraList |
typedef std::map<String, Animation*> Ogre::SceneManager::AnimationList |
typedef std::map<String, MovableObject*> Ogre::SceneManager::MovableObjectMap |
Enumerator | |
---|---|
WORLD_GEOMETRY_TYPE_MASK | Query type mask which will be used for world geometry.
|
ENTITY_TYPE_MASK | Query type mask which will be used for entities.
|
FX_TYPE_MASK | Query type mask which will be used for effects like billboardsets / particle systems.
|
STATICGEOMETRY_TYPE_MASK | Query type mask which will be used for StaticGeometry.
|
LIGHT_TYPE_MASK | Query type mask which will be used for lights.
|
FRUSTUM_TYPE_MASK | Query type mask which will be used for frusta and cameras.
|
USER_TYPE_MASK_LIMIT | User type mask limit. |
Ogre::SceneManager::SceneManager | ( | const String & | instanceName | ) |
Constructor.
|
virtual |
Default destructor.
RenderContext* Ogre::SceneManager::_pauseRendering | ( | ) |
Pause rendering of the frame.
This has to be called when inside a renderScene call (Usually using a listener of some sort)
void Ogre::SceneManager::_resumeRendering | ( | RenderContext * | context | ) |
Resume rendering of the frame.
This has to be called after a _pauseRendering call
context | The rendring context, as returned by the _pauseRendering call |
Ogre::SceneManager::OGRE_MUTEX | ( | sceneGraphMutex | ) |
Mutex to protect the scene graph from simultaneous access from multiple threads.
|
inline |
Return the instance name of this SceneManager.
|
pure virtual |
Retrieve the type name of this scene manager.
Implemented in Ogre::BspSceneManager, Ogre::OctreeSceneManager, Ogre::PCZSceneManager, and Ogre::DefaultSceneManager.
Creates a camera to be managed by this scene manager.
name | Name to give the new camera. |
Reimplemented in Ogre::PCZSceneManager, and Ogre::OctreeSceneManager.
Retrieves a pointer to the named camera.
bool Ogre::SceneManager::hasCamera | ( | const String & | name | ) | const |
Returns whether a camera with the given name exists.
|
virtual |
Removes a camera from the scene.
cam | Pointer to the camera to remove |
|
virtual |
Removes a camera from the scene.
|
virtual |
Removes (and destroys) all cameras from the scene.
|
inline |
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.
|
inline |
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.
|
inline |
Returns a specialised MapIterator over all cameras in the scene.
|
inline |
Returns a const version of the camera list.
Creates a light for use in the scene.
name | The name of the new light, to identify it later. |
Reimplemented in Ogre::PCZSceneManager.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
virtual |
Creates a light with a generated name.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns a pointer to the named Light which has previously been added to the scene.
Reimplemented in Ogre::PCZSceneManager.
|
virtual |
Returns whether a light with the given name exists.
Reimplemented in Ogre::PCZSceneManager.
Retrieve a set of clipping planes for a given light.
Retrieve a scissor rectangle for a given light and camera.
|
virtual |
Scissor rects are cached during frame, and this cache should be explicitly invalidated if several renders are done during one frame using different projections matrices, for example for tiled, stereo or multiview orthographic projection rendering.
|
virtual |
Removes the named light from the scene and destroys it.
Reimplemented in Ogre::PCZSceneManager.
|
virtual |
Removes the light from the scene and destroys it based on a pointer.
|
virtual |
Removes and destroys all lights in the scene.
Reimplemented in Ogre::PCZSceneManager.
void Ogre::SceneManager::_notifyLightsDirty | ( | void | ) |
Advanced method to increase the lights dirty counter due to lights having changed.
|
inline |
Advanced method to gets the lights dirty counter.
const LightList& Ogre::SceneManager::_getLightsAffectingFrustum | ( | void | ) | const |
Get the list of lights which could be affecting the frustum.
void Ogre::SceneManager::_populateLightList | ( | const Vector3 & | position, |
Real | radius, | ||
LightList & | destList, | ||
uint32 | lightMask = 0xFFFFFFFF |
||
) |
Populate a light list with an ordered set of the lights which are closest to the position specified.
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. |
lightMask | The mask with which to include / exclude lights |
void Ogre::SceneManager::_populateLightList | ( | const SceneNode * | sn, |
Real | radius, | ||
LightList & | destList, | ||
uint32 | lightMask = 0xFFFFFFFF |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
virtual |
Creates an instance of a SceneNode.
Reimplemented in Ogre::PCZSceneManager.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented in Ogre::PCZSceneManager.
|
virtual |
Destroys a SceneNode.
Reimplemented in Ogre::PCZSceneManager.
|
virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented in Ogre::PCZSceneManager, and Ogre::OctreeSceneManager.
SceneNode* Ogre::SceneManager::getRootSceneNode | ( | void | ) |
Gets the SceneNode at the root of the scene hierarchy.
|
inline |
Returns whether a scene node with the given name exists.
void Ogre::SceneManager::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.
|
inline |
Returns true if all scene nodes axis are to be displayed.
void Ogre::SceneManager::showBoundingBoxes | ( | bool | bShow | ) |
Allows all bounding boxes of scene nodes to be displayed.
bool Ogre::SceneManager::getShowBoundingBoxes | ( | ) | const |
Returns if all bounding boxes of scene nodes are to be displayed.
|
inline |
Entity* Ogre::SceneManager::createEntity | ( | const String & | entityName, |
const String & | meshName, | ||
const String & | groupName = ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME |
||
) |
Entity* Ogre::SceneManager::createEntity | ( | const String & | entityName, |
PrefabType | ptype | ||
) |
Create an Entity (instance of a discrete mesh) from a range of prefab shapes.
entityName | The name to be given to the entity (must be unique). |
ptype | The prefab type. |
Entity* Ogre::SceneManager::createEntity | ( | PrefabType | ptype | ) |
Create an Entity (instance of a discrete mesh) from a range of prefab shapes, generating the name.
ptype | The prefab type. |
Retrieves a pointer to the named Entity.
bool Ogre::SceneManager::hasEntity | ( | const String & | name | ) | const |
Returns whether an entity with the given name exists.
void Ogre::SceneManager::destroyEntity | ( | Entity * | ent | ) |
Removes & destroys an Entity from the SceneManager.
void Ogre::SceneManager::destroyEntity | ( | const String & | name | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
virtual |
Removes & destroys all Entities.
ManualObject* Ogre::SceneManager::createManualObject | ( | const String & | name | ) |
Create a ManualObject, an object which you populate with geometry manually through a GL immediate-mode style interface.
name | The name to be given to the object (must be unique). |
ManualObject* Ogre::SceneManager::createManualObject | ( | ) |
Create a ManualObject, an object which you populate with geometry manually through a GL immediate-mode style interface, generating the name.
ManualObject* Ogre::SceneManager::getManualObject | ( | const String & | name | ) | const |
Retrieves a pointer to the named ManualObject.
bool Ogre::SceneManager::hasManualObject | ( | const String & | name | ) | const |
Returns whether a manual object with the given name exists.
void Ogre::SceneManager::destroyManualObject | ( | ManualObject * | obj | ) |
Removes & destroys a ManualObject from the SceneManager.
void Ogre::SceneManager::destroyManualObject | ( | const String & | name | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Ogre::SceneManager::destroyAllManualObjects | ( | void | ) |
Removes & destroys all ManualObjects from the SceneManager.
BillboardChain* Ogre::SceneManager::createBillboardChain | ( | const String & | name | ) |
Create a BillboardChain, an object which you can use to render a linked chain of billboards.
name | The name to be given to the object (must be unique). |
BillboardChain* Ogre::SceneManager::createBillboardChain | ( | ) |
Create a BillboardChain, an object which you can use to render a linked chain of billboards, with a generated name.
BillboardChain* Ogre::SceneManager::getBillboardChain | ( | const String & | name | ) | const |
Retrieves a pointer to the named BillboardChain.
bool Ogre::SceneManager::hasBillboardChain | ( | const String & | name | ) | const |
Returns whether a billboard chain with the given name exists.
void Ogre::SceneManager::destroyBillboardChain | ( | BillboardChain * | obj | ) |
Removes & destroys a BillboardChain from the SceneManager.
void Ogre::SceneManager::destroyBillboardChain | ( | const String & | name | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Ogre::SceneManager::destroyAllBillboardChains | ( | void | ) |
Removes & destroys all BillboardChains from the SceneManager.
RibbonTrail* Ogre::SceneManager::createRibbonTrail | ( | 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.
name | The name to be given to the object (must be unique). |
RibbonTrail* Ogre::SceneManager::createRibbonTrail | ( | ) |
Create a RibbonTrail, an object which you can use to render a linked chain of billboards which follows one or more nodes, generating the name.
RibbonTrail* Ogre::SceneManager::getRibbonTrail | ( | const String & | name | ) | const |
Retrieves a pointer to the named RibbonTrail.
bool Ogre::SceneManager::hasRibbonTrail | ( | const String & | name | ) | const |
Returns whether a ribbon trail with the given name exists.
void Ogre::SceneManager::destroyRibbonTrail | ( | RibbonTrail * | obj | ) |
Removes & destroys a RibbonTrail from the SceneManager.
void Ogre::SceneManager::destroyRibbonTrail | ( | const String & | name | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Ogre::SceneManager::destroyAllRibbonTrails | ( | void | ) |
Removes & destroys all RibbonTrails from the SceneManager.
ParticleSystem* Ogre::SceneManager::createParticleSystem | ( | const String & | name, |
const String & | templateName | ||
) |
Creates a particle system based on a template.
name | The name to give the new particle system instance. |
templateName | The name of the template to base the new instance on. |
ParticleSystem* Ogre::SceneManager::createParticleSystem | ( | const String & | name, |
size_t | quota = 500 , |
||
const String & | resourceGroup = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME |
||
) |
Create a blank particle system.
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 |
ParticleSystem* Ogre::SceneManager::createParticleSystem | ( | size_t | quota = 500 , |
const String & | resourceGroup = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME |
||
) |
Create a blank particle system with a generated name.
quota | The maximum number of particles to allow in this system. |
resourceGroup | The resource group which will be used to load dependent resources |
ParticleSystem* Ogre::SceneManager::getParticleSystem | ( | const String & | name | ) | const |
Retrieves a pointer to the named ParticleSystem.
bool Ogre::SceneManager::hasParticleSystem | ( | const String & | name | ) | const |
Returns whether a particle system with the given name exists.
void Ogre::SceneManager::destroyParticleSystem | ( | ParticleSystem * | obj | ) |
Removes & destroys a ParticleSystem from the SceneManager.
void Ogre::SceneManager::destroyParticleSystem | ( | const String & | name | ) |
Removes & destroys a ParticleSystem from the SceneManager.
void Ogre::SceneManager::destroyAllParticleSystems | ( | void | ) |
Removes & destroys all ParticleSystems from the SceneManager.
|
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.
Reimplemented in Ogre::OctreeSceneManager, and Ogre::PCZSceneManager.
void Ogre::SceneManager::setAmbientLight | ( | const ColourValue & | colour | ) |
Sets the ambient light level to be used for the scene.
const ColourValue& Ogre::SceneManager::getAmbientLight | ( | void | ) | const |
Returns the ambient light level to be used for the scene.
|
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.
|
virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 |
Sets the source of the 'world' geometry, i.e.
the large, mainly static geometry making up the world e.g. rooms, landscape etc.
Reimplemented in Ogre::BspSceneManager.
|
virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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. |
Reimplemented in Ogre::BspSceneManager.
|
inlinevirtual |
Estimate the number of loading stages required to load the named world geometry.
Reimplemented in Ogre::BspSceneManager.
|
inlinevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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. |
Reimplemented in Ogre::BspSceneManager.
|
virtual |
Asks the SceneManager to provide a suggested viewpoint from which the scene should be viewed.
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. |
Reimplemented in Ogre::BspSceneManager.
|
inlinevirtual |
Method for setting a specific option of the Scene Manager.
These options are usually specific for a certain implemntation of the Scene Manager class, and may (and probably will) not exist across different implementations.
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 |
Reimplemented in Ogre::PCZSceneManager, and Ogre::OctreeSceneManager.
|
inlinevirtual |
Method for getting the value of an implementation-specific Scene Manager option.
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 |
Reimplemented in Ogre::PCZSceneManager, and Ogre::OctreeSceneManager.
|
inlinevirtual |
Method for verifying whether the scene manager has an implementation-specific option.
strKey | The name of the option to check for. |
|
inlinevirtual |
Method for getting all possible values for a specific option.
When this list is too large (i.e. the option expects, for example, a float), the return value will be true, but the list will contain just one element whose size will be set to 0. Otherwise, the list will be filled with all the possible values the option can accept.
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. |
Reimplemented in Ogre::PCZSceneManager, and Ogre::OctreeSceneManager.
|
inlinevirtual |
Method for getting all the implementation-specific options of the scene manager.
refKeys | A reference to a list that will be filled with all the available options. |
Reimplemented in Ogre::PCZSceneManager, and Ogre::OctreeSceneManager.
|
virtual |
Internal method for updating the scene graph ie the tree of SceneNode instances managed by this class.
Reimplemented in Ogre::PCZSceneManager, and Ogre::OctreeSceneManager.
|
virtual |
Internal method which parses the scene to find visible objects to render.
Reimplemented in Ogre::BspSceneManager, Ogre::PCZSceneManager, and Ogre::OctreeSceneManager.
void Ogre::SceneManager::_issueRenderOp | ( | Renderable * | rend, |
const Pass * | pass | ||
) |
Internal method for issuing the render operation.
void Ogre::SceneManager::_renderVisibleObjects | ( | void | ) |
Sends visible objects found in _findVisibleObjects to the rendering engine.
|
virtual |
Prompts the class to send its contents to the renderer.
camera | Pointer to a camera from whose viewpoint the scene is to be rendered. |
vp | The target viewport |
includeOverlays | unused |
Reimplemented in Ogre::PCZSceneManager.
void Ogre::SceneManager::_setDestinationRenderSystem | ( | RenderSystem * | sys | ) |
Notifies the scene manager of its destination render system.
sys | Pointer to the RenderSystem subclass to be used as a render target. |
void Ogre::SceneManager::_releaseManualHardwareResources | ( | ) |
Notifies the scene manager that hardware resources were lost.
void Ogre::SceneManager::_restoreManualHardwareResources | ( | ) |
Notifies the scene manager that hardware resources should be restored.
|
inline |
References Ogre::Camera::getViewport().
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::AUTODETECT_RESOURCE_GROUP_NAME |
||
) |
Enables / disables a 'sky plane' i.e.
a plane at constant distance from the camera representing the sky.
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 compatible 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 tessellation on the plane to perform per-vertex effects. |
groupName | The name of the resource group to which to assign the plane mesh. |
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::AUTODETECT_RESOURCE_GROUP_NAME |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Enables / disables a 'sky plane'.
|
inline |
Return whether a key plane is enabled.
|
inline |
Get the sky plane node, if enabled.
|
inline |
Get the parameters used to construct the SkyPlane, if any.
void Ogre::SceneManager::setSkyBox | ( | bool | enable, |
const String & | materialName, | ||
Real | distance = 5000 , |
||
bool | drawFirst = true , |
||
const Quaternion & | orientation = Quaternion::IDENTITY , |
||
const String & | groupName = ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME |
||
) |
Enables / disables a 'sky box' i.e.
a 6-sided box at constant distance from the camera representing the sky.
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. |
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::AUTODETECT_RESOURCE_GROUP_NAME |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Enables / disables a 'sky box'.
|
inline |
Return whether a skybox is enabled.
|
inline |
Get the skybox node, if enabled.
|
inline |
Get the parameters used to generate the current SkyBox, if any.
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::AUTODETECT_RESOURCE_GROUP_NAME |
||
) |
Enables / disables a 'sky dome' i.e.
an illusion of a curved sky.
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. |
xsegments,ysegments,ysegments_keep | see MeshManager::createCurvedIllusionPlane |
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::AUTODETECT_RESOURCE_GROUP_NAME |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Enables / disables a 'sky dome'.
|
inline |
Return whether a skydome is enabled.
|
inline |
Get the sky dome node, if enabled.
|
inline |
Get the parameters used to generate the current SkyDome, if any.
void Ogre::SceneManager::setFog | ( | FogMode | mode = FOG_NONE , |
const ColourValue & | colour = ColourValue::White , |
||
Real | expDensity = 0.001f , |
||
Real | linearStart = 0.0f , |
||
Real | linearEnd = 1.0f |
||
) |
Sets the fogging mode applied to the scene.
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. |
FogMode Ogre::SceneManager::getFogMode | ( | void | ) | const |
Returns the fog mode for the scene.
const ColourValue& Ogre::SceneManager::getFogColour | ( | void | ) | const |
Returns the fog colour for the scene.
Real Ogre::SceneManager::getFogStart | ( | void | ) | const |
Returns the fog start distance for the scene.
Real Ogre::SceneManager::getFogEnd | ( | void | ) | const |
Returns the fog end distance for the scene.
Real Ogre::SceneManager::getFogDensity | ( | void | ) | const |
Returns the fog density for the scene.
BillboardSet* Ogre::SceneManager::createBillboardSet | ( | unsigned int | poolSize = 20 | ) |
Creates a new BillboardSet for use with this scene manager.
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).
poolSize | The initial size of the pool of billboards (see BillboardSet for more information) |
BillboardSet* Ogre::SceneManager::createBillboardSet | ( | const String & | name, |
unsigned int | poolSize = 20 |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Creates a new BillboardSet for use with this scene manager.
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).
poolSize | The initial size of the pool of billboards (see BillboardSet for more information) |
name | The name to give to this billboard set. Must be unique. |
BillboardSet* Ogre::SceneManager::getBillboardSet | ( | const String & | name | ) | const |
Retrieves a pointer to the named BillboardSet.
bool Ogre::SceneManager::hasBillboardSet | ( | const String & | name | ) | const |
Returns whether a billboardset with the given name exists.
void Ogre::SceneManager::destroyBillboardSet | ( | BillboardSet * | set | ) |
Removes & destroys an BillboardSet from the SceneManager.
void Ogre::SceneManager::destroyBillboardSet | ( | const String & | name | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Ogre::SceneManager::destroyAllBillboardSets | ( | void | ) |
Removes & destroys all BillboardSets.
void Ogre::SceneManager::_applySceneAnimations | ( | void | ) |
Internal method for applying animations to scene nodes.
Creates an animation which can be used to animate scene nodes.
name | The name of the animation, must be unique within this SceneManager. |
length | The total length of the animation. |
Looks up an Animation object previously created with createAnimation.
bool Ogre::SceneManager::hasAnimation | ( | const String & | name | ) | const |
Returns whether an animation with the given name exists.
void Ogre::SceneManager::destroyAnimation | ( | const String & | name | ) |
Destroys an Animation.
void Ogre::SceneManager::destroyAllAnimations | ( | void | ) |
Removes all animations created using this SceneManager.
AnimationState* Ogre::SceneManager::createAnimationState | ( | const String & | animName | ) |
Create an AnimationState object for managing application of animations.
animName | The name of an animation created already with createAnimation. |
AnimationState* Ogre::SceneManager::getAnimationState | ( | const String & | animName | ) | const |
Retrieves animation state as previously created using createAnimationState.
bool Ogre::SceneManager::hasAnimationState | ( | const String & | name | ) | const |
Returns whether an animation state with the given name exists.
void Ogre::SceneManager::destroyAnimationState | ( | const String & | name | ) |
Destroys an AnimationState.
void Ogre::SceneManager::destroyAllAnimationStates | ( | void | ) |
Removes all animation states created using this SceneManager.
|
inline |
Returns a specialised MapIterator over all animations in the scene.
|
inline |
Returns a const version of the animation list.
|
inline |
Returns a specialised MapIterator over all animation states in the scene.
References Ogre::AnimationStateSet::getAnimationStateIterator().
|
inline |
Returns a specialised Map over all animation states in the scene.
References Ogre::AnimationStateSet::getAnimationStates().
void Ogre::SceneManager::manualRender | ( | RenderOperation * | rend, |
Pass * | pass, | ||
Viewport * | vp, | ||
const Affine3 & | worldMatrix, | ||
const Affine3 & | viewMatrix, | ||
const Matrix4 & | projMatrix, | ||
bool | doBeginEndFrame = false |
||
) |
Manual rendering method, for advanced users only.
rend | A RenderOperation object describing the rendering op |
pass | The Pass to use for this render |
vp | Pointer to the viewport to render to, or 0 to use the current viewport |
worldMatrix | The transform to apply from object to world space |
viewMatrix | The transform to apply from world to view space |
projMatrix | The transform to apply from view to screen space |
doBeginEndFrame | If true, beginFrame() and endFrame() are called, otherwise not. You should leave this as false if you are calling this within the main render loop. |
void Ogre::SceneManager::manualRender | ( | Renderable * | rend, |
const Pass * | pass, | ||
Viewport * | vp, | ||
const Affine3 & | viewMatrix, | ||
const Matrix4 & | projMatrix, | ||
bool | doBeginEndFrame = false , |
||
bool | lightScissoringClipping = true , |
||
bool | doLightIteration = true , |
||
const LightList * | manualLightList = 0 |
||
) |
Manual rendering method for rendering a single object.
rend | The renderable to issue to the pipeline |
pass | The pass to use |
vp | Pointer to the viewport to render to, or 0 to use the existing viewport |
doBeginEndFrame | If true, beginFrame() and endFrame() are called, otherwise not. You should leave this as false if you are calling this within the main render loop. |
viewMatrix | The transform to apply from world to view space |
projMatrix | The transform to apply from view to screen space |
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. |
RenderQueue* Ogre::SceneManager::getRenderQueue | ( | void | ) |
Retrieves the internal render queue, for advanced users only.
void Ogre::SceneManager::addRenderQueueListener | ( | RenderQueueListener * | newListener | ) |
Registers a new RenderQueueListener which will be notified when render queues are processed.
void Ogre::SceneManager::removeRenderQueueListener | ( | RenderQueueListener * | delListener | ) |
Removes a listener previously added with addRenderQueueListener.
void Ogre::SceneManager::addRenderObjectListener | ( | RenderObjectListener * | newListener | ) |
Registers a new Render Object Listener which will be notified when rendering an object.
void Ogre::SceneManager::removeRenderObjectListener | ( | RenderObjectListener * | delListener | ) |
Removes a listener previously added with addRenderObjectListener.
void Ogre::SceneManager::addSpecialCaseRenderQueue | ( | uint8 | qid | ) |
Adds an item to the 'special case' render queue list.
qid | The identifier of the queue which should be added to the special case list. Nothing happens if the queue is already in the list. |
void Ogre::SceneManager::removeSpecialCaseRenderQueue | ( | uint8 | qid | ) |
Removes an item to the 'special case' render queue list.
qid | The identifier of the queue which should be removed from the special case list. Nothing happens if the queue is not in the list. |
void Ogre::SceneManager::clearSpecialCaseRenderQueues | ( | void | ) |
Clears the 'special case' render queue list.
void Ogre::SceneManager::setSpecialCaseRenderQueueMode | ( | SpecialCaseRenderQueueMode | mode | ) |
Sets the way the special case render queue list is processed.
mode | The mode of processing |
SpecialCaseRenderQueueMode Ogre::SceneManager::getSpecialCaseRenderQueueMode | ( | void | ) |
Gets the way the special case render queue list is processed.
bool Ogre::SceneManager::isRenderQueueToBeProcessed | ( | uint8 | qid | ) |
Returns whether or not the named queue will be rendered based on the current 'special case' render queue list and mode.
qid | The identifier of the queue which should be tested |
void Ogre::SceneManager::setWorldGeometryRenderQueue | ( | uint8 | qid | ) |
Sets the render queue that the world geometry (if any) this SceneManager renders will be associated with.
uint8 Ogre::SceneManager::getWorldGeometryRenderQueue | ( | void | ) |
Gets the render queue that the world geometry (if any) this SceneManager renders will be associated with.
void Ogre::SceneManager::_notifyAutotrackingSceneNode | ( | SceneNode * | node, |
bool | autoTrack | ||
) |
Internal method for notifying the manager that a SceneNode is autotracking.
|
virtual |
Creates an AxisAlignedBoxSceneQuery for this scene manager.
box | Details of the box which describes the region for this query. |
mask | The query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details. |
Reimplemented in Ogre::PCZSceneManager, and Ogre::OctreeSceneManager.
|
virtual |
Creates a SphereSceneQuery for this scene manager.
sphere | Details of the sphere which describes the region for this query. |
mask | The query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details. |
Reimplemented in Ogre::PCZSceneManager, and Ogre::OctreeSceneManager.
|
virtual |
Creates a PlaneBoundedVolumeListSceneQuery for this scene manager.
volumes | Details of the volumes which describe the region for this query. |
mask | The query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details. |
Reimplemented in Ogre::PCZSceneManager, and Ogre::OctreeSceneManager.
|
virtual |
Creates a RaySceneQuery for this scene manager.
ray | Details of the ray which describes the region for this query. |
mask | The query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details. |
Reimplemented in Ogre::PCZSceneManager, Ogre::BspSceneManager, and Ogre::OctreeSceneManager.
|
virtual |
Creates an IntersectionSceneQuery for this scene manager.
mask | The query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details. |
Reimplemented in Ogre::PCZSceneManager, Ogre::BspSceneManager, and Ogre::OctreeSceneManager.
void Ogre::SceneManager::destroyQuery | ( | SceneQuery * | query | ) |
Destroys a scene query of any type.
void Ogre::SceneManager::_suppressShadows | ( | bool | suppress | ) |
Indicates to the SceneManager whether it should suppress the active shadow rendering technique until told otherwise.
suppress | If true, no shadow rendering will occur until this method is called again with a parameter of false. |
|
inline |
Are shadows suppressed?
void Ogre::SceneManager::setShadowTechnique | ( | ShadowTechnique | technique | ) |
Sets the general shadow technique to be used in this scene.
technique | The shadowing technique to use for the scene. |
|
inline |
Gets the current shadow technique.
|
inline |
Enables / disables the rendering of debug information for shadows.
|
inline |
Are debug shadows shown?
|
inline |
Set the colour used to modulate areas in shadow.
const ColourValue& Ogre::SceneManager::getShadowColour | ( | void | ) | const |
Get the colour used to modulate areas in shadow.
void Ogre::SceneManager::setShadowDirectionalLightExtrusionDistance | ( | Real | dist | ) |
Sets the distance a shadow volume is extruded for a directional light.
Real Ogre::SceneManager::getShadowDirectionalLightExtrusionDistance | ( | void | ) | const |
Gets the distance a shadow volume is extruded for a directional light.
void Ogre::SceneManager::setShadowFarDistance | ( | Real | distance | ) |
Sets the default maximum distance away from the camera that shadows will be visible.
You have to call this function before you create lights or the default distance of zero will be used.
|
inline |
Gets the default maximum distance away from the camera that shadows will be visible.
|
inline |
void Ogre::SceneManager::setShadowIndexBufferSize | ( | size_t | size | ) |
Sets the maximum size of the index buffer used to render shadow primitives.
size | The number of indexes; divide this by 3 to determine the number of triangles. |
|
inline |
Get the size of the shadow index buffer.
const ShadowCameraSetupPtr& Ogre::SceneManager::getShadowCameraSetup | ( | ) | const |
Get the shadow camera setup in use for all lights which don't have their own shadow camera setup.
|
inline |
Sets whether we should use an inifinite camera far plane when rendering stencil shadows.
|
inline |
Is there a stencil shadow based shadowing technique in use?
References Ogre::SHADOWDETAILTYPE_STENCIL.
|
inline |
Is there a texture shadow based shadowing technique in use?
References Ogre::SHADOWDETAILTYPE_TEXTURE.
|
inline |
Is there a modulative shadowing technique in use?
References Ogre::SHADOWDETAILTYPE_MODULATIVE.
|
inline |
Is there an additive shadowing technique in use?
References Ogre::SHADOWDETAILTYPE_ADDITIVE.
|
inline |
Is the shadow technique integrated into primary materials?
References Ogre::SHADOWDETAILTYPE_INTEGRATED.
|
inline |
Is there any shadowing technique in use?
References Ogre::SHADOWTYPE_NONE.
|
inline |
Sets whether when using a built-in additive shadow mode, user clip planes should be used to restrict light rendering.
|
inline |
Gets whether when using a built-in additive shadow mode, user clip planes should be used to restrict light rendering.
|
virtual |
Method for preparing shadow textures ready for use in a regular render Do not call manually unless before frame start or rendering is paused If lightList is not supplied, will render all lights in frustum.
Reimplemented in Ogre::PCZSceneManager.
|
inline |
Set the size of the texture used for all texture-based shadows.
|
inline |
Set the detailed configuration for a shadow texture.
shadowIndex | The index of the texture to configure, must be < the number of shadow textures setting |
width | The width of the texture |
height | The height of the texture |
format | The pixel format of the texture |
fsaa | The level of multisampling to use. Ignored if the device does not support it. |
depthBufferPoolId | The pool # it should query the depth buffers from |
|
inline |
Set the detailed configuration for a shadow texture.
shadowIndex | The index of the texture to configure, must be < the number of shadow textures setting |
config | Configuration structure |
|
inline |
Get the current shadow texture settings.
ConstShadowTextureConfigIterator Ogre::SceneManager::getShadowTextureConfigIterator | ( | ) | const |
|
inline |
Set the pixel format of the textures used for texture-based shadows.
|
inline |
Set the level of multisample AA of the textures used for texture-based shadows.
|
inline |
Set the number of textures allocated for texture-based shadows.
|
inline |
|
inline |
Set the number of shadow textures a light type uses.
|
inline |
Get the number of shadow textures is assigned for the given light type.
|
inline |
Sets the size and count of textures used in texture-based shadows.
|
inline |
Get a reference to the shadow texture currently in use at the given index.
|
inline |
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.
When generating a shadow texture from a directional light, an approximation is used since it is not possible to render the entire scene to one texture. The texture is projected onto an area centred on the camera, and is the shadow far distance * 2 in length (it is square). This wastes a lot of texture space outside the frustum though, so this offset allows you to move the texture in front of the camera more. However, be aware that this can cause a little shadow 'jittering' during rotation, and that if you move it too far then you'll start to get artefacts close to the camera. The value is represented as a proportion of the shadow far distance, and the default is 0.6.
|
inline |
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.
|
inline |
Sets the proportional distance at which texture shadows begin to fade out.
|
inline |
Sets the proportional distance at which texture shadows finish to fading out.
void Ogre::SceneManager::setShadowTextureSelfShadow | ( | bool | selfShadow | ) |
Sets whether or not texture shadows should attempt to self-shadow.
selfShadow | Whether to attempt self-shadowing with texture shadows |
|
inline |
Gets whether or not texture shadows attempt to self-shadow.
|
inline |
Sets the default material to use for rendering shadow casters.
|
inline |
Sets the default material to use for rendering shadow receivers.
|
inline |
Sets whether or not shadow casters should be rendered into shadow textures using their back faces rather than their front faces.
|
inline |
Gets whether or not shadow casters should be rendered into shadow textures using their back faces rather than their front faces.
void Ogre::SceneManager::setShadowCameraSetup | ( | const ShadowCameraSetupPtr & | shadowSetup | ) |
Set the shadow camera setup to use for all lights which don't have their own shadow camera setup.
|
inline |
Sets the active compositor chain of the current scene being rendered.
|
inline |
Sets whether to use late material resolving or not.
If set, materials will be resolved from the materials at the pass-setting stage and not at the render queue building stage. This is useful when the active material scheme during the render queue building stage is different from the one during the rendering stage.
|
inline |
Gets whether using late material resolving or not.
|
inline |
Gets the active compositor chain of the current scene being rendered.
void Ogre::SceneManager::addListener | ( | Listener * | s | ) |
Add a listener which will get called back on scene manager events.
void Ogre::SceneManager::removeListener | ( | Listener * | s | ) |
Remove a listener.
StaticGeometry* Ogre::SceneManager::createStaticGeometry | ( | const String & | name | ) |
Creates a StaticGeometry instance suitable for use with this SceneManager.
name | The name to give the new object |
StaticGeometry* Ogre::SceneManager::getStaticGeometry | ( | const String & | name | ) | const |
Retrieve a previously created StaticGeometry instance.
bool Ogre::SceneManager::hasStaticGeometry | ( | const String & | name | ) | const |
Returns whether a static geometry instance with the given name exists.
void Ogre::SceneManager::destroyStaticGeometry | ( | StaticGeometry * | geom | ) |
Remove & destroy a StaticGeometry instance.
void Ogre::SceneManager::destroyStaticGeometry | ( | const String & | name | ) |
Remove & destroy a StaticGeometry instance.
void Ogre::SceneManager::destroyAllStaticGeometry | ( | void | ) |
Remove & destroy all StaticGeometry instances.
InstanceManager* Ogre::SceneManager::createInstanceManager | ( | const String & | customName, |
const String & | meshName, | ||
const String & | groupName, | ||
InstanceManager::InstancingTechnique | technique, | ||
size_t | numInstancesPerBatch, | ||
uint16 | flags = 0 , |
||
unsigned short | subMeshIdx = 0 |
||
) |
Creates an InstanceManager interface to create & manipulate instanced entities You need to call this function at least once before start calling createInstancedEntity to build up an instance based on the given mesh.
customName | Custom name for referencing. Must be unique |
meshName | The mesh name the instances will be based upon |
groupName | The resource name where the mesh lives |
technique | Technique to use, which may be shader based, or hardware based. |
numInstancesPerBatch | Suggested number of instances per batch. The actual number may end up being lower if the technique doesn't support having so many. It can't be zero |
flags | Flags to pass to the InstanceManager see InstanceManagerFlags |
subMeshIdx | InstanceManager only supports using one submesh from the base mesh. This parameter says which submesh to pick (must be <= Mesh::getNumSubMeshes()) |
InstanceManager* Ogre::SceneManager::getInstanceManager | ( | const String & | managerName | ) | const |
Retrieves an existing InstanceManager by it's name.
bool Ogre::SceneManager::hasInstanceManager | ( | const String & | managerName | ) | const |
Returns whether an InstanceManager with the given name exists.
void Ogre::SceneManager::destroyInstanceManager | ( | const String & | name | ) |
Destroys an InstanceManager if it was created with createInstanceManager()
name | Name of the manager to remove |
void Ogre::SceneManager::destroyInstanceManager | ( | InstanceManager * | instanceManager | ) |
void Ogre::SceneManager::destroyAllInstanceManagers | ( | void | ) |
size_t Ogre::SceneManager::getNumInstancesPerBatch | ( | const String & | meshName, |
const String & | groupName, | ||
const String & | materialName, | ||
InstanceManager::InstancingTechnique | technique, | ||
size_t | numInstancesPerBatch, | ||
uint16 | flags = 0 , |
||
unsigned short | subMeshIdx = 0 |
||
) |
InstancedEntity* Ogre::SceneManager::createInstancedEntity | ( | const String & | materialName, |
const String & | managerName | ||
) |
Creates an InstancedEntity based on an existing InstanceManager.
Alternatively you can call InstanceManager::createInstancedEntity using the returned pointer from createInstanceManager()
materialName | Material name |
managerName | Name of the instance manager |
void Ogre::SceneManager::destroyInstancedEntity | ( | InstancedEntity * | instancedEntity | ) |
Removes an InstancedEntity,.
instancedEntity | Instance to remove |
void Ogre::SceneManager::_addDirtyInstanceManager | ( | InstanceManager * | dirtyManager | ) |
Called by an InstanceManager when it has at least one InstanceBatch that needs their bounds to be updated for proper culling.
dirtyManager | The manager with dirty batches to update |
MovableObject* Ogre::SceneManager::createMovableObject | ( | const String & | name, |
const String & | typeName, | ||
const NameValuePairList * | params = 0 |
||
) |
Create a movable object of the type specified.
name | The name to give the object. Must be unique within type. |
typeName | The type of object to create |
params | Optional name/value pair list to give extra parameters to the created object. |
MovableObject* Ogre::SceneManager::createMovableObject | ( | const String & | typeName, |
const NameValuePairList * | params = 0 |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Destroys a MovableObject with the name specified, of the type specified.
void Ogre::SceneManager::destroyMovableObject | ( | MovableObject * | m | ) |
Destroys a MovableObject.
void Ogre::SceneManager::destroyAllMovableObjectsByType | ( | const String & | typeName | ) |
Destroy all MovableObjects of a given type.
void Ogre::SceneManager::destroyAllMovableObjects | ( | void | ) |
Destroy all MovableObjects.
MovableObject* Ogre::SceneManager::getMovableObject | ( | const String & | name, |
const String & | typeName | ||
) | const |
Get a reference to a previously created MovableObject.
Returns whether a movable object instance with the given name exists.
const MovableObjectMap& Ogre::SceneManager::getMovableObjects | ( | const String & | typeName | ) |
Get all MovableObect instances of a given type.
MovableObjectIterator Ogre::SceneManager::getMovableObjectIterator | ( | const String & | typeName | ) |
void Ogre::SceneManager::injectMovableObject | ( | MovableObject * | m | ) |
Inject a MovableObject instance created externally.
Extract a previously injected MovableObject.
void Ogre::SceneManager::extractMovableObject | ( | MovableObject * | m | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Ogre::SceneManager::extractAllMovableObjectsByType | ( | const String & | typeName | ) |
Extract all injected MovableObjects of a given type.
|
inline |
Sets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible.
|
inline |
Gets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible.
uint32 Ogre::SceneManager::_getCombinedVisibilityMask | ( | void | ) | const |
Internal method for getting the combination between the global visibility mask and the per-viewport visibility mask.
|
inline |
Sets whether the SceneManager should search for visible objects, or whether they are being manually handled.
|
inline |
Gets whether the SceneManager should search for visible objects, or whether they are being manually handled.
|
inline |
Set whether to automatically normalise normals on objects whenever they are scaled.
|
inline |
Get whether to automatically normalise normals on objects whenever they are scaled.
|
inline |
Set whether to automatically flip the culling mode on objects whenever they are negatively scaled.
|
inline |
Get whether to automatically flip the culling mode on objects whenever they are negatively scaled.
void Ogre::SceneManager::_injectRenderWithPass | ( | Pass * | pass, |
Renderable * | rend, | ||
bool | shadowDerivation = true , |
||
bool | doLightIteration = false , |
||
const LightList * | manualLightList = 0 |
||
) |
Render something as if it came from the current queue.
rend | The renderable to issue to the pipeline |
pass | The pass which is being used |
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. |
shadowDerivation | If false, disables the derivation of shadow passes from original passes |
void Ogre::SceneManager::_suppressRenderStateChanges | ( | bool | suppress | ) |
Indicates to the SceneManager whether it should suppress changing the RenderSystem states when rendering objects.
suppress | If true, no RenderSystem state changes will be issued until this method is called again with a parameter of false. |
|
inline |
Are render state changes suppressed?
const Pass* Ogre::SceneManager::_setPass | ( | const Pass * | pass, |
bool | evenIfSuppressed = false , |
||
bool | shadowDerivation = true |
||
) |
Internal method for setting up the renderstate for a rendering pass.
pass | The Pass details to set. |
evenIfSuppressed | Sets the pass details even if render state changes are suppressed; if you are using this to manually set state when render state changes are suppressed, you should set this to true. |
shadowDerivation | If false, disables the derivation of shadow passes from original passes |
void Ogre::SceneManager::_markGpuParamsDirty | ( | uint16 | mask | ) |
Method to allow you to mark gpu parameters as dirty, causing them to be updated according to the mask that you set when updateGpuProgramParameters is next called.
Only really useful if you're controlling parameter state in inner rendering loop callbacks.
mask | Some combination of GpuParamVariability which is bitwise OR'ed with the current dirty state. |
void Ogre::SceneManager::_renderQueueGroupObjects | ( | RenderQueueGroup * | group, |
QueuedRenderableCollection::OrganisationMode | om | ||
) |
Render the objects in a given queue group.
void Ogre::SceneManager::setQueuedRenderableVisitor | ( | SceneMgrQueuedRenderableVisitor * | visitor | ) |
Advanced method for supplying an alternative visitor, used for parsing the render queues and sending the results to the renderer.
visitor | Your implementation of SceneMgrQueuedRenderableVisitor. If you pass 0, the default implementation will be used. |
SceneMgrQueuedRenderableVisitor* Ogre::SceneManager::getQueuedRenderableVisitor | ( | void | ) | const |
Gets the current visitor object which processes queued renderables.
RenderSystem* Ogre::SceneManager::getDestinationRenderSystem | ( | ) |
Get the rendersystem subclass to which the output of this Scene Manager gets sent.
|
inline |
Gets the current viewport being rendered (advanced use only, only valid during viewport update.
const VisibleObjectsBoundsInfo& Ogre::SceneManager::getVisibleObjectsBoundsInfo | ( | const Camera * | cam | ) | const |
Returns a visibility boundary box for a specific camera.
const VisibleObjectsBoundsInfo& Ogre::SceneManager::getShadowCasterBoundsInfo | ( | const Light * | light, |
size_t | iteration = 0 |
||
) | const |
Returns the shadow caster AAB for a specific light-camera combination.
void Ogre::SceneManager::addLodListener | ( | LodListener * | listener | ) |
Add a level of detail listener.
void Ogre::SceneManager::removeLodListener | ( | LodListener * | listener | ) |
Remove a level of detail listener.
void Ogre::SceneManager::_notifyMovableObjectLodChanged | ( | MovableObjectLodChangedEvent & | evt | ) |
Notify that a movable object LOD change event has occurred.
void Ogre::SceneManager::_notifyEntityMeshLodChanged | ( | EntityMeshLodChangedEvent & | evt | ) |
Notify that an entity mesh LOD change event has occurred.
void Ogre::SceneManager::_notifyEntityMaterialLodChanged | ( | EntityMaterialLodChangedEvent & | evt | ) |
Notify that an entity material LOD change event has occurred.
void Ogre::SceneManager::_handleLodEvents | ( | ) |
Handle LOD events.
|
inline |
|
inline |