Go to the documentation of this file.
30 #ifndef __SceneManager_H__
31 #define __SceneManager_H__
104 const Camera* cam,
bool receiver=
true);
180 IRS_RENDER_RECEIVER_PASS
235 { (void)source; (void)camera; }
244 { (void)source; (void)camera; }
257 { (void)source; (void)irs; (void)v; }
271 { (void)source; (void)irs; (void)v; }
288 { (void)numberOfShadowTextures; }
304 Camera* camera,
size_t iteration)
305 { (void)light; (void)camera; (void)iteration; }
322 { (void)light; (void)frustum; }
347 { (void)lightList;
return false; }
364 :transparentShadowCastersMode(false) {}
505 size_t mShadowTextureCountPerType[3];
521 return light == rhs.
light && type == rhs.
type &&
527 return !(*
this == rhs);
631 int xsegments,
int ysegments,
int ySegmentsToKeep,
669 const LightList* pLightList,
bool suppressRenderStateChanges);
717 bool lightScissoringClipping,
bool doLightIteration,
const LightList* manualLightList = 0);
849 Pass* pass,
const LightList *manualLightList,
unsigned long flags,
850 bool secondpass,
bool zfail,
bool twosided);
898 mCasterList(0), mIsLightInFrustum(false), mLightClipVolumeList(0),
906 mCasterList = casterList;
907 mIsLightInFrustum = lightInFrustum;
908 mLightClipVolumeList = lightClipVolumes;
911 mFarDistSquared = farDistSquared;
952 bool doLightIteration,
const LightList* manualLightList = 0);
960 bool doLightIteration,
const LightList* manualLightList = 0);
968 bool suppressShadows,
bool suppressRenderState);
1531 const String& templateName);
1699 { (void)filename;
return 0; }
1715 { (void)stream; (void)typeName;
return 0; }
1747 { (void)strKey; (void)pValue;
return false; }
1763 { (void)strKey; (void)pDestValue;
return false; }
1775 { (void)strKey;
return false; }
1792 { (void)strKey; (void)refValueList;
return false; }
1801 { (void)refKeys;
return false; }
1924 Real tiling = 10,
bool drawFirst =
true,
Real bow = 0,
1925 int xsegments = 1,
int ysegments = 1,
1974 int xsegments = 1,
int ysegments = 1,
2031 bool enable,
const String& materialName,
Real distance = 5000,
2068 bool enable,
const String& materialName,
Real distance = 5000,
2140 bool enable,
const String& materialName,
Real curvature = 10,
2141 Real tiling = 8,
Real distance = 4000,
bool drawFirst =
true,
2143 int xsegments = 16,
int ysegments = 16,
int ysegments_keep = -1,
2193 bool enable,
const String& materialName,
Real curvature = 10,
2196 int xsegments = 16,
int ysegments = 16,
int ysegments_keep = -1,
2237 Real expDensity = 0.001,
Real linearStart = 0.0,
Real linearEnd = 1.0);
2444 bool doBeginEndFrame =
false) ;
2466 const Matrix4& viewMatrix,
const Matrix4& projMatrix,
bool doBeginEndFrame =
false,
bool lightScissoringClipping =
true,
2467 bool doLightIteration =
true,
const LightList* manualLightList = 0);
2763 {
return mDefaultShadowFarDist; }
2765 {
return mDefaultShadowFarDistSquared; }
2795 {
return mShadowIndexBufferSize; }
2816 unsigned short height,
PixelFormat format,
unsigned short fsaa = 0,
uint16 depthBufferPoolId=1);
2869 { mShadowTextureCountPerType[type] = count; }
2872 {
return mShadowTextureCountPerType[type]; }
2919 { mShadowTextureFadeStart = fadeStart; }
2928 { mShadowTextureFadeEnd = fadeEnd; }
2946 {
return mShadowTextureSelfShadow; }
3057 mShadowUseInfiniteFarPlane = enable; }
3175 size_t numInstancesPerBatch,
uint16 flags=0,
3176 unsigned short subMeshIdx=0 );
3210 const String &materialName,
3212 size_t numInstancesPerBatch,
uint16 flags=0,
3213 unsigned short subMeshIdx=0 );
3227 const String &managerName );
3393 bool doLightIteration =
false,
const LightList* manualLightList = 0);
3419 {
return mSuppressRenderStateChanges; }
3434 bool evenIfSuppressed =
false,
bool shadowDerivation =
true);
3461 {
return mSuppressShadows; }
3653 mMetaDataInit =
false;
void execute(SceneQueryListener *listener)
See RayScenQuery.
MapIterator< MovableObjectMap > MovableObjectIterator
Comparator for material map, for sorting materials into render order (e.g.
ShadowCasterSceneQueryListener * mShadowCasterQueryListener
virtual Light * createLight()
Creates a light with a generated name.
Inner class to use as callback for shadow caster scene query.
RenderSystem * mDestRenderSystem
The rendering system to send the scene to.
LightInfoList mCachedLightInfos
Comparator for sorting lights relative to a point.
virtual StaticGeometry * createStaticGeometry(const String &name)
Creates a StaticGeometry instance suitable for use with this SceneManager.
void mergeNonRenderedButInFrustum(const AxisAlignedBox &boxBounds, const Sphere &sphereBounds, const Camera *cam)
Merge an object that is not being rendered because it's not a shadow caster, but is a shadow receiver...
virtual void manualRender(RenderOperation *rend, Pass *pass, Viewport *vp, const Matrix4 &worldMatrix, const Matrix4 &viewMatrix, const Matrix4 &projMatrix, bool doBeginEndFrame=false)
Manual rendering method, for advanced users only.
unsigned long clipPlanesValid
virtual bool isShadowTechniqueModulative(void) const
Is there a modulative shadowing technique in use?
EntityMaterialLodChangedEventList mEntityMaterialLodChangedEvents
Abstract class representing a Texture resource.
virtual void setShadowVolumeStencilState(bool secondpass, bool zfail, bool twosided)
Internal utility method for setting stencil state for rendering shadow volumes.
Pass * mShadowCasterPlainBlackPass
A pass designed to let us render shadow colour on white for texture shadows.
SkyBoxGenParameters mSkyBoxGenParameters
InstanceManagerVec mDirtyInstanceManagers
Viewport * mCurrentViewport
Current Viewport.
virtual void destroyCamera(Camera *cam)
Removes a camera from the scene.
ShadowCamLightMapping mShadowCamLightMapping
LightList mShadowTextureCurrentCasterLightList
virtual void destroyInstance(SceneManager *instance)=0
Destroy an instance of a SceneManager.
This utility class is used to hold the information used to generate the matrices and other informatio...
virtual SceneManager * createInstance(const String &instanceName)=0
Create a new instance of a SceneManager.
uint32 mLastLightHashGpuProgram
virtual bool _areShadowsSuppressed(void) const
Are shadows suppressed?
A class for performing queries on a scene.
Vector3 position
Sets to zero if directional light.
uint8 mSkyPlaneRenderQueue
virtual void firePreUpdateSceneGraph(Camera *camera)
Internal method for firing pre update scene graph event.
virtual void destroyBillboardSet(BillboardSet *set)
Removes & destroys an BillboardSet from the SceneManager.
virtual void destroyManualObject(ManualObject *obj)
Removes & destroys a ManualObject from the SceneManager.
Defines the functionality of a 3D API.
virtual BillboardChain * createBillboardChain()
Create a BillboardChain, an object which you can use to render a linked chain of billboards,...
A grouping level underneath RenderQueue which groups renderables to be issued at coarsely the same ti...
void merge(const AxisAlignedBox &boxBounds, const Sphere &sphereBounds, const Camera *cam, bool receiver=true)
virtual RenderContext * _pauseRendering()
Pause rendering of the frame.
bool mShowBoundingBoxes
Flag that indicates if all of the scene node's bounding boxes should be shown as a wireframe.
vector< TexturePtr >::type ShadowTextureList
Pass * mShadowModulativePass
virtual void setShadowTechnique(ShadowTechnique technique)
Sets the general shadow technique to be used in this scene.
virtual void _populateLightList(const SceneNode *sn, Real radius, LightList &destList, uint32 lightMask=0xFFFFFFFF)
Populates a light list with an ordered set of the lights which are closest to the position of the Sce...
virtual void renderTextureShadowCasterQueueGroupObjects(RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
Render a group rendering only shadow casters.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
virtual void _suppressRenderStateChanges(bool suppress)
Indicates to the SceneManager whether it should suppress changing the RenderSystem states when render...
IlluminationRenderStage
Describes the stage of rendering when performing complex illumination.
virtual void destroyInstancedGeometry(InstancedGeometry *geom)
Remove & destroy a InstancedGeometry instance.
Defines a plane in 3D space.
virtual const ShadowCameraSetupPtr & getShadowCameraSetup() const
Get the shadow camera setup in use for all lights which don't have their own shadow camera setup.
LightList mLightsAffectingFrustum
virtual void destroyStaticGeometry(const String &name)
Remove & destroy a StaticGeometry instance.
virtual InstanceManager * getInstanceManager(const String &managerName) const
Retrieves an existing InstanceManager by it's name.
virtual bool isSkyDomeEnabled(void) const
Return whether a skydome is enabled.
virtual bool sortLightsAffectingFrustum(LightList &lightList)
Hook to allow the listener to override the ordering of lights for the entire frustum.
virtual void destroyMovableObject(const String &name, const String &typeName)
Destroys a MovableObject with the name specified, of the type specified.
virtual void extractMovableObject(MovableObject *m)
Extract a previously injected MovableObject.
~DefaultIntersectionSceneQuery()
virtual void removeListener(Listener *s)
Remove a listener.
virtual void setSkyBoxEnabled(bool enable)
Enables / disables a 'sky box'.
Class that allows listening in on the various stages of SceneManager processing, so that custom behav...
virtual bool getFindVisibleObjects(void)
Gets whether the SceneManager should search for visible objects, or whether they are being manually h...
OGRE_MUTEX(mMovableObjectCollectionMapMutex)
Mutex over the collection of MovableObject types.
LightTypes
Defines the type of light.
virtual void setShadowTextureReceiverMaterial(const String &name)
Sets the default material to use for rendering shadow receivers.
void _notifyEntityMaterialLodChanged(EntityMaterialLodChangedEvent &evt)
Notify that an entity material LOD change event has occurred.
A viewpoint from which the scene will be rendered.
void execute(SceneQueryListener *listener)
See SceneQuery.
virtual void useLightsGpuProgram(const Pass *pass, const LightList *lights)
virtual ManualObject * createManualObject()
Create a ManualObject, an object which you populate with geometry manually through a GL immediate-mod...
~DefaultPlaneBoundedVolumeListSceneQuery()
ulong _getLightsDirtyCounter(void) const
Advance method to gets the lights dirty counter.
virtual void destroyAllAnimationStates(void)
Removes all animation states created using this SceneManager.
virtual void renderVisibleObjectsDefaultSequence(void)
Internal method for rendering all objects using the default queue sequence.
void prepare(bool lightInFrustum, const PlaneBoundedVolumeList *lightClipVolumes, const Light *light, const Camera *cam, ShadowCasterList *casterList, Real farDistSquared)
bool queryResult(SceneQuery::WorldFragment *fragment)
Called when a WorldFragment is returned by a query.
RenderSystem * getDestinationRenderSystem()
Get the rendersystem subclass to which the output of this Scene Manager gets sent.
virtual Entity * createEntity(PrefabType ptype)
Create an Entity (instance of a discrete mesh) from a range of prefab shapes, generating the name.
StaticGeometryList mStaticGeometryList
virtual void addRenderQueueListener(RenderQueueListener *newListener)
Registers a new RenderQueueListener which will be notified when render queues are processed.
virtual void setSkyPlane(bool enable, const Plane &plane, const String &materialName, Real scale=1000, Real tiling=10, bool drawFirst=true, Real bow=0, int xsegments=1, int ysegments=1, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Enables / disables a 'sky plane' i.e.
Chain of compositor effects applying to one viewport.
AnimationStateSet mAnimationStates
virtual RaySceneQuery * createRayQuery(const Ray &ray, uint32 mask=0xFFFFFFFF)
Creates a RaySceneQuery for this scene manager.
SceneMgrQueuedRenderableVisitor * mActiveQueuedRenderableVisitor
The active renderable visitor class - subclasses could override this.
virtual AutoParamDataSource * createAutoParamDataSource(void) const
Internal method for creating the AutoParamDataSource instance.
virtual SceneNode * getSkyPlaneNode(void) const
Get the sky plane node, if enabled.
bool scissoring
Scissoring if requested?
map< String, Animation * >::type AnimationList
Storage of animations, lookup by name.
bool mSuppressShadows
Suppress shadows?
virtual bool hasMovableObject(const String &name, const String &typeName) const
Returns whether a movable object instance with the given name exists.
const MovableObjectCollection * getMovableObjectCollection(const String &typeName) const
Gets the movable object collection for the given type name.
virtual bool getShadowTextureSelfShadow(void) const
Gets whether or not texture shadows attempt to self-shadow.
String mShadowTextureCustomReceiverFragmentProgram
virtual void setShadowColour(const ColourValue &colour)
Set the colour used to modulate areas in shadow.
String mName
Instance name.
virtual void postFindVisibleObjects(SceneManager *source, IlluminationRenderStage irs, Viewport *v)
Called after searching for visible objects in this SceneManager.
virtual const SkyDomeGenParameters & getSkyDomeGenParameters(void) const
Get the parameters used to generate the current SkyDome, if any.
static uint32 WORLD_GEOMETRY_TYPE_MASK
Query type mask which will be used for world geometry.
Real maxDistance
The farthest a visible objects is from the camera.
bool mShadowMaterialInitDone
const VisibleObjectsBoundsInfo & getVisibleObjectsBoundsInfo(const Camera *cam) const
Returns a visibility boundary box for a specific camera.
This optional class allows you to receive per-result callbacks from SceneQuery executions instead of ...
virtual size_t estimateWorldGeometry(const String &filename)
Estimate the number of loading stages required to load the named world geometry.
virtual MovableObject * createMovableObject(const String &typeName, const NameValuePairList *params=0)
Create a movable object of the type specified without a name.
vector< String >::type StringVector
virtual void removeRenderObjectListener(RenderObjectListener *delListener)
Removes a listener previously added with addRenderObjectListener.
virtual Real getShadowFarDistanceSquared(void) const
virtual void renderTransparentShadowCasterObjects(const QueuedRenderableCollection &objs, QueuedRenderableCollection::OrganisationMode om, bool lightScissoringClipping, bool doLightIteration, const LightList *manualLightList=0)
Render those objects in the transparent pass list which have shadow casting forced on.
bool autoLights
Automatic light handling?
ShadowCasterList * mCasterList
SceneManager(const String &instanceName)
Constructor.
virtual Entity * createEntity(const String &entityName, const MeshPtr &pMesh)
Create an Entity (instance of a discrete mesh).
virtual ViewPoint getSuggestedViewpoint(bool random=false)
Asks the SceneManager to provide a suggested viewpoint from which the scene should be viewed.
virtual void setShadowIndexBufferSize(size_t size)
Sets the maximum size of the index buffer used to render shadow primitives.
vector< RenderObjectListener * >::type RenderObjectListenerList
virtual AnimationState * getAnimationState(const String &animName) const
Retrieves animation state as previously created using createAnimationState.
virtual void destroyAllMovableObjects(void)
Destroy all MovableObjects.
RenderQueue * renderQueue
Specialises the SceneQuery class for querying within a sphere.
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 be...
virtual void fireSceneManagerDestroyed()
Internal method for firing destruction event.
ColourValue mShadowColour
InstancedGeometryList mInstancedGeometryList
set< SceneNode * >::type AutoTrackingSceneNodes
Autotracking scene nodes.
virtual bool isShadowTechniqueAdditive(void) const
Is there an additive shadowing technique in use?
ClipResult
Generic result of clipping.
virtual bool validateRenderableForRendering(const Pass *pass, const Renderable *rend)
Internal method to validate whether a Renderable should be allowed to render.
This is the main starting point for the new instancing system.
SceneType
Classification of a scene to allow a decision of what type of SceenManager to provide back to the app...
Defines a program which runs on the GPU such as a vertex or fragment program.
virtual void sceneManagerDestroyed(SceneManager *source)
Event notifying the listener of the SceneManager's destruction.
virtual Camera * createCamera(const String &name)
Creates a camera to be managed by this scene manager.
ShadowTechnique
An enumeration of broad shadow techniques.
Concrete IteratorWrapper for nonconst access to the underlying container.
Representation of a dynamic light source in the scene.
virtual ClipResult buildAndSetScissor(const LightList &ll, const Camera *cam)
Set up a scissor rectangle from a group of lights.
virtual bool isSkyBoxEnabled(void) const
Return whether a skybox is enabled.
Default implementation of IntersectionSceneQuery.
virtual void setShadowTextureCount(size_t count)
Set the number of textures allocated for texture-based shadows.
OGRE_MUTEX(sceneGraphMutex)
Mutex to protect the scene graph from simultaneous access from multiple threads.
virtual void shadowTexturesUpdated(size_t numberOfShadowTextures)
Event raised after all shadow textures have been rendered into for all queues / targets but before an...
bool queryResult(MovableObject *object)
Called when a MovableObject is returned by a query.
Abstract interface which classes must implement if they wish to receive events from the render queue.
virtual Real getShadowFarDistance(void) const
Gets the default maximum distance away from the camera that shadows will be visible.
CameraList mCameras
Central list of cameras - for easy memory management and lookup.
virtual BillboardSet * createBillboardSet(unsigned int poolSize=20)
Creates a new BillboardSet for use with this scene manager, with a generated name.
void setFog(FogMode mode=FOG_NONE, const ColourValue &colour=ColourValue::White, Real expDensity=0.001, Real linearStart=0.0, Real linearEnd=1.0)
Sets the fogging mode applied to the scene.
Class encapsulates rendering properties of an object.
~DefaultSphereSceneQuery()
virtual Entity * createEntity(const String &meshName)
Create an Entity (instance of a discrete mesh) with an autogenerated name.
virtual void _setDestinationRenderSystem(RenderSystem *sys)
Notifies the scene manager of its destination render system.
ShadowCasterList mShadowCasterList
PrefabType
Prefab shapes available without loading a model.
Abstract class defining a movable object in a scene.
virtual void fireShadowTexturesUpdated(size_t numberOfShadowTextures)
Internal method for firing the texture shadows updated event.
size_t getShadowTextureCount(void) const
Get the number of the textures allocated for texture based shadows.
Real minDistanceInFrustum
The closest a object in the frustum regardless of visibility / shadow caster flags.
virtual bool setOption(const String &strKey, const void *pValue)
Method for setting a specific option of the Scene Manager.
virtual void setSkyBox(bool enable, const String &materialName, Real distance=5000, bool drawFirst=true, const Quaternion &orientation=Quaternion::IDENTITY, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Enables / disables a 'sky box' i.e.
_OgreExport bool operator()(const Light *l1, const Light *l2) const
virtual void destroyAllMovableObjectsByType(const String &typeName)
Destroy all MovableObjects of a given type.
virtual ClipResult buildAndSetLightClip(const LightList &ll)
Build a set of user clip planes from a single non-directional light.
Shared pointer implementation used to share index buffers.
DefaultAxisAlignedBoxSceneQuery(SceneManager *creator)
virtual void setShadowFarDistance(Real distance)
Sets the default maximum distance away from the camera that shadows will be visible.
virtual ParticleSystem * getParticleSystem(const String &name) const
Retrieves a pointer to the named ParticleSystem.
OGRE_MUTEX(mAnimationsListMutex)
ShadowTextureList mShadowTextures
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
virtual Light * createLight(const String &name)
Creates a light for use in the scene.
virtual void destroySceneNode(SceneNode *sn)
Destroys a SceneNode.
virtual IntersectionSceneQuery * createIntersectionQuery(uint32 mask=0xFFFFFFFF)
Creates an IntersectionSceneQuery for this scene manager.
Separate SceneQuery class to query for pairs of objects which are possibly intersecting one another.
virtual void destroyAnimationState(const String &name)
Destroys an AnimationState.
virtual void _queueSkiesForRendering(Camera *cam)
Internal method for queueing the sky objects with the params as previously set through setSkyBox,...
LightClippingInfoMap mLightClippingInfoMap
virtual bool validatePassForRendering(const Pass *pass)
Internal method to validate whether a Pass should be allowed to render.
virtual void fireRenderSingleObject(Renderable *rend, const Pass *pass, const AutoParamDataSource *source, const LightList *pLightList, bool suppressRenderStateChanges)
Internal method for firing when rendering a single object.
Class providing a much simplified interface to generating manual objects with custom geometry.
virtual 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.
MapIterator< AnimationList > AnimationIterator
const String & getName(void) const
Return the instance name of this SceneManager.
MapIterator< CameraList > CameraIterator
virtual Real getFogStart(void) const
Returns the fog start distance for the scene.
static uint32 FRUSTUM_TYPE_MASK
Query type mask which will be used for frusta and cameras.
Default implementation of SphereSceneQuery.
virtual bool hasInstanceManager(const String &managerName) const
Returns whether an InstanceManager with the given name exists.
A collection of billboards (faces which are always facing the given direction) with the same (default...
CompositorChain * mActiveCompositorChain
virtual void destroyStaticGeometry(StaticGeometry *geom)
Remove & destroy a StaticGeometry instance.
virtual void destroyInstancedGeometry(const String &name)
Remove & destroy a InstancedGeometry instance.
virtual ParticleSystem * createParticleSystem(const String &name, const String &templateName)
Creates a particle system based on a template.
Quaternion mSkyBoxOrientation
virtual void setShadowTextureSize(unsigned short size)
Set the size of the texture used for all texture-based shadows.
vector< LightInfo >::type LightInfoList
Specialises the SceneQuery class for querying within an axis aligned box.
bool mNormaliseNormalsOnScale
virtual bool hasRibbonTrail(const String &name) const
Returns whether a ribbon trail with the given name exists.
virtual void destroyAllInstancedGeometry(void)
Remove & destroy all InstancedGeometry instances.
virtual void resetScissor()
virtual void renderSingleObject(Renderable *rend, const Pass *pass, bool lightScissoringClipping, bool doLightIteration, const LightList *manualLightList=0)
Internal utility method for rendering a single object.
virtual InstancedEntity * createInstancedEntity(const String &materialName, const String &managerName)
Creates an InstancedEntity based on an existing InstanceManager (.
virtual void destroyRibbonTrail(const String &name)
Removes & destroys a RibbonTrail from the SceneManager.
Pre-transforms and batches up meshes for efficient use as static geometry in a scene.
uint16 SceneTypeMask
Bitmask containing scene types.
virtual bool hasEntity(const String &name) const
Returns whether an entity with the given name exists.
virtual Real getFogEnd(void) const
Returns the fog end distance for the scene.
virtual const ShadowCasterList & findShadowCastersForLight(const Light *light, const Camera *camera)
Internal method for locating a list of shadow casters which could be affecting the frustum for a give...
virtual const SceneManagerMetaData & getMetaData(void) const
Get information about the SceneManager type created by this factory.
Class defining a single pass of a Technique (of a Material), i.e.
set< uint8 >::type SpecialCaseRenderQueueList
HardwareIndexBufferSharedPtr mShadowIndexBuffer
bool transparentShadowCastersMode
Are we in transparent shadow caster mode?
map< String, SceneNode * >::type SceneNodeList
virtual void setShadowTextureSettings(unsigned short size, unsigned short count, PixelFormat fmt=PF_X8R8G8B8, unsigned short fsaa=0, uint16 depthBufferPoolId=1)
Sets the size and count of textures used in texture-based shadows.
static uint32 LIGHT_TYPE_MASK
Query type mask which will be used for lights.
map< Light *, LightClippingInfo >::type LightClippingInfoMap
bool mShadowAdditiveLightClip
MovableObjectCollectionMap mMovableObjectCollectionMap
static uint32 ENTITY_TYPE_MASK
Query type mask which will be used for entities.
virtual bool getFlipCullingOnNegativeScale() const
Get whether to automatically flip the culling mode on objects whenever they are negatively scaled.
@ SHADOWTYPE_NONE
No shadows.
virtual bool fireRenderQueueStarted(uint8 id, const String &invocation)
Internal method for firing the queue start event, returns true if queue is to be skipped.
uint32 _getCombinedVisibilityMask(void) const
Internal method for getting the combination between the global visibility mask and the per-viewport v...
virtual void shadowTextureCasterPreViewProj(Light *light, Camera *camera, size_t iteration)
This event occurs just before the view & projection matrices are set for rendering into a shadow text...
Pass * mShadowTextureCustomReceiverPass
void _notifyMovableObjectLodChanged(MovableObjectLodChangedEvent &evt)
Notify that a movable object LOD change event has occurred.
virtual bool getShadowCasterRenderBackFaces() const
Gets whether or not shadow casters should be rendered into shadow textures using their back faces rat...
virtual RibbonTrail * getRibbonTrail(const String &name) const
Retrieves a pointer to the named RibbonTrail.
Class which will create instances of a given SceneManager.
virtual void renderBasicQueueGroupObjects(RenderQueueGroup *pGroup, QueuedRenderableCollection::OrganisationMode om)
Render a group in the ordinary way.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
virtual void setLateMaterialResolving(bool isLate)
Sets whether to use late material resolving or not.
SceneNode * mSceneRoot
Root scene node.
Structure collecting together information about the visible objects that have been discovered in a sc...
GpuProgramParametersSharedPtr mShadowTextureCustomCasterVPParams
_OgreExport bool operator()(const Material *x, const Material *y) const
ShadowCasterSceneQueryListener(SceneManager *sm)
AnimationList mAnimationsList
AutoTrackingSceneNodes mAutoTrackingSceneNodes
Defines an instance of a discrete, movable object based on a Mesh.
virtual void setShadowTextureFadeEnd(Real fadeEnd)
Sets the proportional distance at which texture shadows finish to fading out.
void visit(RenderablePass *rp)
Called when visiting a RenderablePass, i.e.
ManualObject * mSkyBoxObj
Represents the state of an animation and the weight of its influence.
Class representing a node in the scene graph.
virtual bool hasBillboardChain(const String &name) const
Returns whether a billboard chain with the given name exists.
virtual const LightList & _getLightsAffectingFrustum(void) const
Get the list of lights which could be affecting the frustum.
static uint32 FX_TYPE_MASK
Query type mask which will be used for effects like billboardsets / particle systems.
virtual void destroyParticleSystem(ParticleSystem *obj)
Removes & destroys a ParticleSystem from the SceneManager.
virtual void setShadowDirLightTextureOffset(Real offset)
Sets the proportional distance which a texture shadow which is generated from a directional light wil...
virtual void destroyAllAnimations(void)
Removes all animations created using this SceneManager.
virtual void removeSpecialCaseRenderQueue(uint8 qid)
Removes an item to the 'special case' render queue list.
virtual void destroyAllEntities(void)
Removes & destroys all Entities.
virtual SceneNode * getSkyBoxNode(void) const
Get the skybox node, if enabled.
Abstract interface which classes must implement if they wish to receive events from the scene manager...
SceneManagerMetaData mMetaData
const ColourValue & getAmbientLight(void) const
Returns the ambient light level to be used for the scene.
virtual void setFindVisibleObjects(bool find)
Sets whether the SceneManager should search for visible objects, or whether they are being manually h...
Pre-transforms and batches up meshes for efficient use as instanced geometry in a scene.
virtual void destroyEntity(const String &name)
Removes & destroys an Entity from the SceneManager by name.
_OgreExport bool operator()(const Light *a, const Light *b) const
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator,...
virtual void setShadowTextureCasterMaterial(const String &name)
Sets the default material to use for rendering shadow casters.
void execute(RaySceneQueryListener *listener)
See RayScenQuery.
virtual Entity * createEntity(const String &entityName, PrefabType ptype)
Create an Entity (instance of a discrete mesh) from a range of prefab shapes.
Quaternion mSkyDomeOrientation
Inner helper class to implement the visitor pattern for rendering objects in a queue.
virtual void setShadowUseInfiniteFarPlane(bool enable)
Sets whether we should use an inifinite camera far plane when rendering stencil shadows.
Visitor interface for items in a QueuedRenderableCollection.
virtual ShadowTechnique getShadowTechnique(void) const
Gets the current shadow technique.
virtual bool fireRenderQueueEnded(uint8 id, const String &invocation)
Internal method for firing the queue end event, returns true if queue is to be repeated.
virtual void firePostFindVisibleObjects(Viewport *v)
Internal method for firing find visible objects event.
SceneManager * targetSceneMgr
Target SM to send renderables to.
OrganisationMode
Organisation modes required for this collection.
virtual uint32 getVisibilityMask(void)
Gets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is ...
SceneNodeList mSceneNodes
Central list of SceneNodes - for easy memory management.
Implementation of a Quaternion, i.e.
Subclass of BillboardChain which automatically leaves a trail behind one or more Node instances.
virtual Entity * createEntity(const MeshPtr &pMesh)
Create an Entity (instance of a discrete mesh) with an autogenerated name.
vector< Listener * >::type ListenerList
virtual void fireShadowTexturesPreCaster(Light *light, Camera *camera, size_t iteration)
Internal method for firing the pre caster texture shadows event.
void setAmbientLight(const ColourValue &colour)
Sets the ambient light level to be used for the scene.
virtual void clearSpecialCaseRenderQueues(void)
Clears the 'special case' render queue list.
Real range
Use int instead of Light::LightTypes to avoid header file dependence.
GpuProgramParametersSharedPtr mShadowTextureCustomReceiverVPParams
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
virtual void setWorldGeometry(DataStreamPtr &stream, const String &typeName=StringUtil::BLANK)
Sets the source of the 'world' geometry, i.e.
ShadowTechnique mShadowTechnique
virtual void _resumeRendering(RenderContext *context)
Resume rendering of the frame.
void execute(IntersectionSceneQueryListener *listener)
See IntersectionSceneQuery.
VisibleObjectsBoundsInfo()
RenderQueue * mRenderQueue
Queue of objects for rendering.
virtual void setFlipCullingOnNegativeScale(bool n)
Set whether to automatically flip the culling mode on objects whenever they are negatively scaled.
bool mCameraRelativeRendering
Whether to use camera-relative rendering.
virtual void destroyAllStaticGeometry(void)
Remove & destroy all StaticGeometry instances.
virtual void _renderScene(Camera *camera, Viewport *vp, bool includeOverlays)
Prompts the class to send its contents to the renderer.
Struct containing information about a material LOD change event for entities.
virtual void destroyMovableObject(MovableObject *m)
Destroys a MovableObject.
virtual bool getNormaliseNormalsOnScale() const
Get whether to automatically normalise normals on objects whenever they are scaled.
Class encapsulating a standard 4x4 homogeneous matrix.
SpecialCaseRenderQueueMode mSpecialCaseQueueMode
ShadowTextureCameraList mShadowTextureCameras
virtual void _setActiveCompositorChain(CompositorChain *chain)
Sets the active compositor chain of the current scene being rendered.
Utility class to generate a sequentially numbered series of names.
virtual void removeRenderQueueListener(RenderQueueListener *delListener)
Removes a listener previously added with addRenderQueueListener.
@ SCRQM_INCLUDE
Render only the queues in the special case list.
bool mLateMaterialResolving
uint8 mWorldGeometryRenderQueue
bool mLastRenderQueueInvocationCustom
virtual RibbonTrail * createRibbonTrail(const String &name)
Create a RibbonTrail, an object which you can use to render a linked chain of billboards which follow...
virtual bool isShadowTechniqueInUse(void) const
Is there any shadowing technique in use?
PixelFormat
The pixel format used for images, textures, and render surfaces.
Manages the organisation and rendering of a 'scene' i.e.
virtual PlaneBoundedVolumeListSceneQuery * createPlaneBoundedVolumeQuery(const PlaneBoundedVolumeList &volumes, uint32 mask=0xFFFFFFFF)
Creates a PlaneBoundedVolumeListSceneQuery for this scene manager.
Real mShadowTextureFadeEnd
As a proportion e.g. 0.6.
vector< EntityMeshLodChangedEvent >::type EntityMeshLodChangedEventList
List of entity mesh LOD changed events.
virtual void extractAllMovableObjectsByType(const String &typeName)
Extract all injected MovableObjects of a given type.
Rectangle2D * mFullScreenQuad
virtual void destroyAllCameras(void)
Removes (and destroys) all cameras from the scene.
Class to hold a linear sequence of RenderQueueInvocation objects.
virtual SceneNode * createSceneNodeImpl(const String &name)
Subclasses can override this to ensure their specialised SceneNode is used.
Camera * mCameraInProgress
Camera in progress.
virtual void destroyEntity(Entity *ent)
Removes & destroys an Entity from the SceneManager.
An abstraction of a viewport, i.e.
virtual void fireShadowTexturesPreReceiver(Light *light, Frustum *f)
Internal method for firing the pre receiver texture shadows event.
int skyDomeYSegments_keep
virtual const SkyBoxGenParameters & getSkyBoxGenParameters(void) const
Get the parameters used to generate the current SkyBox, if any.
virtual void renderVisibleObjectsCustomSequence(RenderQueueInvocationSequence *s)
Internal method for rendering all objects using a custom queue sequence.
virtual const ColourValue & getShadowColour(void) const
Get the colour used to modulate areas in shadow.
virtual void ensureShadowTexturesCreated()
Internal method for creating shadow textures (texture-based shadows)
size_t getShadowTextureCountPerLightType(Light::LightTypes type) const
Get the number of shadow textures is assigned for the given light type.
virtual 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 ...
InstanceManagerMap mInstanceManagerMap
virtual Real getFogDensity(void) const
Returns the fog density for the scene.
DefaultPlaneBoundedVolumeListSceneQuery(SceneManager *creator)
RenderObjectListenerList mRenderObjectListeners
String mShadowTextureCustomCasterFragmentProgram
virtual void destroyAllRibbonTrails(void)
Removes & destroys all RibbonTrails from the SceneManager.
virtual void setVisibilityMask(uint32 vmask)
Sets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is ...
map< const Camera *, const Light * >::type ShadowCamLightMapping
ShadowCamera to light mapping.
AxisAlignedBox receiverAabb
The axis-aligned bounds of the visible shadow receiver objects.
virtual void setWorldGeometry(const String &filename)
Sets the source of the 'world' geometry, i.e.
DefaultIntersectionSceneQuery(SceneManager *creator)
virtual const PlaneList & getLightClippingPlanes(Light *l)
Retrieve a set of clipping planes for a given light.
@ RENDER_QUEUE_SKIES_EARLY
First queue (after backgrounds), used for skyboxes if rendered first.
virtual Camera * getCamera(const String &name) const
Retrieves a pointer to the named camera.
SphereSceneQuery * mShadowCasterSphereQuery
virtual const Pass * deriveShadowReceiverPass(const Pass *pass)
Internal method for turning a regular pass into a shadow receiver pass.
virtual void firePreFindVisibleObjects(Viewport *v)
Internal method for firing find visible objects event.
Default implementation of RaySceneQuery.
virtual void preUpdateSceneGraph(SceneManager *source, Camera *camera)
Called prior to updating the scene graph in this SceneManager.
vector< RenderQueueListener * >::type RenderQueueListenerList
static String DEFAULT_RESOURCE_GROUP_NAME
Default resource group name.
Real mDefaultShadowFarDistSquared
virtual void setViewport(Viewport *vp)
Internal method for setting the destination viewport for the next render.
void _handleLodEvents()
Handle LOD events.
unsigned short mLastLightLimit
virtual AxisAlignedBoxSceneQuery * createAABBQuery(const AxisAlignedBox &box, uint32 mask=0xFFFFFFFF)
Creates an AxisAlignedBoxSceneQuery for this scene manager.
bool mShadowTextureSelfShadow
As a proportion e.g. 0.9.
virtual void setShadowUseLightClipPlanes(bool enabled)
Sets whether when using a built-in additive shadow mode, user clip planes should be used to restrict ...
uint8 mSkyDomeRenderQueue
virtual ParticleSystem * createParticleSystem(size_t quota=500, const String &resourceGroup=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Create a blank particle system with a generated name.
virtual void _setSkyPlane(bool enable, const Plane &plane, const String &materialName, Real scale=1000, Real tiling=10, uint8 renderQueue=RENDER_QUEUE_SKIES_EARLY, Real bow=0, int xsegments=1, int ysegments=1, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Enables / disables a 'sky plane' i.e.
uint16 mGpuParamsDirty
Gpu params that need rebinding (mask of GpuParamVariability)
virtual void renderAdditiveTextureShadowedQueueGroupObjects(RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
Render a group with additive texture shadows.
unsigned long mLastFrameNumber
virtual Entity * getEntity(const String &name) const
Retrieves a pointer to the named Entity.
Simple structure to hold MovableObject map and a mutex to go with it.
AnimationIterator getAnimationIterator(void)
Returns a specialised MapIterator over all animations in the scene.
vector< ShadowCaster * >::type ShadowCasterList
virtual MovableObject * createMovableObject(const String &name, const String &typeName, const NameValuePairList *params=0)
Create a movable object of the type specified.
virtual bool hasOption(const String &strKey) const
Method for verifying whether the scene manager has an implementation-specific option.
@ IRS_NONE
No special illumination stage.
A 3D box aligned with the x/y/z axes.
bool mShadowTextureConfigDirty
virtual ~SceneManager()
Default destructor.
virtual void destroyManualObject(const String &name)
Removes & destroys a ManualObject from the SceneManager.
AxisAlignedBoxSceneQuery * mShadowCasterAABBQuery
virtual void destroyLight(Light *light)
Removes the light from the scene and destroys it based on a pointer.
virtual void setViewMatrix(const Matrix4 &m)
Matrix4 mCachedViewMatrix
vector< size_t >::type mShadowTextureIndexLightList
Array defining shadow texture index in light list.
virtual bool isShadowTechniqueTextureBased(void) const
Is there a texture shadow based shadowing technique in use?
Structure containing the configuration for one shadow texture.
virtual void _notifyLightsDirty(void)
Advance method to increase the lights dirty counter due lights changed.
int type
Just a pointer for comparison, the light might destroyed for some reason.
CullingMode
Hardware culling modes based on vertex winding.
virtual void setShadowCameraSetup(const ShadowCameraSetupPtr &shadowSetup)
Set the shadow camera setup to use for all lights which don't have their own shadow camera setup.
Real mDefaultShadowFarDist
virtual Animation * createAnimation(const String &name, Real length)
Creates an animation which can be used to animate scene nodes.
bool mSuppressRenderStateChanges
Suppress render state changes?
virtual void updateRenderQueueSplitOptions(void)
Update the state of the global render queue splitting based on a shadow option change.
static uint32 STATICGEOMETRY_TYPE_MASK
Query type mask which will be used for StaticGeometry.
GpuProgramParametersSharedPtr mShadowTextureCustomReceiverFPParams
map< String, MovableObjectCollection * >::type MovableObjectCollectionMap
uint32 mVisibilityMask
Visibility mask used to show / hide objects.
virtual void destroyInstancedEntity(InstancedEntity *instancedEntity)
Removes an InstancedEntity,.
virtual void useRenderableViewProjMode(const Renderable *pRend, bool fixedFunction)
Internal method used by _renderSingleObject to deal with renderables which override the camera's own ...
ColourValue mAmbientLight
Current ambient light, cached for RenderSystem.
IlluminationRenderStage _getCurrentRenderStage()
virtual void initShadowVolumeMaterials(void)
Internal method for setting up materials for shadows.
virtual void findLightsAffectingFrustum(const Camera *camera)
Internal method for locating a list of lights which could be affecting the frustum.
virtual void setShadowTextureFadeStart(Real fadeStart)
Sets the proportional distance at which texture shadows begin to fade out.
virtual void destroyLight(const String &name)
Removes the named light from the scene and destroys it.
static uint32 USER_TYPE_MASK_LIMIT
User type mask limit.
virtual bool hasAnimation(const String &name) const
Returns whether an animation with the given name exists.
virtual bool isLateMaterialResolving() const
Gets whether using late material resolving or not.
virtual SphereSceneQuery * createSphereQuery(const Sphere &sphere, uint32 mask=0xFFFFFFFF)
Creates a SphereSceneQuery for this scene manager.
virtual void useLights(const LightList &lights, unsigned short limit)
SpecialCaseRenderQueueMode
Enumeration of the possible modes allowed for processing the special case render queue list.
@ SHADOWDETAILTYPE_ADDITIVE
Mask for additive shadows (not for direct use, use SHADOWTYPE_ enum instead)
map< String, MovableObject * >::type MovableObjectMap
virtual bool hasParticleSystem(const String &name) const
Returns whether a particle system with the given name exists.
virtual void destroyInstanceManager(InstanceManager *instanceManager)
virtual void destroyRibbonTrail(RibbonTrail *obj)
Removes & destroys a RibbonTrail from the SceneManager.
A sphere primitive, mostly used for bounds checking.
virtual CompositorChain * _getActiveCompositorChain() const
Gets the active compositor chain of the current scene being rendered.
virtual const Pass * _setPass(const Pass *pass, bool evenIfSuppressed=false, bool shadowDerivation=true)
Internal method for setting up the renderstate for a rendering pass.
static const ColourValue White
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
virtual MovableObjectIterator getMovableObjectIterator(const String &typeName)
Get an iterator over all MovableObect instances of a given type.
virtual void _suppressShadows(bool suppress)
Indicates to the SceneManager whether it should suppress the active shadow rendering technique until ...
vector< ShadowTextureConfig >::type ShadowTextureConfigList
bool visit(const Pass *p)
virtual void destroyAllParticleSystems(void)
Removes & destroys all ParticleSystems from the SceneManager.
map< const Camera *, VisibleObjectsBoundsInfo >::type CamVisibleObjectsMap
Visible objects bounding box list.
@ IRS_RENDER_TO_TEXTURE
Render to texture stage, used for texture based shadows.
virtual void setShadowDirectionalLightExtrusionDistance(Real dist)
Sets the distance a shadow volume is extruded for a directional light.
ShadowTextureConfigList mShadowTextureConfigList
virtual void preFindVisibleObjects(SceneManager *source, IlluminationRenderStage irs, Viewport *v)
Called prior to searching for visible objects in this SceneManager.
virtual MeshPtr createSkyboxPlane(BoxPlane bp, Real distance, const Quaternion &orientation, const String &groupName)
A interface class defining a listener which can be used to receive notifications of LOD events.
uint32 lightMask
Sets to zero if directional light.
virtual BillboardSet * createBillboardSet(const String &name, unsigned int poolSize=20)
Creates a new BillboardSet for use with this scene manager.
Pass * mShadowStencilPass
virtual const ColourValue & getFogColour(void) const
Returns the fog colour for the scene.
ShadowCameraSetupPtr mDefaultShadowCameraSetup
default shadow camera setup
RenderQueueListenerList mRenderQueueListeners
virtual 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.
virtual MovableObject * getMovableObject(const String &name, const String &typeName) const
Get a reference to a previously created MovableObject.
virtual void setSkyPlaneEnabled(bool enable)
Enables / disables a 'sky plane'.
SceneMgrQueuedRenderableVisitor mDefaultQueuedRenderableVisitor
Storage for default renderable visitor.
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
virtual void setShowDebugShadows(bool debug)
Enables / disables the rendering of debug information for shadows.
virtual void renderModulativeTextureShadowedQueueGroupObjects(RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
Render a group with the added complexity of modulative texture shadows.
virtual void showBoundingBoxes(bool bShow)
Allows all bounding boxes of scene nodes to be displayed.
virtual ManualObject * getManualObject(const String &name) const
Retrieves a pointer to the named ManualObject.
Default implementation of PlaneBoundedVolumeListSceneQuery.
virtual void _applySceneAnimations(void)
Internal method for applying animations to scene nodes.
Struct containing information about a LOD change event for movable objects.
Class encapsulating a set of AnimationState objects.
Specialises the SceneQuery class for querying along a ray.
virtual void initMetaData(void) const =0
Internal method to initialise the metadata, must be implemented.
virtual void destroyQuery(SceneQuery *query)
Destroys a scene query of any type.
virtual bool isSkyPlaneEnabled(void) const
Return whether a key plane is enabled.
bool mFlipCullingOnNegativeScale
void updateDirtyInstanceManagers(void)
Updates all instance managaers with dirty instance batches.
virtual void addRenderObjectListener(RenderObjectListener *newListener)
Registers a new Render Object Listener which will be notified when rendering an object.
GpuProgramParametersSharedPtr mShadowTextureCustomCasterFPParams
virtual void firePreRenderQueues()
Internal method for firing the queue start event.
virtual void destroyAllBillboardChains(void)
Removes & destroys all BillboardChains from the SceneManager.
Alternative listener class for dealing with IntersectionSceneQuery.
Specialises the SceneQuery class for querying within a plane-bounded volume.
MovableObjectCollection * getMovableObjectCollection(const String &typeName)
Gets the movable object collection for the given type name.
const LightList * manualLightList
Manual light list.
virtual void destroyAllLights(void)
Removes and destroys all lights in the scene.
const CameraList & getCameras() const
Returns a const version of the camera list.
void execute(SceneQueryListener *listener)
See SceneQuery.
virtual SceneNode * createSceneNodeImpl(void)
Subclasses can override this to ensure their specialised SceneNode is used.
virtual Entity * createEntity(const String &entityName, const String &meshName, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
Create an Entity (instance of a discrete mesh).
virtual void checkCachedLightClippingInfo()
virtual void buildScissor(const Light *l, const Camera *cam, RealRect &rect)
Update a scissor rectangle from a single light.
virtual void firePostUpdateSceneGraph(Camera *camera)
Internal method for firing post update scene graph event.
set< LodListener * >::type LodListenerSet
Set of registered LOD listeners.
virtual void addListener(Listener *s)
Add a listener which will get called back on scene manager events.
virtual RibbonTrail * createRibbonTrail()
Create a RibbonTrail, an object which you can use to render a linked chain of billboards which follow...
RenderSystem::RenderSystemContext * rsContext
virtual bool getShowBoundingBoxes() const
Returns if all bounding boxes of scene nodes are to be displayed.
virtual void addSpecialCaseRenderQueue(uint8 qid)
Adds an item to the 'special case' render queue list.
AxisAlignedBox aabb
The axis-aligned bounds of the visible objects.
IlluminationRenderStage mIlluminationStage
const Pass * mUsedPass
Pass that was actually used at the grouping level.
virtual bool isRenderQueueToBeProcessed(uint8 qid)
Returns whether or not the named queue will be rendered based on the current 'special case' render qu...
Class representing colour.
Real mShadowDirLightExtrudeDist
virtual void bindGpuProgram(GpuProgram *prog)
virtual bool hasLight(const String &name) const
Returns whether a light with the given name exists.
const VisibleObjectsBoundsInfo & getShadowCasterBoundsInfo(const Light *light, size_t iteration=0) const
Returns the shadow caster AAB for a specific light-camera combination.
unsigned long mLightClippingInfoMapFrameNumber
Real minDistance
The closest a visible object is to the camera.
virtual void destroySceneNode(const String &name)
Destroys a SceneNode with a given name.
virtual SceneNode * createSceneNode(const String &name)
Creates an instance of a SceneNode with a given name.
virtual bool hasManualObject(const String &name) const
Returns whether a manual object with the given name exists.
AutoParamDataSource * mAutoParamDataSource
Utility class for calculating automatic parameters for gpu programs.
virtual void _findVisibleObjects(Camera *cam, VisibleObjectsBoundsInfo *visibleBounds, bool onlyShadowCasters)
Internal method which parses the scene to find visible objects to render.
virtual void destroyAllManualObjects(void)
Removes & destroys all ManualObjects from the SceneManager.
Alternative listener class for dealing with RaySceneQuery.
virtual const Pass * deriveShadowCasterPass(const Pass *pass)
Internal method for turning a regular pass into a shadow caster pass.
Default implementation of AxisAlignedBoxSceneQuery.
SkyPlaneGenParameters mSkyPlaneGenParameters
const AnimationList & getAnimations() const
Returns a const version of the animation list.
DefaultSphereSceneQuery(SceneManager *creator)
DefaultRaySceneQuery(SceneManager *creator)
SkyDomeGenParameters mSkyDomeGenParameters
vector< InstanceManager * >::type InstanceManagerVec
InstanceManagerVec mDirtyInstanceMgrsTmp
virtual bool getCameraRelativeRendering() const
Get whether to use camera-relative co-ordinates when rendering, ie to always place the camera at the ...
virtual void firePostRenderQueues()
Internal method for firing the queue end event.
virtual void injectMovableObject(MovableObject *m)
Inject a MovableObject instance created externally.
virtual void _updateSceneGraph(Camera *cam)
Internal method for updating the scene graph ie the tree of SceneNode instances managed by this class...
virtual void setShadowTextureFSAA(unsigned short fsaa)
Set the level of multisample AA of the textures used for texture-based shadows.
virtual SceneNode * getSkyDomeNode(void) const
Get the sky dome node, if enabled.
virtual void _renderVisibleObjects(void)
Sends visible objects found in _findVisibleObjects to the rendering engine.
virtual Light * getLight(const String &name) const
Returns a pointer to the named Light which has previously been added to the scene.
virtual Real getShadowDirLightTextureOffset(void) const
Gets the proportional distance which a texture shadow which is generated from a directional light wil...
virtual FogMode getFogMode(void) const
Returns the fog mode for the scene.
virtual void destroyInstanceManager(const String &name)
Destroys an InstanceManager if it was created with createInstanceManager()
void setShadowTextureCountPerLightType(Light::LightTypes type, size_t count)
Set the number of shadow textures a light type uses.
Lowest level collection of renderables.
Abstract class defining the interface all renderable objects must implement.
virtual void setSkyDomeEnabled(bool enable)
Enables / disables a 'sky dome'.
virtual void destroyAnimation(const String &name)
Destroys an Animation.
Allows the rendering of a simple 2D rectangle This class renders a simple 2D rectangle; this rectangl...
virtual BillboardSet * getBillboardSet(const String &name) const
Retrieves a pointer to the named BillboardSet.
virtual void setShadowCasterRenderBackFaces(bool bf)
Sets whether or not shadow casters should be rendered into shadow textures using their back faces rat...
Class defining particle system based special effects.
Represents part of the world geometry that is a result of a SceneQuery.
virtual void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
Render a group with the added complexity of modulative stencil shadows.
void addLodListener(LodListener *listener)
Add a level of detail listener.
virtual void destroyParticleSystem(const String &name)
Removes & destroys a ParticleSystem from the SceneManager.
SceneMgrQueuedRenderableVisitor()
virtual bool hasSceneNode(const String &name) const
Returns whether a scene node with the given name exists.
virtual void resetViewProjMode(bool fixedFunction)
Internal method used by _renderSingleObject to deal with renderables which override the camera's own ...
Real maxDistanceInFrustum
The farthest object in the frustum regardless of visibility / shadow caster flags.
virtual void destroyShadowTextures(void)
Internal method for destroying shadow textures (texture-based shadows)
LodListenerSet mLodListeners
virtual void postUpdateSceneGraph(SceneManager *source, Camera *camera)
Called after updating the scene graph in this SceneManager.
virtual ~SceneManagerFactory()
@ SHADOWDETAILTYPE_TEXTURE
Mask for texture shadows (not for direct use, use SHADOWTYPE_ enum instead)
virtual void prepareWorldGeometry(const String &filename)
Sets the source of the 'world' geometry, i.e.
NameGenerator mMovableNameGenerator
virtual void setDisplaySceneNodes(bool display)
Tells the SceneManager whether it should render the SceneNodes which make up the scene as well as the...
virtual void destroyAllInstanceManagers(void)
GpuProgramParametersSharedPtr mFiniteExtrusionParams
virtual SceneNode * getSceneNode(const String &name) const
Retrieves a named SceneNode from the scene graph.
virtual const String & getTypeName(void) const =0
Retrieve the type name of this scene manager.
virtual InstancedGeometry * getInstancedGeometry(const String &name) const
Retrieve a previously created InstancedGeometry instance.
CameraIterator getCameraIterator(void)
Returns a specialised MapIterator over all cameras in the scene.
static const Quaternion IDENTITY
virtual void destroyAllBillboardSets(void)
Removes & destroys all BillboardSets.
virtual InstancedGeometry * createInstancedGeometry(const String &name)
Creates a InstancedGeometry instance suitable for use with this SceneManager.
map< String, InstancedGeometry * >::type InstancedGeometryList
virtual bool hasCamera(const String &name) const
Returns whether a camera with the given name exists.
Struct containing information about a mesh LOD change event for entities.
GpuProgramParametersSharedPtr mInfiniteExtrusionParams
virtual size_t getShadowIndexBufferSize(void) const
Get the size of the shadow index buffer.
SceneNode * mSkyPlaneNode
virtual void destroyBillboardSet(const String &name)
Removes & destroys an BillboardSet from the SceneManager by name.
virtual MeshPtr createSkydomePlane(BoxPlane bp, Real curvature, Real tiling, Real distance, const Quaternion &orientation, int xsegments, int ysegments, int ySegmentsToKeep, const String &groupName)
vector< EntityMaterialLodChangedEvent >::type EntityMaterialLodChangedEventList
List of entity material LOD changed events.
virtual bool getShadowUseLightClipPlanes() const
Gets whether when using a built-in additive shadow mode, user clip planes should be used to restrict ...
float Real
Software floating point type.
SpecialCaseRenderQueueList mSpecialCaseQueueList
virtual void _notifyAutotrackingSceneNode(SceneNode *node, bool autoTrack)
Internal method for notifying the manager that a SceneNode is autotracking.
vector< PlaneBoundedVolume >::type PlaneBoundedVolumeList
virtual void setCameraRelativeRendering(bool rel)
Set whether to use camera-relative co-ordinates when rendering, ie to always place the camera at the ...
virtual void renderShadowVolumesToStencil(const Light *light, const Camera *cam, bool calcScissor)
Internal method for rendering all the objects for a given light into the stencil buffer.
virtual void _setSkyBox(bool enable, const String &materialName, Real distance=5000, uint8 renderQueue=RENDER_QUEUE_SKIES_EARLY, const Quaternion &orientation=Quaternion::IDENTITY, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Enables / disables a 'sky box' i.e.
virtual void setSpecialCaseRenderQueueMode(SpecialCaseRenderQueueMode mode)
Sets the way the special case render queue list is processed.
String mShadowTextureCustomCasterVertexProgram
@ SHADOWDETAILTYPE_STENCIL
Mask for stencil shadows (not for direct use, use SHADOWTYPE_ enum instead)
virtual bool hasBillboardSet(const String &name) const
Returns whether a billboardset with the given name exists.
SceneMgrQueuedRenderableVisitor * getQueuedRenderableVisitor(void) const
Gets the current visitor object which processes queued renderables.
virtual bool getOptionKeys(StringVector &refKeys)
Method for getting all the implementation-specific options of the scene manager.
Allows the rendering of a chain of connected billboards.
virtual Animation * getAnimation(const String &name) const
Looks up an Animation object previously created with createAnimation.
virtual RenderQueue * getRenderQueue(void)
Retrieves the internal render queue, for advanced users only.
virtual void setWorldGeometryRenderQueue(uint8 qid)
Sets the render queue that the world geometry (if any) this SceneManager renders will be associated w...
virtual void updateRenderQueueGroupSplitOptions(RenderQueueGroup *group, bool suppressShadows, bool suppressRenderState)
Update the state of the render queue group splitting based on a shadow option change.
virtual Real getShadowDirectionalLightExtrusionDistance(void) const
Gets the distance a shadow volume is extruded for a directional light.
Real mShadowTextureFadeStart
Proportion of texture offset in view direction e.g. 0.4.
vector< Camera * >::type ShadowTextureCameraList
virtual void setShadowTextureConfig(size_t shadowIndex, const ShadowTextureConfig &config)
Set the detailed configuration for a shadow texture.
virtual void updateGpuProgramParameters(const Pass *p)
void setQueuedRenderableVisitor(SceneMgrQueuedRenderableVisitor *visitor)
Advanced method for supplying an alternative visitor, used for parsing the render queues and sending ...
virtual bool isShadowTechniqueIntegrated(void) const
Is the shadow technique integrated into primary materials?
Cached light information, used to tracking light's changes.
virtual void clearScene(void)
Empties the entire scene, inluding all SceneNodes, Entities, Lights, BillboardSets etc.
virtual void prepareRenderQueue(void)
Internal method for preparing the render queue for use with each render.
virtual 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)
size_t mShadowIndexBufferSize
void renderShadowVolumeObjects(ShadowCaster::ShadowRenderableListIterator iShadowRenderables, Pass *pass, const LightList *manualLightList, unsigned long flags, bool secondpass, bool zfail, bool twosided)
Render a set of shadow renderables.
ulong mLightsDirtyCounter
CamVisibleObjectsMap mCamVisibleObjectsMap
virtual void buildLightClip(const Light *l, PlaneList &planes)
virtual const RealRect & getLightScissorRect(Light *l, const Camera *cam)
Retrieve a scissor rectangle for a given light and camera.
virtual void destroyCamera(const String &name)
Removes a camera from the scene.
virtual bool isShadowTechniqueStencilBased(void) const
Is there a stencil shadow based shadowing technique in use?
~DefaultAxisAlignedBoxSceneQuery()
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator,...
void _addDirtyInstanceManager(InstanceManager *dirtyManager)
Called by an InstanceManager when it has at least one InstanceBatch that needs their bounds to be upd...
virtual uint8 getWorldGeometryRenderQueue(void)
Gets the render queue that the world geometry (if any) this SceneManager renders will be associated w...
virtual bool getOptionValues(const String &strKey, StringVector &refValueList)
Method for getting all possible values for a specific option.
Pass * mShadowTextureCustomCasterPass
Representation of a ray in space, i.e.
virtual SpecialCaseRenderQueueMode getSpecialCaseRenderQueueMode(void)
Gets the way the special case render queue list is processed.
virtual ManualObject * createManualObject(const String &name)
Create a ManualObject, an object which you populate with geometry manually through a GL immediate-mod...
virtual void _renderQueueGroupObjects(RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
Render the objects in a given queue group.
virtual void setSkyDome(bool enable, const String &materialName, Real curvature=10, Real tiling=8, Real distance=4000, bool drawFirst=true, const Quaternion &orientation=Quaternion::IDENTITY, int xsegments=16, int ysegments=16, int ysegments_keep=-1, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Enables / disables a 'sky dome' i.e.
~SceneMgrQueuedRenderableVisitor()
Texture * mCurrentShadowTexture
virtual void _setSkyDome(bool enable, const String &materialName, Real curvature=10, Real tiling=8, Real distance=4000, uint8 renderQueue=RENDER_QUEUE_SKIES_EARLY, const Quaternion &orientation=Quaternion::IDENTITY, int xsegments=16, int ysegments=16, int ysegments_keep=-1, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Enables / disables a 'sky dome' i.e.
void removeLodListener(LodListener *listener)
Remove a level of detail listener.
CompositorChain * activeChain
@ SHADOWDETAILTYPE_INTEGRATED
Mask for integrated shadows (not for direct use, use SHADOWTYPE_ enum instead)
bool mShadowCasterRenderBackFaces
Real mShadowTextureOffset
Structure for holding a position & orientation pair.
CullingMode mPassCullingMode
virtual AnimationState * createAnimationState(const String &animName)
Create an AnimationState object for managing application of animations.
Default sorting routine which sorts lights which cast shadows to the front of a list,...
virtual BillboardChain * getBillboardChain(const String &name) const
Retrieves a pointer to the named BillboardChain.
virtual void renderObjects(const QueuedRenderableCollection &objs, QueuedRenderableCollection::OrganisationMode om, bool lightScissoringClipping, bool doLightIteration, const LightList *manualLightList=0)
Render a set of objects, see renderSingleObject for param definitions.
virtual bool hasAnimationState(const String &name) const
Returns whether an animation state with the given name exists.
virtual bool _areRenderStateChangesSuppressed(void) const
Are render state changes suppressed?
AnimationStateIterator getAnimationStateIterator(void)
Get an iterator over all the animation states in this set.
LightInfoList mTestLightInfos
@ PF_X8R8G8B8
32-bit pixel format, 8 bits for red, 8 bits for green, 8 bits for blue like PF_A8R8G8B8,...
virtual bool getDisplaySceneNodes(void) const
Returns true if all scene nodes axis are to be displayed.
virtual void resetLightClip()
String mShadowTextureCustomReceiverVertexProgram
virtual SceneNode * createSceneNode(void)
Creates an instance of a SceneNode.
virtual const SkyPlaneGenParameters & getSkyPlaneGenParameters(void) const
Get the parameters used to construct the SkyPlane, if any.
void visit(Renderable *r)
Visit method called once per Renderable on a grouped collection.
uint32 mLastLightHash
Last light sets.
Viewport * getCurrentViewport(void) const
Gets the current viewport being rendered (advanced use only, only valid during viewport update.
const PlaneBoundedVolumeList * mLightClipVolumeList
virtual const TexturePtr & getShadowTexture(size_t shadowIndex)
Get a reference to the shadow texture currently in use at the given index.
vector< Plane >::type PlaneList
virtual void shadowTextureReceiverPreViewProj(Light *light, Frustum *frustum)
This event occurs just before the view & projection matrices are set for re-rendering a shadow receiv...
AnimationStateIterator getAnimationStateIterator(void)
Returns a specialised MapIterator over all animation states in the scene.
@ SHADOWDETAILTYPE_MODULATIVE
Mask for modulative shadows (not for direct use, use SHADOWTYPE_ enum instead)
Standard 3-dimensional vector.
virtual bool hasStaticGeometry(const String &name) const
Returns whether a static geometry instance with the given name exists.
virtual StaticGeometry * getStaticGeometry(const String &name) const
Retrieve a previously created StaticGeometry instance.
TexturePtr mNullShadowTexture
'New' rendering operation using vertex buffers.
void _notifyEntityMeshLodChanged(EntityMeshLodChangedEvent &evt)
Notify that an entity mesh LOD change event has occurred.
virtual BillboardChain * createBillboardChain(const String &name)
Create a BillboardChain, an object which you can use to render a linked chain of billboards.
virtual void _markGpuParamsDirty(uint16 mask)
Method to allow you to mark gpu parameters as dirty, causing them to be updated according to the mask...
vector< MovableObjectLodChangedEvent >::type MovableObjectLodChangedEventList
List of movable object LOD changed events.
virtual void destroyBillboardChain(BillboardChain *obj)
Removes & destroys a BillboardChain from the SceneManager.
virtual void manualRender(Renderable *rend, const Pass *pass, Viewport *vp, const Matrix4 &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.
map< String, StaticGeometry * >::type StaticGeometryList
virtual void renderTextureShadowReceiverQueueGroupObjects(RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
Render a group rendering only shadow receivers.
ConstShadowTextureConfigIterator getShadowTextureConfigIterator() const
Get an iterator over the current shadow texture settings.
virtual void setShadowTexturePixelFormat(PixelFormat fmt)
Set the pixel format of the textures used for texture-based shadows.
map< String, Camera * >::type CameraList
Concrete IteratorWrapper for const access to the underlying container.
bool mShadowUseInfiniteFarPlane
Class to manage the scene object rendering queue.
Struct associating a single Pass with a single Renderable.
virtual void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup *group, QueuedRenderableCollection::OrganisationMode om)
Render a group with the added complexity of additive stencil shadows.
virtual void extractMovableObject(const String &name, const String &typeName)
Extract a previously injected MovableObject.
virtual void setNormaliseNormalsOnScale(bool n)
Set whether to automatically normalise normals on objects whenever they are scaled.
Vector3 mCameraRelativePosition
virtual void setShadowTextureConfig(size_t shadowIndex, unsigned short width, unsigned short height, PixelFormat format, unsigned short fsaa=0, uint16 depthBufferPoolId=1)
Set the detailed configuration for a shadow texture.
Pass * mShadowReceiverPass
A pass designed to let us render shadow receivers for texture shadows.
virtual SceneNode * getRootSceneNode(void)
Gets the SceneNode at the root of the scene hierarchy.
virtual ParticleSystem * createParticleSystem(const String &name, size_t quota=500, const String &resourceGroup=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Create a blank particle system.
virtual void initRenderQueue(void)
Internal method for initialising the render queue.
virtual void destroyBillboardChain(const String &name)
Removes & destroys a BillboardChain from the SceneManager.
map< String, InstanceManager * >::type InstanceManagerMap
Struct for caching light clipping information for re-use in a frame.
virtual bool getShowDebugShadows(void) const
Are debug shadows shown?
virtual size_t estimateWorldGeometry(DataStreamPtr &stream, const String &typeName=StringUtil::BLANK)
Estimate the number of loading stages required to load the named world geometry.
virtual void setShadowTextureSelfShadow(bool selfShadow)
Sets whether or not texture shadows should attempt to self-shadow.
virtual void prepareWorldGeometry(DataStreamPtr &stream, const String &typeName=StringUtil::BLANK)
Sets the source of the 'world' geometry, i.e.
virtual bool getOption(const String &strKey, void *pDestValue)
Method for getting the value of an implementation-specific Scene Manager option.
bool mDisplayNodes
Flag indicating whether SceneNodes will be rendered as a set of 3 axes.
EntityMeshLodChangedEventList mEntityMeshLodChangedEvents
MovableObjectLodChangedEventList mMovableObjectLodChangedEvents
size_t mShadowIndexBufferUsedSize
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.