OGRE 14.3
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 | |
class | Listener |
Class that allows listening in on the various stages of SceneManager processing, so that custom behaviour can be implemented from outside. More... | |
struct | RenderContext |
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. | |
virtual | ~SceneManager () |
Default destructor. | |
virtual void | _findVisibleObjects (Camera *cam, VisibleObjectsBoundsInfo *visibleBounds, bool onlyShadowCasters) |
Internal method which parses the scene to find visible objects to render. | |
CompositorChain * | _getActiveCompositorChain () const |
Gets the active compositor chain of the current scene being rendered. | |
const AutoParamDataSource * | _getAutoParamDataSource () |
uint32 | _getCombinedVisibilityMask (void) const |
Internal method for getting the combination between the global visibility mask and the per-viewport visibility mask. | |
IlluminationRenderStage | _getCurrentRenderStage () |
void | _handleLodEvents () |
Handle LOD events. | |
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. | |
void | _issueRenderOp (Renderable *rend, const Pass *pass) |
Internal method for issuing the render operation. | |
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. | |
void | _notifyAutotrackingSceneNode (SceneNode *node, bool autoTrack) |
Internal method for notifying the manager that a SceneNode is autotracking. | |
void | _notifyEntityMaterialLodChanged (EntityMaterialLodChangedEvent &evt) |
Notify that an entity material LOD change event has occurred. | |
void | _notifyEntityMeshLodChanged (EntityMeshLodChangedEvent &evt) |
Notify that an entity mesh LOD change event has occurred. | |
void | _notifyMovableObjectLodChanged (MovableObjectLodChangedEvent &evt) |
Notify that a movable object LOD change event has occurred. | |
RenderContext * | _pauseRendering () |
Pause rendering of the frame. | |
void | _releaseManualHardwareResources () |
Notifies the scene manager that hardware resources were lost. | |
void | _renderQueueGroupObjects (RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om) |
Render the objects in a given queue group. | |
virtual void | _renderScene (Camera *camera, Viewport *vp, bool includeOverlays=true) |
Prompts the class to send its contents to the renderer. | |
void | _renderVisibleObjects (void) |
Sends visible objects found in _findVisibleObjects to the rendering engine. | |
void | _restoreManualHardwareResources () |
Notifies the scene manager that hardware resources should be restored. | |
void | _resumeRendering (RenderContext *context) |
Resume rendering of the frame. | |
void | _setActiveCompositorChain (CompositorChain *chain) |
Sets the active compositor chain of the current scene being rendered. | |
void | _setDestinationRenderSystem (RenderSystem *sys) |
Notifies the scene manager of its destination render system. | |
const Pass * | _setPass (const Pass *pass, bool shadowDerivation=true) |
Internal method for setting up the renderstate for a rendering pass. | |
virtual void | _updateSceneGraph (Camera *cam) |
Internal method for updating the scene graph ie the tree of SceneNode instances managed by this class. | |
void | addListener (Listener *s) |
Add a listener which will get called back on scene manager events. | |
void | addLodListener (LodListener *listener) |
Add a level of detail listener. | |
void | addRenderObjectListener (RenderObjectListener *newListener) |
Registers a new Render Object Listener which will be notified when rendering an object. | |
void | addRenderQueueListener (RenderQueueListener *newListener) |
Registers a new RenderQueueListener which will be notified when render queues are processed. | |
void | addShadowTextureListener (ShadowTextureListener *s) |
Add a listener which will get called back on shadow texture events. | |
void | addSpecialCaseRenderQueue (uint8 qid) |
Adds an item to the 'special case' render queue list. | |
virtual void | clearScene (void) |
Empties the entire scene, including all SceneNodes, Entities, Lights, BillboardSets etc. | |
void | clearSpecialCaseRenderQueues (void) |
Clears the 'special case' render queue list. | |
const ColourValue & | getAmbientLight (void) const |
Returns the ambient light level to be used for the scene. | |
Viewport * | getCurrentViewport (void) const |
Gets the current viewport being rendered (advanced use only, only valid during viewport update. | |
RenderSystem * | getDestinationRenderSystem () |
Get the rendersystem subclass to which the output of this Scene Manager gets sent. | |
bool | getFindVisibleObjects (void) |
Gets whether the SceneManager should search for visible objects, or whether they are being manually handled. | |
bool | getFlipCullingOnNegativeScale () const |
Get whether to automatically flip the culling mode on objects whenever they are negatively scaled. | |
const String & | getName (void) const |
Return the instance name of this SceneManager. | |
virtual bool | getOption (const String &strKey, void *pDestValue) |
Method for getting the value of an implementation-specific Scene Manager option. | |
virtual bool | getOptionKeys (StringVector &refKeys) |
Method for getting all the implementation-specific options of the scene manager. | |
virtual bool | getOptionValues (const String &strKey, StringVector &refValueList) |
Method for getting all possible values for a specific option. | |
SceneMgrQueuedRenderableVisitor * | getQueuedRenderableVisitor (void) const |
Gets the current visitor object which processes queued renderables. | |
RenderQueue * | getRenderQueue (void) |
Retrieves the internal render queue, for advanced users only. | |
const VisibleObjectsBoundsInfo & | getShadowCasterBoundsInfo (const Light *light, size_t iteration=0) const |
Returns the shadow caster AAB for a specific light-camera combination. | |
SpecialCaseRenderQueueMode | getSpecialCaseRenderQueueMode (void) |
Gets the way the special case render queue list is processed. | |
virtual ViewPoint | getSuggestedViewpoint (bool random=false) |
Asks the SceneManager to provide a suggested viewpoint from which the scene should be viewed. | |
virtual const String & | getTypeName (void) const =0 |
Retrieve the type name of this scene manager. | |
uint32 | getVisibilityMask (void) |
Gets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible. | |
const VisibleObjectsBoundsInfo & | getVisibleObjectsBoundsInfo (const Camera *cam) const |
Returns a visibility boundary box for a specific camera. | |
uint8 | getWorldGeometryRenderQueue () |
Gets the render queue that the world geometry (if any) this SceneManager renders will be associated with. | |
virtual bool | hasOption (const String &strKey) const |
Method for verifying whether the scene manager has an implementation-specific option. | |
bool | isLateMaterialResolving () const |
Gets whether using late material resolving or not. | |
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. | |
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. | |
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. | |
OGRE_MUTEX (sceneGraphMutex) | |
Mutex to protect the scene graph from simultaneous access from multiple threads. | |
void | removeListener (Listener *s) |
Remove a listener. | |
void | removeLodListener (LodListener *listener) |
Remove a level of detail listener. | |
void | removeRenderObjectListener (RenderObjectListener *delListener) |
Removes a listener previously added with addRenderObjectListener. | |
void | removeRenderQueueListener (RenderQueueListener *delListener) |
Removes a listener previously added with addRenderQueueListener. | |
void | removeShadowTextureListener (ShadowTextureListener *s) |
Remove a listener. | |
void | removeSpecialCaseRenderQueue (uint8 qid) |
Removes an item to the 'special case' render queue list. | |
void | setAmbientLight (const ColourValue &colour) |
Sets the ambient light level to be used for the scene. | |
void | setFindVisibleObjects (bool find) |
Sets whether the SceneManager should search for visible objects, or whether they are being manually handled. | |
void | setFlipCullingOnNegativeScale (bool n) |
Set whether to automatically flip the culling mode on objects whenever they are negatively scaled. | |
void | setLateMaterialResolving (bool isLate) |
Sets whether to use late material resolving or not. | |
virtual bool | setOption (const String &strKey, const void *pValue) |
Method for setting a specific option of the Scene Manager. | |
void | setQueuedRenderableVisitor (SceneMgrQueuedRenderableVisitor *visitor) |
Advanced method for supplying an alternative visitor, used for parsing the render queues and sending the results to the renderer. | |
void | setSpecialCaseRenderQueueMode (SpecialCaseRenderQueueMode mode) |
Sets the way the special case render queue list is processed. | |
void | setVisibilityMask (uint32 vmask) |
Sets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible. | |
void | setWorldGeometryRenderQueue (uint8 qid) |
Sets the render queue that the world geometry (if any) this SceneManager renders will be associated with. | |
Cameras | |
virtual Camera * | createCamera (const String &name) |
Creates a camera to be managed by this scene manager. | |
Camera * | getCamera (const String &name) const |
Retrieves a pointer to the named camera. | |
bool | hasCamera (const String &name) const |
Returns whether a camera with the given name exists. | |
void | destroyCamera (Camera *cam) |
Removes a camera from the scene. | |
void | destroyCamera (const String &name) |
Removes a camera from the scene. | |
void | destroyAllCameras (void) |
Removes (and destroys) all cameras from the scene. | |
void | setCameraRelativeRendering (bool rel) |
Set whether to use camera-relative coordinates when rendering, ie to always place the camera at the origin and move the world around it. | |
bool | getCameraRelativeRendering () const |
Get whether to use camera-relative coordinates when rendering, ie to always place the camera at the origin and move the world around it. | |
CameraIterator | getCameraIterator (void) |
Returns a specialised MapIterator over all cameras in the scene. | |
const CameraList & | getCameras () const |
Returns a const version of the camera list. | |
Lights | |
virtual Light * | createLight (const String &name) |
Creates a light for use in the scene. | |
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. | |
virtual Light * | createLight () |
Creates a light with a generated name. | |
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. | |
virtual Light * | getLight (const String &name) const |
Get a reference to a previously created object instance. | |
virtual bool | hasLight (const String &name) const |
Returns whether a object instance with the given name exists. | |
const PlaneList & | getLightClippingPlanes (Light *l) |
Retrieve a set of clipping planes for a given light. | |
const RealRect & | getLightScissorRect (Light *l, const Camera *cam) |
Retrieve a scissor rectangle for a given light and camera. | |
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. | |
virtual void | destroyLight (const String &name) |
Removes the light from the scene and destroys it. | |
void | destroyLight (Light *light) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
virtual void | destroyAllLights (void) |
Removes and destroys all lights in the scene. | |
void | _notifyLightsDirty (void) |
Advanced method to increase the lights dirty counter due to lights having changed. | |
ulong | _getLightsDirtyCounter (void) const |
Advanced method to gets the lights dirty counter. | |
const LightList & | _getLightsAffectingFrustum (void) const |
Get the list of lights which could be affecting the frustum. | |
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. | |
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. | |
Scene Nodes | |
SceneNode * | createSceneNode (void) |
Creates an instance of a SceneNode. | |
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. | |
virtual void | destroySceneNode (SceneNode *sn) |
Destroys a SceneNode. | |
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. | |
SceneNode * | getRootSceneNode (void) |
Gets the SceneNode at the root of the scene hierarchy. | |
SceneNode * | getSceneNode (const String &name, bool throwExceptionIfNotFound=true) const |
Retrieves a named SceneNode from the scene graph. | |
bool | hasSceneNode (const String &name) const |
Returns whether a scene node with the given name exists. | |
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. | |
bool | getDisplaySceneNodes (void) const |
Returns true if all scene nodes axis are to be displayed. | |
void | showBoundingBoxes (bool bShow) |
Allows all bounding boxes of scene nodes to be displayed. | |
bool | getShowBoundingBoxes () const |
Returns if all bounding boxes of scene nodes are to be displayed. | |
DebugDrawer * | getDebugDrawer () const |
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). | |
Entity * | createEntity (const String &entityName, const MeshPtr &pMesh) |
Create an Entity (instance of a discrete mesh). | |
Entity * | createEntity (const String &meshName) |
Create an Entity (instance of a discrete mesh) with an autogenerated name. | |
Entity * | createEntity (const MeshPtr &pMesh) |
Create an Entity (instance of a discrete mesh) with an autogenerated name. | |
Entity * | getEntity (const String &name) const |
Get a reference to a previously created object instance. | |
bool | hasEntity (const String &name) const |
Returns whether a object instance with the given name exists. | |
void | destroyEntity (MovableObject *ent) |
Removes & destroys an Entity from the SceneManager. | |
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. | |
void | destroyAllEntities (void) |
Removes & destroys all Entities. | |
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. | |
ManualObject * | createManualObject () |
Create a ManualObject, an object which you populate with geometry manually through a GL immediate-mode style interface, generating the name. | |
ManualObject * | getManualObject (const String &name) const |
Get a reference to a previously created object instance. | |
bool | hasManualObject (const String &name) const |
Returns whether a object instance with the given name exists. | |
void | destroyManualObject (MovableObject *obj) |
Removes & destroys a ManualObject from the SceneManager. | |
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. | |
void | destroyAllManualObjects (void) |
Removes & destroys all ManualObjects from the SceneManager. | |
Screenspace Rectangles | |
Rectangle2D * | createScreenSpaceRect (const String &name, bool includeTextureCoords=false) |
Creates a Rectangle2D that can be displayed for screen space effects or showing a basic GUI. | |
Rectangle2D * | createScreenSpaceRect (bool includeTextureCoords=false) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | hasScreenSpaceRect (const String &name) const |
Returns whether a object instance with the given name exists. | |
Rectangle2D * | getScreenSpaceRect (const String &name) const |
Get a reference to a previously created object instance. | |
Billboard Chains | |
BillboardChain * | createBillboardChain (const String &name) |
Create a BillboardChain, an object which you can use to render a linked chain of billboards. | |
BillboardChain * | createBillboardChain () |
Create a BillboardChain, an object which you can use to render a linked chain of billboards, with a generated name. | |
BillboardChain * | getBillboardChain (const String &name) const |
Get a reference to a previously created object instance. | |
bool | hasBillboardChain (const String &name) const |
Returns whether a object instance with the given name exists. | |
void | destroyBillboardChain (MovableObject *obj) |
Removes & destroys a BillboardChain from the SceneManager. | |
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. | |
void | destroyAllBillboardChains (void) |
Removes & destroys all BillboardChains from the SceneManager. | |
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. | |
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. | |
RibbonTrail * | getRibbonTrail (const String &name) const |
Get a reference to a previously created object instance. | |
bool | hasRibbonTrail (const String &name) const |
Returns whether a object instance with the given name exists. | |
void | destroyRibbonTrail (MovableObject *obj) |
Removes & destroys a RibbonTrail from the SceneManager. | |
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. | |
void | destroyAllRibbonTrails (void) |
Removes & destroys all RibbonTrails from the SceneManager. | |
Particle System | |
ParticleSystem * | createParticleSystem (const String &name, const String &templateName) |
Creates a particle system based on a template. | |
ParticleSystem * | createParticleSystem (const String &name, size_t quota=500, const String &resourceGroup=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) |
Create a blank particle system. | |
ParticleSystem * | createParticleSystem (size_t quota=500, const String &resourceGroup=ResourceGroupManager::DEFAULT_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. | |
ParticleSystem * | getParticleSystem (const String &name) const |
Get a reference to a previously created object instance. | |
bool | hasParticleSystem (const String &name) const |
Returns whether a object instance with the given name exists. | |
void | destroyParticleSystem (MovableObject *obj) |
Removes & destroys a ParticleSystem from the SceneManager. | |
void | destroyParticleSystem (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 | destroyAllParticleSystems (void) |
Removes & destroys all ParticleSystems from the SceneManager. | |
World Geometry | |
virtual void | setWorldGeometry (const String &filename) |
Sets the source of the 'world' geometry, i.e. | |
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. | |
virtual size_t | estimateWorldGeometry (const String &filename) |
Estimate the number of loading stages required to load the named world geometry. | |
virtual size_t | estimateWorldGeometry (DataStreamPtr &stream, const String &typeName=BLANKSTRING) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Sky Rendering | |
void | setSkyRenderingEnabled (bool enable) |
Enables / disables a 'sky'. | |
bool | isSkyRenderingEnabled (void) const |
Return whether a sky is enabled. | |
SceneNode * | getSkyNode (void) const |
Get the sky node, if enabled. | |
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. | |
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. | |
void | setSkyPlaneEnabled (bool enable) |
bool | isSkyPlaneEnabled (void) const |
SceneNode * | getSkyPlaneNode (void) const |
SkyPlaneGenParameters | getSkyPlaneGenParameters (void) const |
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. | |
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. | |
void | setSkyBoxEnabled (bool enable) |
bool | isSkyBoxEnabled (void) const |
SceneNode * | getSkyBoxNode (void) const |
SkyBoxGenParameters | getSkyBoxGenParameters (void) const |
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. | |
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. | |
void | setSkyDomeEnabled (bool enable) |
bool | isSkyDomeEnabled (void) const |
SceneNode * | getSkyDomeNode (void) const |
SkyDomeGenParameters | getSkyDomeGenParameters (void) const |
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. | |
FogMode | getFogMode (void) const |
Returns the fog mode for the scene. | |
const ColourValue & | getFogColour (void) const |
Returns the fog colour for the scene. | |
Real | getFogStart (void) const |
Returns the fog start distance for the scene. | |
Real | getFogEnd (void) const |
Returns the fog end distance for the scene. | |
Real | getFogDensity (void) const |
Returns the fog density for the scene. | |
Billboard Sets | |
BillboardSet * | createBillboardSet (unsigned int poolSize=20) |
Creates a new BillboardSet for use with this scene manager. | |
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. | |
BillboardSet * | getBillboardSet (const String &name) const |
Retrieves a pointer to the named BillboardSet. | |
bool | hasBillboardSet (const String &name) const |
Returns whether a billboardset with the given name exists. | |
void | destroyBillboardSet (MovableObject *set) |
Removes & destroys an BillboardSet from the SceneManager. | |
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. | |
void | destroyAllBillboardSets (void) |
Removes & destroys all BillboardSets. | |
Scene Node Animation | |
void | _applySceneAnimations (void) |
Internal method for applying animations to scene nodes. | |
Animation * | createAnimation (const String &name, Real length) override |
Creates an animation which can be used to animate scene nodes. | |
Animation * | getAnimation (const String &name) const override |
Looks up an Animation object previously created with createAnimation. | |
bool | hasAnimation (const String &name) const override |
Returns whether this object contains the named animation. | |
uint16 | getNumAnimations (void) const override |
Gets the number of animations in this container. | |
Animation * | getAnimation (unsigned short index) const override |
Retrieve an animation by index. | |
void | removeAnimation (const String &name) override |
Remove & destroy an Animation from this container. | |
void | destroyAnimation (const String &name) |
void | destroyAllAnimations (void) |
Removes all animations created using this SceneManager. | |
AnimationState * | createAnimationState (const String &animName) |
Create an AnimationState object for managing application of animations. | |
AnimationState * | getAnimationState (const String &animName) const |
Retrieves animation state as previously created using createAnimationState. | |
bool | hasAnimationState (const String &name) const |
Returns whether an animation state with the given name exists. | |
void | destroyAnimationState (const String &name) |
Destroys an AnimationState. | |
void | destroyAllAnimationStates (void) |
Removes all animation states created using this SceneManager. | |
AnimationIterator | getAnimationIterator (void) |
Returns a specialised MapIterator over all animations in the scene. | |
const AnimationList & | getAnimations () const |
Returns a const version of the animation list. | |
AnimationStateIterator | getAnimationStateIterator (void) |
Returns a specialised MapIterator over all animation states in the scene. | |
const AnimationStateMap & | getAnimationStates () |
Returns a specialised Map over all animation states in the scene. | |
Scene Queries | |
virtual AxisAlignedBoxSceneQuery * | createAABBQuery (const AxisAlignedBox &box, uint32 mask=0xFFFFFFFF) |
Creates an AxisAlignedBoxSceneQuery for this scene manager. | |
virtual SphereSceneQuery * | createSphereQuery (const Sphere &sphere, uint32 mask=0xFFFFFFFF) |
Creates a SphereSceneQuery for this scene manager. | |
virtual PlaneBoundedVolumeListSceneQuery * | createPlaneBoundedVolumeQuery (const PlaneBoundedVolumeList &volumes, uint32 mask=0xFFFFFFFF) |
Creates a PlaneBoundedVolumeListSceneQuery for this scene manager. | |
virtual RaySceneQuery * | createRayQuery (const Ray &ray, uint32 mask=0xFFFFFFFF) |
Creates a RaySceneQuery for this scene manager. | |
virtual IntersectionSceneQuery * | createIntersectionQuery (uint32 mask=0xFFFFFFFF) |
Creates an IntersectionSceneQuery for this scene manager. | |
void | destroyQuery (SceneQuery *query) |
Destroys a scene query of any type. | |
Shadow Setup | |
void | setShadowTechnique (ShadowTechnique technique) |
Sets the general shadow technique to be used in this scene. | |
ShadowTechnique | getShadowTechnique (void) const |
Gets the current shadow technique. | |
void | setShowDebugShadows (bool debug) |
Enables / disables the rendering of debug information for shadows. | |
bool | getShowDebugShadows (void) const |
Are debug shadows shown? | |
void | setShadowColour (const ColourValue &colour) |
Set the colour used to modulate areas in shadow. | |
const ColourValue & | getShadowColour (void) const |
Get the colour used to modulate areas in shadow. | |
void | setShadowDirectionalLightExtrusionDistance (Real dist) |
Sets the distance a shadow volume is extruded for a directional light. | |
Real | getShadowDirectionalLightExtrusionDistance (void) const |
Gets the distance a shadow volume is extruded for a directional light. | |
void | setShadowFarDistance (Real distance) |
Sets the default maximum distance away from the camera that shadows will be visible. | |
Real | getShadowFarDistance (void) const |
Gets the default maximum distance away from the camera that shadows will be visible. | |
Real | getShadowFarDistanceSquared (void) const |
void | setShadowIndexBufferSize (size_t size) |
Sets the maximum size of the index buffer used to render shadow primitives. | |
size_t | getShadowIndexBufferSize (void) const |
Get the size of the shadow index buffer. | |
const ShadowCameraSetupPtr & | getShadowCameraSetup () const |
Get the shadow camera setup in use for all lights which don't have their own shadow camera setup. | |
void | setShadowUseInfiniteFarPlane (bool enable) |
Sets whether we should use an infinite camera far plane when rendering stencil shadows. | |
bool | isShadowTechniqueStencilBased (void) const |
Is there a stencil shadow based shadowing technique in use? | |
bool | isShadowTechniqueTextureBased (void) const |
Is there a texture shadow based shadowing technique in use? | |
bool | isShadowTechniqueModulative (void) const |
Is there a modulative shadowing technique in use? | |
bool | isShadowTechniqueAdditive (void) const |
Is there an additive shadowing technique in use? | |
bool | isShadowTechniqueIntegrated (void) const |
Is the shadow technique integrated into primary materials? | |
bool | isShadowTechniqueInUse (void) const |
Is there any shadowing technique in use? | |
void | setShadowUseLightClipPlanes (bool enabled) |
Sets whether when using a built-in additive shadow mode, user clip planes should be used to restrict light rendering. | |
bool | getShadowUseLightClipPlanes () const |
Gets whether when using a built-in additive shadow mode, user clip planes should be used to restrict light rendering. | |
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. | |
void | setShadowTextureSize (unsigned short size) |
Set the size of the texture used for all texture-based shadows. | |
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. | |
void | setShadowTextureConfig (size_t shadowIndex, const ShadowTextureConfig &config) |
Set the detailed configuration for a shadow texture. | |
const ShadowTextureConfigList & | getShadowTextureConfigList () const |
Get the current shadow texture settings. | |
ConstShadowTextureConfigIterator | getShadowTextureConfigIterator () const |
void | setShadowTexturePixelFormat (PixelFormat fmt) |
Set the pixel format of the textures used for texture-based shadows. | |
void | setShadowTextureFSAA (unsigned short fsaa) |
Set the level of multisample AA of the textures used for texture-based shadows. | |
void | setShadowTextureCount (size_t count) |
Set the number of textures allocated for texture-based shadows. | |
size_t | getShadowTextureCount (void) const |
void | setShadowTextureCountPerLightType (Light::LightTypes type, size_t count) |
Set the number of shadow textures a light type uses. | |
size_t | getShadowTextureCountPerLightType (Light::LightTypes type) const |
Get the number of shadow textures is assigned for the given light type. | |
void | setShadowTextureSettings (uint16 size, uint16 count, PixelFormat fmt=PF_BYTE_RGBA, uint16 fsaa=0, uint16 depthBufferPoolId=1) |
Sets the size and count of textures used in texture-based shadows. | |
const TexturePtr & | getShadowTexture (size_t shadowIndex) |
Get a reference to the shadow texture currently in use at the given index. | |
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. | |
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. | |
void | setShadowTextureFadeStart (Real fadeStart) |
Sets the proportional distance at which texture shadows begin to fade out. | |
void | setShadowTextureFadeEnd (Real fadeEnd) |
Sets the proportional distance at which texture shadows finish to fading out. | |
void | setShadowTextureSelfShadow (bool selfShadow) |
Sets whether or not texture shadows should attempt to self-shadow. | |
bool | getShadowTextureSelfShadow (void) const |
Gets whether or not texture shadows attempt to self-shadow. | |
void | setShadowTextureCasterMaterial (const MaterialPtr &mat) |
Sets the default material to use for rendering shadow casters. | |
void | setShadowTextureReceiverMaterial (const MaterialPtr &mat) |
Sets the default material to use for rendering shadow receivers. | |
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. | |
bool | getShadowCasterRenderBackFaces () const |
Gets whether or not shadow casters should be rendered into shadow textures using their back faces rather than their front faces. | |
void | setShadowCameraSetup (const ShadowCameraSetupPtr &shadowSetup) |
Set the shadow camera setup to use for all lights which don't have their own shadow camera setup. | |
Static Geometry | |
StaticGeometry * | createStaticGeometry (const String &name) |
Creates a StaticGeometry instance suitable for use with this SceneManager. | |
StaticGeometry * | getStaticGeometry (const String &name) const |
Retrieve a previously created StaticGeometry instance. | |
bool | hasStaticGeometry (const String &name) const |
Returns whether a static geometry instance with the given name exists. | |
const StaticGeometryMap * | getStaticGeometryCollection () const |
Returns all static geometry instances with names. | |
void | destroyStaticGeometry (StaticGeometry *geom) |
Remove & destroy a StaticGeometry instance. | |
void | destroyStaticGeometry (const String &name) |
Remove & destroy a StaticGeometry instance. | |
void | destroyAllStaticGeometry (void) |
Remove & destroy all StaticGeometry instances. | |
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. | |
InstanceManager * | getInstanceManager (const String &managerName) const |
Retrieves an existing InstanceManager by it's name. | |
bool | hasInstanceManager (const String &managerName) const |
Returns whether an InstanceManager with the given name exists. | |
void | destroyInstanceManager (const String &name) |
Destroys an InstanceManager if it was created with createInstanceManager() | |
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. | |
void | destroyInstancedEntity (InstancedEntity *instancedEntity) |
Removes an InstancedEntity,. | |
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. | |
Movable Objects | |
MovableObject * | createMovableObject (const String &name, const String &typeName, const NameValuePairList *params=0) |
Create a movable object of the type specified. | |
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. | |
void | destroyMovableObject (const String &name, const String &typeName) |
Destroys a MovableObject with the name specified, of the type specified. | |
void | destroyMovableObject (MovableObject *m) |
Destroys a MovableObject. | |
void | destroyAllMovableObjectsByType (const String &typeName) |
Destroy all MovableObjects of a given type. | |
void | destroyAllMovableObjects (void) |
Destroy all MovableObjects. | |
MovableObject * | getMovableObject (const String &name, const String &typeName) const |
Get a reference to a previously created object instance. | |
bool | hasMovableObject (const String &name, const String &typeName) const |
Returns whether a object instance with the given name exists. | |
const MovableObjectMap & | getMovableObjects (const String &typeName) |
Get all MovableObect instances of a given type. | |
MovableObjectIterator | getMovableObjectIterator (const String &typeName) |
void | injectMovableObject (MovableObject *m) |
Inject a MovableObject instance created externally. | |
void | extractMovableObject (const String &name, const String &typeName) |
Extract a previously injected MovableObject. | |
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. | |
void | extractAllMovableObjectsByType (const String &typeName) |
Extract all injected MovableObjects of a given type. | |
Public Member Functions inherited from Ogre::AnimationContainer | |
virtual | ~AnimationContainer () |
Static Public Member Functions | |
static bool | hasPerRenderableLights () |
static void | usePerRenderableLights (bool enabled) |
Toggle sorting of lights for each renderable. | |
Static Public Attributes | |
static constexpr const char * | PT_CUBE = "Prefab_Cube" |
100x100x100 cube centred at origin with normals and UVs | |
static constexpr const char * | PT_PLANE = "Prefab_Plane" |
XY plane with -100..100 extent, +Z normal and UVs. | |
static constexpr const char * | PT_SPHERE = "Prefab_Sphere" |
Sphere with radius 50, around origin with normals UVs | |
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, StaticGeometry* > Ogre::SceneManager::StaticGeometryMap |
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. |
|
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 |
Toggle sorting of lights for each renderable.
By default, lights are sorted for each renderable based on their distance. This allows having more than 8 lights affecting the scene. However, the sorting is expensive and prevents the use of more efficient algorithms.
Disabling this option will make the lights be sorted only once per frame. Also disables per-renderable light masks.
Ogre::SceneManager::OGRE_MUTEX | ( | sceneGraphMutex | ) |
Mutex to protect the scene graph from simultaneous access from multiple threads.
If you are updating the scene in a separate thread from the rendering thread, then you should lock this mutex before making any changes to the scene graph - that means creating, modifying or deleting a scene node, or attaching / detaching objects. It is your responsibility to take out this lock, the detail methods on the nodes will not do it for you (for the reasons discussed below).
Return the instance name of this SceneManager.
Retrieve the type name of this scene manager.
This method has to be implemented by subclasses. It should return the type name of this SceneManager which agrees with the type name of the SceneManagerFactory which created it.
Implemented in Ogre::BspSceneManager, Ogre::OctreeSceneManager, and Ogre::PCZSceneManager.
Creates a camera to be managed by this scene manager.
This camera must be added to the scene at a later time using the attachObject method of the SceneNode class.
name | Name to give the new camera. |
Reimplemented in Ogre::OctreeSceneManager, and Ogre::PCZSceneManager.
Retrieves a pointer to the named camera.
Returns whether a camera with the given name exists.
Removes a camera from the scene.
This method removes a previously added camera from the scene. The camera is deleted so the caller must ensure no references to it's previous instance (e.g. in a SceneNode) are used.
cam | Pointer to the camera to remove |
Removes a camera from the scene.
This method removes an camera from the scene based on the camera's name rather than a pointer.
Removes (and destroys) all cameras from the scene.
Some cameras are internal created to dealing with texture shadow, their aren't supposed to destroy outside. So, while you are using texture shadow, don't call this method, or you can set the shadow technique other than texture-based, which will destroy all internal created shadow cameras and textures.
Set whether to use camera-relative coordinates when rendering, ie to always place the camera at the origin and move the world around it.
This is a technique to alleviate some of the precision issues associated with rendering far from the origin, where single-precision floats as used in most GPUs begin to lose their precision. Instead of including the camera translation in the view matrix, it only includes the rotation, and the world matrices of objects must be expressed relative to this.
|
inline |
Get whether to use camera-relative coordinates 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.
Lights can either be in a fixed position and independent of the scene graph, or they can be attached to SceneNodes so they derive their position from the parent node. Either way, they are created using this method so that the SceneManager manages their existence.
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.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Get a reference to a previously created object instance.
Reimplemented in Ogre::PCZSceneManager.
Returns whether a object instance with the given name exists.
Reimplemented in Ogre::PCZSceneManager.
References Ogre::MOT_LIGHT.
Retrieve a set of clipping planes for a given light.
Retrieve a scissor rectangle for a given light and camera.
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.
Removes the light from the scene and destroys it.
Any pointers held to this light after calling this method will be invalid.
Reimplemented in Ogre::PCZSceneManager.
References Ogre::MOT_LIGHT.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Removes and destroys all lights in the scene.
Reimplemented in Ogre::PCZSceneManager.
References Ogre::MOT_LIGHT.
Advanced method to increase the lights dirty counter due to lights having changed.
The SceneManager tracks the list of lights affecting the current frustum, and if changes are detected (including changes to the light list itself or to a light's position or attenuation range) then it increases the lights dirty counter.
Advanced method to gets the lights dirty counter.
The SceneManager tracks the list of lights affecting the current frustum, and if changes are detected (including changes to the light list itself or to a light's position or attenuation range) then it increases the lights dirty counter.
Get the list of lights which could be affecting the frustum.
This returns a cached light list which is populated when rendering the scene.
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.
The returned lights are those in the cached list of lights (i.e. those returned by SceneManager::_getLightsAffectingFrustum) sorted by distance.
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 |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Creates an instance of a SceneNode.
This method is for convenience, since it allows an instance to be created for which the SceneManager is responsible for allocating and releasing memory, which is convenient in complex scenes.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Destroys a SceneNode.
This allows you to physically delete an individual SceneNode if you want to. Note that this is not normally recommended, it's better to allow SceneManager to delete the nodes when the scene is cleared.
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::OctreeSceneManager, and Ogre::PCZSceneManager.
Gets the SceneNode at the root of the scene hierarchy.
The entire scene is held as a hierarchy of nodes, which allows things like relative transforms, general changes in rendering state etc (See the SceneNode class for more info). In this basic SceneManager class, the application using Ogre is free to structure this hierarchy however it likes, since it has no real significance apart from making transforms relative to each node (more specialised subclasses will provide utility methods for building specific node structures e.g. loading a BSP tree).
Returns whether a scene node with the given name exists.
Tells the SceneManager whether it should render the SceneNodes which make up the scene as well as the objects in the scene.
This method is mainly for debugging purposes. If you set this to 'true', each node will be rendered as a set of 3 axes to allow you to easily see the orientation of the nodes.
Returns true if all scene nodes axis are to be displayed.
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 |
Get a reference to a previously created object instance.
Returns whether a object instance with the given name exists.
References Ogre::MOT_ENTITY.
|
inline |
Removes & destroys an Entity from the SceneManager.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References Ogre::MOT_ENTITY.
Removes & destroys all Entities.
References Ogre::MOT_ENTITY.
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 |
Get a reference to a previously created object instance.
Returns whether a object instance with the given name exists.
References Ogre::MOT_MANUAL_OBJECT.
|
inline |
Removes & destroys a ManualObject from the SceneManager.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References Ogre::MOT_MANUAL_OBJECT.
Removes & destroys all ManualObjects from the SceneManager.
References Ogre::MOT_MANUAL_OBJECT.
Rectangle2D * Ogre::SceneManager::createScreenSpaceRect | ( | const String & | name, |
bool | includeTextureCoords = false |
||
) |
Creates a Rectangle2D that can be displayed for screen space effects or showing a basic GUI.
name | The name to be given to the object (must be unique). |
includeTextureCoords | whether to create texture coordinates |
Rectangle2D * Ogre::SceneManager::createScreenSpaceRect | ( | bool | includeTextureCoords = false | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns whether a object instance with the given name exists.
References Ogre::MOT_RECTANGLE2D.
Rectangle2D * Ogre::SceneManager::getScreenSpaceRect | ( | const String & | name | ) | const |
Get a reference to a previously created object instance.
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 |
Get a reference to a previously created object instance.
Returns whether a object instance with the given name exists.
References Ogre::MOT_BILLBOARD_CHAIN.
|
inline |
Removes & destroys a BillboardChain from the SceneManager.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References Ogre::MOT_BILLBOARD_CHAIN.
Removes & destroys all BillboardChains from the SceneManager.
References Ogre::MOT_BILLBOARD_CHAIN.
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 |
Get a reference to a previously created object instance.
Returns whether a object instance with the given name exists.
References Ogre::MOT_RIBBON_TRAIL.
|
inline |
Removes & destroys a RibbonTrail from the SceneManager.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References Ogre::MOT_RIBBON_TRAIL.
Removes & destroys all RibbonTrails from the SceneManager.
References Ogre::MOT_RIBBON_TRAIL.
ParticleSystem * Ogre::SceneManager::createParticleSystem | ( | const String & | name, |
const String & | templateName | ||
) |
Creates a particle system based on a template.
This method creates a new ParticleSystem instance based on the named template (defined through ParticleSystemManager::createTemplate) and returns a pointer to the caller. The caller should not delete this object, it will be freed at system shutdown, or can be released earlier using the destroyParticleSystem method.
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.
This method creates a new, blank ParticleSystem instance and returns a pointer to it. The caller should not delete this object, it will be freed at system shutdown, or can be released earlier using the destroyParticleSystem method.
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 |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
ParticleSystem * Ogre::SceneManager::getParticleSystem | ( | const String & | name | ) | const |
Get a reference to a previously created object instance.
Returns whether a object instance with the given name exists.
References Ogre::MOT_PARTICLE_SYSTEM.
|
inline |
Removes & destroys a ParticleSystem from the SceneManager.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References Ogre::MOT_PARTICLE_SYSTEM.
Removes & destroys all ParticleSystems from the SceneManager.
References Ogre::MOT_PARTICLE_SYSTEM.
Empties the entire scene, including 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.
This sets the colour and intensity of the ambient light in the scene, i.e. the light which is 'sourceless' and illuminates all objects equally. The colour of an object is affected by a combination of the light in the scene, and the amount of light that object reflects (in this case based on the Material::ambient property).
By default the ambient light in the scene is ColourValue::Black, i.e. no ambient light. This means that any objects rendered with a Material which has lighting enabled (see Material::setLightingEnabled) will not be visible unless you have some dynamic lights in your scene.
const ColourValue & Ogre::SceneManager::getAmbientLight | ( | void | ) | const |
Returns the ambient light level to be used for the scene.
Sets the source of the 'world' geometry, i.e.
the large, mainly static geometry making up the world e.g. rooms, landscape etc.
Depending on the type of SceneManager (subclasses will be specialised for particular world geometry types) you have requested via the Root or SceneManagerEnumerator classes, you can pass a filename to this method and it will attempt to load the world-level geometry for use. If you try to load an inappropriate type of world data an exception will be thrown. The default SceneManager cannot handle any sort of world geometry and so will always throw an exception. However subclasses like BspSceneManager can load particular types of world geometry e.g. "q3dm1.bsp".
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.
Estimate the number of loading stages required to load the named world geometry.
This method should be overridden by SceneManagers that provide custom world geometry that can take some time to load. They should return from this method a count of the number of stages of progress they can report on whilst loading. During real loading (setWorldGeometry), they should call ResourceGroupManager::_notifyCustomStage* exactly that number of times when loading the geometry for real.
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.
Asks the SceneManager to provide a suggested viewpoint from which the scene should be viewed.
Typically this method returns the origin unless a) world geometry has been loaded using SceneManager::setWorldGeometry and b) that world geometry has suggested 'start' points. If there is more than one viewpoint which the scene manager can suggest, it will always suggest the first one unless the random parameter is true.
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 implementation 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::OctreeSceneManager, and Ogre::PCZSceneManager.
|
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::OctreeSceneManager, and Ogre::PCZSceneManager.
Method for verifying whether the scene manager has an implementation-specific option.
strKey | The name of the option to check for. |
If it does not, false is returned.
|
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::OctreeSceneManager, and Ogre::PCZSceneManager.
|
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::OctreeSceneManager, and Ogre::PCZSceneManager.
Internal method for updating the scene graph ie the tree of SceneNode instances managed by this class.
This must be done before issuing objects to the rendering pipeline, since derived transformations from parent nodes are not updated until required. This SceneManager is a basic implementation which simply updates all nodes from the root. This ensures the scene is up to date but requires all the nodes to be updated even if they are not visible. Subclasses could trim this such that only potentially visible nodes are updated.
Reimplemented in Ogre::OctreeSceneManager, and Ogre::PCZSceneManager.
|
virtual |
Internal method which parses the scene to find visible objects to render.
If you're implementing a custom scene manager, this is the most important method to override since it's here you can apply your custom world partitioning scheme. Once you have added the appropriate objects to the render queue, you can let the default SceneManager objects _renderVisibleObjects handle the actual rendering of the objects you pick.
Reimplemented in Ogre::BspSceneManager, Ogre::OctreeSceneManager, and Ogre::PCZSceneManager.
void Ogre::SceneManager::_issueRenderOp | ( | Renderable * | rend, |
const Pass * | pass | ||
) |
Internal method for issuing the render operation.
Sends visible objects found in _findVisibleObjects to the rendering engine.
|
virtual |
Prompts the class to send its contents to the renderer.
This method prompts the scene manager to send the contents of the scene it manages to the rendering pipeline, possibly preceded by some sorting, culling or other scene management tasks. Note that this method is not normally called directly by the user application; it is called automatically by the Ogre rendering loop.
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.
Called automatically by RenderSystem::addSceneManager this method simply notifies the manager of the render system to which its output must be directed.
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.
Called automatically by RenderSystem if hardware resources were lost and can not be restored using some internal mechanism. Among affected resources are manual meshes without loaders, manual textures without loaders, ManualObjects, etc.
void Ogre::SceneManager::_restoreManualHardwareResources | ( | ) |
Notifies the scene manager that hardware resources should be restored.
Called automatically by RenderSystem if hardware resources were lost and can not be restored using some internal mechanism. Among affected resources are manual meshes without loaders, manual textures without loaders, ManualObjects, etc.
Return whether a sky is enabled.
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.
You can create sky planes yourself using the standard mesh and entity methods, but this creates a plane which the camera can never get closer or further away from - it moves with the camera. (NB you could create this effect by creating a world plane which was attached to the same SceneNode as the Camera too, but this would only apply to a single camera whereas this plane applies to any camera using this scene manager).
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 |
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.
You could create a sky box yourself using the standard mesh and entity methods, but this creates a plane which the camera can never get closer or further away from - it moves with the camera. (NB you could create this effect by creating a world box which was attached to the same SceneNode as the Camera too, but this would only apply to a single camera whereas this skybox applies to any camera using this scene manager).
enable | True to enable the skybox, false to disable it |
materialName | The name of the material the box will use |
distance | Distance in world coordinates 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 |
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.
A sky dome is actually formed by 5 sides of a cube, but with texture coordinates generated such that the surface appears curved like a dome. Sky domes are appropriate where you need a realistic looking sky where the scene is not going to be 'fogged', and there is always a 'floor' of some sort to prevent the viewer looking below the horizon (the distortion effect below the horizon can be pretty horrible, and there is never anything directly below the viewer). If you need a complete wrap-around background, use the setSkyBox method instead. You can actually combine a sky box and a sky dome if you want, to give a positional backdrop with an overlaid curved cloud layer.
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 coordinates 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 |
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.
This method sets up the scene-wide fogging effect. These settings apply to all geometry rendered, UNLESS the material with which it is rendered has it's own fog settings (see Material::setFog).
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. |
const ColourValue & Ogre::SceneManager::getFogColour | ( | void | ) | const |
Returns the fog colour 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.
Returns whether a billboardset with the given name exists.
References Ogre::MOT_BILLBOARD_SET.
|
inline |
Removes & destroys an BillboardSet from the SceneManager.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References Ogre::MOT_BILLBOARD_SET.
Removes & destroys all BillboardSets.
References Ogre::MOT_BILLBOARD_SET.
Internal method for applying animations to scene nodes.
Uses the internally stored AnimationState objects to apply animation to SceneNodes.
|
overridevirtual |
Creates an animation which can be used to animate scene nodes.
An animation is a collection of 'tracks' which over time change the position / orientation of Node objects. In this case, the animation will likely have tracks to modify the position / orientation of SceneNode objects, e.g. to make objects move along a path.
name | The name of the animation, must be unique within this container. |
length | The length of the animation in seconds |
Implements Ogre::AnimationContainer.
Looks up an Animation object previously created with createAnimation.
name | The name of the animation. |
Implements Ogre::AnimationContainer.
Returns whether this object contains the named animation.
Implements Ogre::AnimationContainer.
Gets the number of animations in this container.
Implements Ogre::AnimationContainer.
Remove & destroy an Animation from this container.
Implements Ogre::AnimationContainer.
Removes all animations created using this SceneManager.
AnimationState * Ogre::SceneManager::createAnimationState | ( | const String & | animName | ) |
Create an AnimationState object for managing application of animations.
You can create Animation objects for animating SceneNode obejcts using the createAnimation method. However, in order to actually apply those animations you have to call methods on Node and Animation in a particular order (namely Node::resetToInitialState and Animation::apply). To make this easier and to help track the current time position of animations, the AnimationState object is provided. So if you don't want to control animation application manually, call this method, update the returned object as you like every frame and let SceneManager apply the animation state for you.
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.
Returns whether an animation state with the given name exists.
Destroys an AnimationState.
You should ensure that none of your code is referencing this animation state object since the memory will be freed.
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.
|
inline |
Returns a specialised Map over all animation states in the scene.
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.
This method allows you to send rendering commands through the pipeline on demand, bypassing OGRE's normal world processing. You should only use this if you really know what you're doing; OGRE does lots of things for you that you really should let it do. However, there are times where it may be useful to have this manual interface, for example overlaying something on top of the scene rendered by OGRE.
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.
The render queue is mainly used internally to manage the scene object rendering queue, it also exports some methods to allow advanced users to configure the behavior of rendering process. Most methods provided by RenderQueue are supposed to be used internally only, you should reference to the RenderQueue API for more information. Do not access this directly unless you know what you are doing.
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.
Adds an item to the 'special case' render queue list.
Normally all render queues are rendered, in their usual sequence, only varying if a RenderQueueListener nominates for the queue to be repeated or skipped. This method allows you to add a render queue to a 'special case' list, which varies the behaviour. The effect of this list depends on the 'mode' in which this list is in, which might be to exclude these render queues, or to include them alone (excluding all other queues). This allows you to perform broad selective rendering without requiring a RenderQueueListener.
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. |
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. |
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.
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 |
Sets the render queue that the world geometry (if any) this SceneManager renders will be associated with.
SceneManagers which provide 'world geometry' should place it in a specialised render queue in order to make it possible to enable / disable it easily using the addSpecialCaseRenderQueue method. Even if the SceneManager does not use the render queues to render the world geometry, it should still pick a queue to represent it's manual rendering, and check isRenderQueueToBeProcessed before rendering.
|
inline |
Gets the render queue that the world geometry (if any) this SceneManager renders will be associated with.
SceneManagers which provide 'world geometry' should place it in a specialised render queue in order to make it possible to enable / disable it easily using the addSpecialCaseRenderQueue method. Even if the SceneManager does not use the render queues to render the world geometry, it should still pick a queue to represent it's manual rendering, and check isRenderQueueToBeProcessed before rendering.
Internal method for notifying the manager that a SceneNode is autotracking.
|
virtual |
Creates an AxisAlignedBoxSceneQuery for this scene manager.
This method creates a new instance of a query object for this scene manager, for an axis aligned box region. See SceneQuery and AxisAlignedBoxSceneQuery for full details.
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::OctreeSceneManager, and Ogre::PCZSceneManager.
|
virtual |
Creates a SphereSceneQuery for this scene manager.
This method creates a new instance of a query object for this scene manager, for a spherical region. See SceneQuery and SphereSceneQuery for full details.
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::OctreeSceneManager, and Ogre::PCZSceneManager.
|
virtual |
Creates a PlaneBoundedVolumeListSceneQuery for this scene manager.
This method creates a new instance of a query object for this scene manager, for a region enclosed by a set of planes (normals pointing inwards). See SceneQuery and PlaneBoundedVolumeListSceneQuery for full details.
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::OctreeSceneManager, and Ogre::PCZSceneManager.
|
virtual |
Creates a RaySceneQuery for this scene manager.
This method creates a new instance of a query object for this scene manager, looking for objects which fall along a ray. See SceneQuery and RaySceneQuery for full details.
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::OctreeSceneManager, Ogre::BspSceneManager, and Ogre::PCZSceneManager.
|
virtual |
Creates an IntersectionSceneQuery for this scene manager.
This method creates a new instance of a query object for locating intersecting objects. See SceneQuery and IntersectionSceneQuery for full details.
mask | The query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details. |
Reimplemented in Ogre::OctreeSceneManager, Ogre::BspSceneManager, and Ogre::PCZSceneManager.
void Ogre::SceneManager::destroyQuery | ( | SceneQuery * | query | ) |
Destroys a scene query of any type.
void Ogre::SceneManager::setShadowTechnique | ( | ShadowTechnique | technique | ) |
Sets the general shadow technique to be used in this scene.
There are multiple ways to generate shadows in a scene, and each has strengths and weaknesses.
technique | The shadowing technique to use for the scene. |
|
inline |
Gets the current shadow technique.
Enables / disables the rendering of debug information for shadows.
|
inline |
Set the colour used to modulate areas in shadow.
This is only applicable for shadow techniques which involve darkening the area in shadow, as opposed to masking out the light. This colour provided is used as a modulative value to darken the areas.
const ColourValue & Ogre::SceneManager::getShadowColour | ( | void | ) | const |
Get the colour used to modulate areas in shadow.
This is only applicable for shadow techniques which involve darkening the area in shadow, as opposed to masking out the light. This colour provided is used as a modulative value to darken the areas.
Sets the distance a shadow volume is extruded for a directional light.
Although directional lights are essentially infinite, there are many reasons to limit the shadow extrusion distance to a finite number, not least of which is compatibility with older cards (which do not support infinite positions), and shadow caster elimination.
Gets the distance a shadow volume is extruded for a directional light.
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.
Shadow techniques can be expensive, therefore it is a good idea to limit them to being rendered close to the camera if possible, and to skip the expense of rendering shadows for distance objects. This method allows you to set the distance at which shadows will no longer be rendered.
Gets the default maximum distance away from the camera that shadows will be visible.
Sets the maximum size of the index buffer used to render shadow primitives.
This method allows you to tweak the size of the index buffer used to render shadow primitives (including stencil shadow volumes). The default size is 51,200 entries, which is 100k of GPU memory, or enough to render approximately 17,000 triangles. You can reduce this as long as you do not have any models / world geometry chunks which could require more than the amount you set.
size | The number of indexes; divide this by 3 to determine the number of triangles. |
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.
Sets whether we should use an infinite camera far plane when rendering stencil shadows.
Stencil shadow coherency is very reliant on the shadow volume not being clipped by the far plane. If this clipping happens, you get a kind of 'negative' shadow effect. The best way to achieve coherency is to move the far plane of the camera out to infinity, thus preventing the far plane from clipping the shadow volumes. When combined with vertex program extrusion of the volume to infinity, which Ogre does when available, this results in very robust shadow volumes. For this reason, when you enable stencil shadows, Ogre automatically changes your camera settings to project to infinity if the card supports it. You can disable this behaviour if you like by calling this method; although you can never enable infinite projection if the card does not support it.
Is there a stencil shadow based shadowing technique in use?
References Ogre::SHADOWDETAILTYPE_STENCIL.
Is there a texture shadow based shadowing technique in use?
References Ogre::SHADOWDETAILTYPE_TEXTURE.
Is there a modulative shadowing technique in use?
References Ogre::SHADOWDETAILTYPE_MODULATIVE.
Is there an additive shadowing technique in use?
References Ogre::SHADOWDETAILTYPE_ADDITIVE.
Is the shadow technique integrated into primary materials?
References Ogre::SHADOWDETAILTYPE_INTEGRATED.
Is there any shadowing technique in use?
References Ogre::SHADOWTYPE_NONE.
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.
Set the size of the texture used for all texture-based shadows.
The larger the shadow texture, the better the detail on texture based shadows, but obviously this takes more memory. The default size is 512. Sizes must be a power of 2.
|
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.
By default, a colour texture is used (PF_X8R8G8B8) for texture shadows, but if you want to use more advanced texture shadow types you can alter this. If you do, you will have to also call setShadowTextureCasterMaterial and setShadowTextureReceiverMaterial to provide shader-based materials to use these customised shadow texture formats.
Set the level of multisample AA of the textures used for texture-based shadows.
By default, the level of multisample AA is zero.
Set the number of textures allocated for texture-based shadows.
The default number of textures assigned to deal with texture based shadows is 1; however this means you can only have one light casting shadows at the same time. You can increase this number in order to make this more flexible, but be aware of the texture memory it will use.
|
inline |
Set the number of shadow textures a light type uses.
The default for all light types is 1. This means that each light uses only 1 shadow texture. Call this if you need more than 1 shadow texture per light, E.G. PSSM.
|
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.
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.
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.
Sets the proportional distance at which texture shadows begin to fade out.
To hide the edges where texture shadows end (in directional lights) Ogre will fade out the shadow in the distance. This value is a proportional distance of the entire shadow visibility distance at which the shadow begins to fade out. The default is 0.7
Sets the proportional distance at which texture shadows finish to fading out.
To hide the edges where texture shadows end (in directional lights) Ogre will fade out the shadow in the distance. This value is a proportional distance of the entire shadow visibility distance at which the shadow is completely invisible. The default is 0.9.
Sets whether or not texture shadows should attempt to self-shadow.
The default implementation of texture shadows uses a fixed-function colour texture projection approach for maximum compatibility, and as such cannot support self-shadowing. However, if you decide to implement a more complex shadowing technique using the setShadowTextureCasterMaterial and setShadowTextureReceiverMaterial there is a possibility you may be able to support self-shadowing (e.g by implementing a shader-based shadow map). In this case you might want to enable this option.
selfShadow | Whether to attempt self-shadowing with texture shadows |
Gets whether or not texture shadows attempt to self-shadow.
|
inline |
Sets the default material to use for rendering shadow casters.
By default shadow casters are rendered into the shadow texture using an automatically generated fixed-function pass. This allows basic projective texture shadows, but it's possible to use more advanced shadow techniques by overriding the caster and receiver materials, for example providing vertex and fragment programs to implement shadow maps.
|
inline |
Sets the default material to use for rendering shadow receivers.
By default shadow receivers are rendered as a post-pass using basic modulation. This allows basic projective texture shadows, but it's possible to use more advanced shadow techniques by overriding the caster and receiver materials, for example providing vertex and fragment programs to implement shadow maps.
Sets whether or not shadow casters should be rendered into shadow textures using their back faces rather than their front faces.
Rendering back faces rather than front faces into a shadow texture can help minimise depth comparison issues, if you're using depth shadowmapping. You will probably still need some biasing but you won't need as much. For solid objects the result is the same anyway, if you have objects with holes you may want to turn this option off. The default is to enable this option.
|
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.
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.
Add a listener which will get called back on scene manager events.
void Ogre::SceneManager::addShadowTextureListener | ( | ShadowTextureListener * | s | ) |
Add a listener which will get called back on shadow texture events.
void Ogre::SceneManager::removeShadowTextureListener | ( | ShadowTextureListener * | s | ) |
Remove a listener.
StaticGeometry * Ogre::SceneManager::createStaticGeometry | ( | const String & | name | ) |
Creates a StaticGeometry instance suitable for use with this SceneManager.
StaticGeometry is a way of batching up geometry into a more efficient form at the expense of being able to move it. Please read the StaticGeometry class documentation for full information.
name | The name to give the new object |
StaticGeometry * Ogre::SceneManager::getStaticGeometry | ( | const String & | name | ) | const |
Retrieve a previously created StaticGeometry instance.
Returns whether a static geometry instance with the given name exists.
const StaticGeometryMap * Ogre::SceneManager::getStaticGeometryCollection | ( | ) | const |
Returns all static geometry instances with names.
void Ogre::SceneManager::destroyStaticGeometry | ( | StaticGeometry * | geom | ) |
Remove & destroy a StaticGeometry instance.
Remove & destroy a StaticGeometry instance.
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.
Instancing is a way of batching up geometry into a much more efficient form, but with some limitations, and still be able to move & animate it. Please see InstanceManager class documentation for full information.
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.
Returns whether an InstanceManager with the given name exists.
Destroys an InstanceManager if it was created with createInstanceManager()
Be sure you don't have any InstancedEntity referenced somewhere which was created with this manager, since it will become a dangling pointer.
name | Name of the manager to remove |
void Ogre::SceneManager::destroyInstanceManager | ( | InstanceManager * | instanceManager | ) |
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 |
||
) |
If you've already created an InstanceManager, you can call it's getMaxOrBestNumInstancesPerBatch() function directly. Another (not recommended) way to know if the technique is unsupported is by creating an InstanceManager and use createInstancedEntity, which will return null pointer. The input parameter "numInstancesPerBatch" is a suggested value when using IM_VTFBESTFIT flag (in that case it should be non-zero)
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.
This is the generalised form of MovableObject creation where you can create a MovableObject of any specialised type generically, including any new types registered using plugins.
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.
The MovableObject will automatically detach itself from any nodes on destruction.
void Ogre::SceneManager::destroyMovableObject | ( | MovableObject * | m | ) |
Destroys a MovableObject.
The MovableObject will automatically detach itself from any nodes on destruction.
Destroy all MovableObjects of a given type.
MovableObject * Ogre::SceneManager::getMovableObject | ( | const String & | name, |
const String & | typeName | ||
) | const |
Get a reference to a previously created object instance.
Returns whether a 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.
This method 'injects' a MovableObject instance created externally into the MovableObject instance registry held in the SceneManager. You might want to use this if you have a MovableObject which you don't want to register a factory for; for example a MovableObject which cannot be generally constructed by clients.
Extract a previously injected MovableObject.
Essentially this does the same as destroyMovableObject, but only removes the instance from the internal lists, it does not attempt to destroy it.
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.
Extract all injected MovableObjects of a given type.
Essentially this does the same as destroyAllMovableObjectsByType, but only removes the instances from the internal lists, it does not attempt to destroy them.
Sets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible.
Note that this is combined with any per-viewport visibility mask through an 'and' operation.
Gets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is visible.
Internal method for getting the combination between the global visibility mask and the per-viewport visibility mask.
Sets whether the SceneManager should search for visible objects, or whether they are being manually handled.
This is an advanced function, you should not use this unless you know what you are doing.
Gets whether the SceneManager should search for visible objects, or whether they are being manually handled.
Set whether to automatically flip the culling mode on objects whenever they are negatively scaled.
Negativelyl scaling an object has the effect of flipping the triangles, so the culling mode should probably be inverted to deal with this. If you would prefer to manually manage this, set this option to 'false' and use different materials with Pass::setCullingMode set manually as needed.
|
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 |
Internal method for setting up the renderstate for a rendering pass.
pass | The Pass details to set. |
shadowDerivation | If false, disables the derivation of shadow passes from original passes |
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.
You can use this method to insert your own implementation of the QueuedRenderableVisitor interface, which receives calls as the queued renderables are parsed in a given order and are sent to the renderer. If you provide your own implementation of this visitor, you are responsible for either calling the rendersystem, or passing the calls on to the base class implementation.
visitor | Your implementation of SceneMgrQueuedRenderableVisitor. If you pass 0, the default implementation will be used. |
|
inline |
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.
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.
Do not call from inside an LodListener callback method.
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 |
XY plane with -100..100 extent, +Z normal and UVs.
100x100x100 cube centred at origin with normals and UVs
Sphere with radius 50, around origin with normals UVs