Go to the documentation of this file.
30 #ifndef __SceneManager_H__
31 #define __SceneManager_H__
104 const Camera* cam,
bool receiver=
true);
108 void mergeNonRenderedButInFrustum(
const AxisAlignedBox& boxBounds,
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) {}
367 bool visit(
const Pass* p);
388 virtual SceneNode* createSceneNodeImpl(
void);
505 size_t mShadowTextureCountPerType[3];
521 return light == rhs.
light && type == rhs.
type &&
527 return !(*
this == rhs);
566 virtual void initRenderQueue(
void);
580 virtual const Pass* deriveShadowCasterPass(
const Pass* pass);
589 virtual const Pass* deriveShadowReceiverPass(
const Pass* pass);
597 virtual bool validatePassForRendering(
const Pass* pass);
605 virtual bool validateRenderableForRendering(
const Pass* pass,
const Renderable* rend);
619 virtual MeshPtr createSkyboxPlane(
627 virtual MeshPtr createSkydomePlane(
631 int xsegments,
int ysegments,
int ySegmentsToKeep,
646 virtual void useRenderableViewProjMode(
const Renderable* pRend,
bool fixedFunction);
650 virtual void resetViewProjMode(
bool fixedFunction);
660 virtual void firePreRenderQueues();
662 virtual void firePostRenderQueues();
664 virtual bool fireRenderQueueStarted(
uint8 id,
const String& invocation);
666 virtual bool fireRenderQueueEnded(
uint8 id,
const String& invocation);
669 const LightList* pLightList,
bool suppressRenderStateChanges);
672 virtual void fireShadowTexturesUpdated(
size_t numberOfShadowTextures);
674 virtual void fireShadowTexturesPreCaster(
Light* light,
Camera* camera,
size_t iteration);
676 virtual void fireShadowTexturesPreReceiver(
Light* light,
Frustum* f);
678 virtual void firePreUpdateSceneGraph(
Camera* camera);
680 virtual void firePostUpdateSceneGraph(
Camera* camera);
682 virtual void firePreFindVisibleObjects(
Viewport* v);
684 virtual void firePostFindVisibleObjects(
Viewport* v);
686 virtual void fireSceneManagerDestroyed();
688 virtual void setViewport(
Viewport *vp);
694 virtual void renderVisibleObjectsDefaultSequence(
void);
698 virtual void prepareRenderQueue(
void);
716 virtual void renderSingleObject(
Renderable* rend,
const Pass* pass,
717 bool lightScissoringClipping,
bool doLightIteration,
const LightList* manualLightList = 0);
791 virtual void findLightsAffectingFrustum(
const Camera* camera);
793 virtual void initShadowVolumeMaterials(
void);
795 virtual void ensureShadowTexturesCreated();
797 virtual void destroyShadowTextures(
void);
804 void updateDirtyInstanceManagers(
void);
839 virtual void renderShadowVolumesToStencil(
const Light* light,
const Camera* cam,
846 virtual void setShadowVolumeStencilState(
bool secondpass,
bool zfail,
bool twosided);
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;
931 virtual void renderAdditiveStencilShadowedQueueGroupObjects(
RenderQueueGroup* group,
934 virtual void renderModulativeStencilShadowedQueueGroupObjects(
RenderQueueGroup* group,
937 virtual void renderTextureShadowCasterQueueGroupObjects(
RenderQueueGroup* group,
940 virtual void renderTextureShadowReceiverQueueGroupObjects(
RenderQueueGroup* group,
943 virtual void renderModulativeTextureShadowedQueueGroupObjects(
RenderQueueGroup* group,
947 virtual void renderAdditiveTextureShadowedQueueGroupObjects(
RenderQueueGroup* group,
952 bool doLightIteration,
const LightList* manualLightList = 0);
960 bool doLightIteration,
const LightList* manualLightList = 0);
964 virtual void updateRenderQueueSplitOptions(
void);
968 bool suppressShadows,
bool suppressRenderState);
974 virtual void resetScissor();
978 virtual void resetLightClip();
979 virtual void checkCachedLightClippingInfo();
998 virtual void useLights(
const LightList& lights,
unsigned short limit);
999 virtual void setViewMatrix(
const Matrix4& m);
1000 virtual void useLightsGpuProgram(
const Pass* pass,
const LightList* lights);
1001 virtual void bindGpuProgram(
GpuProgram* prog);
1002 virtual void updateGpuProgramParameters(
const Pass* p);
1073 virtual const String& getTypeName(
void)
const = 0;
1091 virtual bool hasCamera(
const String& name)
const;
1101 virtual void destroyCamera(
Camera *cam);
1108 virtual void destroyCamera(
const String& name);
1118 virtual void destroyAllCameras(
void);
1133 virtual Light* createLight();
1138 virtual Light* getLight(
const String& name)
const;
1142 virtual bool hasLight(
const String& name)
const;
1156 virtual void destroyLight(
const String& name);
1162 virtual void destroyLight(
Light* light);
1165 virtual void destroyAllLights(
void);
1177 virtual void _notifyLightsDirty(
void);
1199 virtual const LightList& _getLightsAffectingFrustum(
void)
const;
1271 virtual SceneNode* createSceneNode(
void);
1295 virtual void destroySceneNode(
const String& name);
1303 virtual void destroySceneNode(
SceneNode* sn);
1319 virtual SceneNode* getRootSceneNode(
void);
1332 virtual bool hasSceneNode(
const String& name)
const;
1383 virtual Entity* createEntity(
const String& entityName, PrefabType ptype);
1388 virtual Entity* createEntity(PrefabType ptype);
1395 virtual bool hasEntity(
const String& name)
const;
1405 virtual void destroyEntity(
Entity* ent);
1415 virtual void destroyEntity(
const String& name);
1426 virtual void destroyAllEntities(
void);
1444 virtual bool hasManualObject(
const String& name)
const;
1451 virtual void destroyManualObject(
const String& name);
1454 virtual void destroyAllManualObjects(
void);
1471 virtual bool hasBillboardChain(
const String& name)
const;
1478 virtual void destroyBillboardChain(
const String& name);
1481 virtual void destroyAllBillboardChains(
void);
1498 virtual bool hasRibbonTrail(
const String& name)
const;
1502 virtual void destroyRibbonTrail(
RibbonTrail* obj);
1505 virtual void destroyRibbonTrail(
const String& name);
1508 virtual void destroyAllRibbonTrails(
void);
1531 const String& templateName);
1580 virtual bool hasParticleSystem(
const String& name)
const;
1587 virtual void destroyParticleSystem(
const String& name);
1590 virtual void destroyAllParticleSystems(
void);
1597 virtual void clearScene(
void);
1632 virtual void prepareWorldGeometry(
const String& filename);
1666 virtual void setWorldGeometry(
const String& filename);
1699 { (void)filename;
return 0; }
1715 { (void)stream; (void)typeName;
return 0; }
1731 virtual ViewPoint getSuggestedViewpoint(
bool random =
false);
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; }
1811 virtual void _updateSceneGraph(
Camera* cam);
1830 virtual void _applySceneAnimations(
void);
1834 virtual void _renderVisibleObjects(
void);
1849 virtual void _renderScene(
Camera* camera,
Viewport* vp,
bool includeOverlays);
1854 virtual void _queueSkiesForRendering(
Camera* cam);
1866 virtual void _setDestinationRenderSystem(
RenderSystem* sys);
1921 virtual void setSkyPlane(
1924 Real tiling = 10,
bool drawFirst =
true,
Real bow = 0,
1925 int xsegments = 1,
int ysegments = 1,
1970 virtual void _setSkyPlane(
1974 int xsegments = 1,
int ysegments = 1,
2030 virtual void setSkyBox(
2031 bool enable,
const String& materialName,
Real distance = 5000,
2067 virtual void _setSkyBox(
2068 bool enable,
const String& materialName,
Real distance = 5000,
2139 virtual void setSkyDome(
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,
2192 virtual void _setSkyDome(
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);
2241 virtual FogMode getFogMode(
void)
const;
2245 virtual const ColourValue& getFogColour(
void)
const;
2249 virtual Real getFogStart(
void)
const;
2253 virtual Real getFogEnd(
void)
const;
2257 virtual Real getFogDensity(
void)
const;
2277 virtual BillboardSet* createBillboardSet(
const String& name,
unsigned int poolSize = 20);
2285 virtual BillboardSet* createBillboardSet(
unsigned int poolSize = 20);
2292 virtual bool hasBillboardSet(
const String& name)
const;
2308 virtual void destroyBillboardSet(
const String& name);
2319 virtual void destroyAllBillboardSets(
void);
2328 virtual void setDisplaySceneNodes(
bool display);
2360 virtual bool hasAnimation(
const String& name)
const;
2367 virtual void destroyAnimation(
const String& name);
2370 virtual void destroyAllAnimations(
void);
2407 virtual bool hasAnimationState(
const String& name)
const;
2414 virtual void destroyAnimationState(
const String& name);
2417 virtual void destroyAllAnimationStates(
void);
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);
2508 virtual void addSpecialCaseRenderQueue(
uint8 qid);
2514 virtual void removeSpecialCaseRenderQueue(
uint8 qid);
2518 virtual void clearSpecialCaseRenderQueues(
void);
2523 virtual void setSpecialCaseRenderQueueMode(SpecialCaseRenderQueueMode mode);
2525 virtual SpecialCaseRenderQueueMode getSpecialCaseRenderQueueMode(
void);
2532 virtual bool isRenderQueueToBeProcessed(
uint8 qid);
2549 virtual void setWorldGeometryRenderQueue(
uint8 qid);
2560 virtual uint8 getWorldGeometryRenderQueue(
void);
2563 virtual void showBoundingBoxes(
bool bShow);
2566 virtual bool getShowBoundingBoxes()
const;
2569 virtual void _notifyAutotrackingSceneNode(
SceneNode* node,
bool autoTrack);
2599 createSphereQuery(
const Sphere& sphere,
uint32 mask = 0xFFFFFFFF);
2629 createRayQuery(
const Ray& ray,
uint32 mask = 0xFFFFFFFF);
2643 createIntersectionQuery(
uint32 mask = 0xFFFFFFFF);
2646 virtual void destroyQuery(
SceneQuery* query);
2719 virtual void setShadowColour(
const ColourValue& colour);
2726 virtual const ColourValue& getShadowColour(
void)
const;
2738 virtual void setShadowDirectionalLightExtrusionDistance(
Real dist);
2741 virtual Real getShadowDirectionalLightExtrusionDistance(
void)
const;
2758 virtual void setShadowFarDistance(
Real distance);
2763 {
return mDefaultShadowFarDist; }
2765 {
return mDefaultShadowFarDistSquared; }
2792 virtual void setShadowIndexBufferSize(
size_t size);
2795 {
return mShadowIndexBufferSize; }
2804 virtual void setShadowTextureSize(
unsigned short size);
2815 virtual void setShadowTextureConfig(
size_t shadowIndex,
unsigned short width,
2816 unsigned short height,
PixelFormat format,
unsigned short fsaa = 0,
uint16 depthBufferPoolId=1);
2822 virtual void setShadowTextureConfig(
size_t shadowIndex,
2839 virtual void setShadowTexturePixelFormat(
PixelFormat fmt);
2846 virtual void setShadowTextureFSAA(
unsigned short fsaa);
2855 virtual void setShadowTextureCount(
size_t count);
2869 { mShadowTextureCountPerType[type] = count; }
2872 {
return mShadowTextureCountPerType[type]; }
2881 virtual void setShadowTextureSettings(
unsigned short size,
unsigned short count,
2890 virtual const TexturePtr& getShadowTexture(
size_t shadowIndex);
2919 { mShadowTextureFadeStart = fadeStart; }
2928 { mShadowTextureFadeEnd = fadeEnd; }
2942 virtual void setShadowTextureSelfShadow(
bool selfShadow);
2946 {
return mShadowTextureSelfShadow; }
2967 virtual void setShadowTextureCasterMaterial(
const String& name);
2989 virtual void setShadowTextureReceiverMaterial(
const String& name);
3057 mShadowUseInfiniteFarPlane = enable; }
3107 virtual void addListener(Listener* s);
3110 virtual void removeListener(Listener* s);
3127 virtual bool hasStaticGeometry(
const String& name)
const;
3131 virtual void destroyStaticGeometry(
const String& name);
3133 virtual void destroyAllStaticGeometry(
void);
3150 virtual void destroyInstancedGeometry(
const String& name);
3152 virtual void destroyAllInstancedGeometry(
void);
3175 size_t numInstancesPerBatch,
uint16 flags=0,
3176 unsigned short subMeshIdx=0 );
3184 virtual bool hasInstanceManager(
const String &managerName )
const;
3192 virtual void destroyInstanceManager(
const String &name );
3193 virtual void destroyInstanceManager(
InstanceManager *instanceManager );
3195 virtual void destroyAllInstanceManagers(
void);
3209 virtual size_t getNumInstancesPerBatch(
const String &meshName,
const String &groupName,
3210 const String &materialName,
3212 size_t numInstancesPerBatch,
uint16 flags=0,
3213 unsigned short subMeshIdx=0 );
3227 const String &managerName );
3233 virtual void destroyInstancedEntity(
InstancedEntity *instancedEntity );
3268 virtual void destroyMovableObject(
const String& name,
const String& typeName);
3276 virtual void destroyAllMovableObjectsByType(
const String& typeName);
3278 virtual void destroyAllMovableObjects(
void);
3284 virtual bool hasMovableObject(
const String& name,
const String& typeName)
const;
3310 virtual void extractMovableObject(
const String& name,
const String& typeName);
3324 virtual void extractAllMovableObjectsByType(
const String& typeName);
3342 uint32 _getCombinedVisibilityMask(
void)
const;
3392 virtual void _injectRenderWithPass(
Pass *pass,
Renderable *rend,
bool shadowDerivation =
true,
3393 bool doLightIteration =
false,
const LightList* manualLightList = 0);
3413 virtual void _suppressRenderStateChanges(
bool suppress);
3419 {
return mSuppressRenderStateChanges; }
3433 virtual const Pass* _setPass(
const Pass* pass,
3434 bool evenIfSuppressed =
false,
bool shadowDerivation =
true);
3443 virtual void _markGpuParamsDirty(
uint16 mask);
3455 virtual void _suppressShadows(
bool suppress);
3461 {
return mSuppressShadows; }
3484 void setQueuedRenderableVisitor(SceneMgrQueuedRenderableVisitor* visitor);
3487 SceneMgrQueuedRenderableVisitor* getQueuedRenderableVisitor(
void)
const;
3547 void _handleLodEvents();
3643 virtual void initMetaData(
void)
const = 0;
3653 mMetaDataInit =
false;
3663 virtual void destroyInstance(
SceneManager* instance) = 0;
MapIterator< MovableObjectMap > MovableObjectIterator
Comparator for material map, for sorting materials into render order (e.g.
ShadowCasterSceneQueryListener * mShadowCasterQueryListener
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.
unsigned long clipPlanesValid
virtual bool isShadowTechniqueModulative(void) const
Is there a modulative shadowing technique in use?
EntityMaterialLodChangedEventList mEntityMaterialLodChangedEvents
Abstract class representing a Texture resource.
Pass * mShadowCasterPlainBlackPass
A pass designed to let us render shadow colour on white for texture shadows.
SkyBoxGenParameters mSkyBoxGenParameters
InstanceManagerVec mDirtyInstanceManagers
Viewport * mCurrentViewport
Current Viewport.
ShadowCamLightMapping mShadowCamLightMapping
LightList mShadowTextureCurrentCasterLightList
This utility class is used to hold the information used to generate the matrices and other informatio...
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
Defines the functionality of a 3D API.
A grouping level underneath RenderQueue which groups renderables to be issued at coarsely the same ti...
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
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
IlluminationRenderStage
Describes the stage of rendering when performing complex illumination.
Defines a plane in 3D space.
LightList mLightsAffectingFrustum
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 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...
LightTypes
Defines the type of light.
A viewpoint from which the scene will be rendered.
ulong _getLightsDirtyCounter(void) const
Advance method to gets the lights dirty counter.
void prepare(bool lightInFrustum, const PlaneBoundedVolumeList *lightClipVolumes, const Light *light, const Camera *cam, ShadowCasterList *casterList, Real farDistSquared)
StaticGeometryList mStaticGeometryList
Chain of compositor effects applying to one viewport.
AnimationStateSet mAnimationStates
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 getShadowTextureSelfShadow(void) const
Gets whether or not texture shadows attempt to self-shadow.
String mShadowTextureCustomReceiverFragmentProgram
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
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.
vector< String >::type StringVector
virtual Real getShadowFarDistanceSquared(void) const
bool autoLights
Automatic light handling?
ShadowCasterList * mCasterList
vector< RenderObjectListener * >::type RenderObjectListenerList
RenderQueue * renderQueue
Specialises the SceneQuery class for querying within a sphere.
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.
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.
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 bool isSkyBoxEnabled(void) const
Return whether a skybox is enabled.
Default implementation of IntersectionSceneQuery.
virtual void shadowTexturesUpdated(size_t numberOfShadowTextures)
Event raised after all shadow textures have been rendered into for all queues / targets but before an...
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.
Class encapsulates rendering properties of an object.
ShadowCasterList mShadowCasterList
PrefabType
Prefab shapes available without loading a model.
Abstract class defining a movable object in a scene.
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.
Shared pointer implementation used to share index buffers.
ShadowTextureList mShadowTextures
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
Separate SceneQuery class to query for pairs of objects which are possibly intersecting one another.
LightClippingInfoMap mLightClippingInfoMap
Class providing a much simplified interface to generating manual objects with custom geometry.
MapIterator< AnimationList > AnimationIterator
const String & getName(void) const
Return the instance name of this SceneManager.
MapIterator< CameraList > CameraIterator
static uint32 FRUSTUM_TYPE_MASK
Query type mask which will be used for frusta and cameras.
Default implementation of SphereSceneQuery.
A collection of billboards (faces which are always facing the given direction) with the same (default...
CompositorChain * mActiveCompositorChain
Quaternion mSkyBoxOrientation
vector< LightInfo >::type LightInfoList
Specialises the SceneQuery class for querying within an axis aligned box.
bool mNormaliseNormalsOnScale
Pre-transforms and batches up meshes for efficient use as static geometry in a scene.
uint16 SceneTypeMask
Bitmask containing scene types.
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
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.
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
virtual bool getShadowCasterRenderBackFaces() const
Gets whether or not shadow casters should be rendered into shadow textures using their back faces rat...
Class which will create instances of a given SceneManager.
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
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.
ManualObject * mSkyBoxObj
Represents the state of an animation and the weight of its influence.
Class representing a node in the scene graph.
static uint32 FX_TYPE_MASK
Query type mask which will be used for effects like billboardsets / particle systems.
virtual void setShadowDirLightTextureOffset(Real offset)
Sets the proportional distance which a texture shadow which is generated from a directional light wil...
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
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.
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator,...
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.
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.
vector< Listener * >::type ListenerList
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.
ShadowTechnique mShadowTechnique
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.
Struct containing information about a material LOD change event for entities.
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.
Render only the queues in the special case list.
bool mLateMaterialResolving
uint8 mWorldGeometryRenderQueue
bool mLastRenderQueueInvocationCustom
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.
Real mShadowTextureFadeEnd
As a proportion e.g. 0.6.
vector< EntityMeshLodChangedEvent >::type EntityMeshLodChangedEventList
List of entity mesh LOD changed events.
Rectangle2D * mFullScreenQuad
Class to hold a linear sequence of RenderQueueInvocation objects.
Camera * mCameraInProgress
Camera in progress.
An abstraction of a viewport, i.e.
int skyDomeYSegments_keep
virtual const SkyBoxGenParameters & getSkyBoxGenParameters(void) const
Get the parameters used to generate the current SkyBox, if any.
size_t getShadowTextureCountPerLightType(Light::LightTypes type) const
Get the number of shadow textures is assigned for the given light type.
InstanceManagerMap mInstanceManagerMap
RenderObjectListenerList mRenderObjectListeners
String mShadowTextureCustomCasterFragmentProgram
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.
First queue (after backgrounds), used for skyboxes if rendered first.
SphereSceneQuery * mShadowCasterSphereQuery
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
unsigned short mLastLightLimit
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
uint16 mGpuParamsDirty
Gpu params that need rebinding (mask of GpuParamVariability)
unsigned long mLastFrameNumber
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 bool hasOption(const String &strKey) const
Method for verifying whether the scene manager has an implementation-specific option.
No special illumination stage.
A 3D box aligned with the x/y/z axes.
bool mShadowTextureConfigDirty
AxisAlignedBoxSceneQuery * mShadowCasterAABBQuery
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.
int type
Just a pointer for comparison, the light might destroyed for some reason.
CullingMode
Hardware culling modes based on vertex winding.
Real mDefaultShadowFarDist
bool mSuppressRenderStateChanges
Suppress render state changes?
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.
ColourValue mAmbientLight
Current ambient light, cached for RenderSystem.
IlluminationRenderStage _getCurrentRenderStage()
virtual void setShadowTextureFadeStart(Real fadeStart)
Sets the proportional distance at which texture shadows begin to fade out.
static uint32 USER_TYPE_MASK_LIMIT
User type mask limit.
virtual bool isLateMaterialResolving() const
Gets whether using late material resolving or not.
SpecialCaseRenderQueueMode
Enumeration of the possible modes allowed for processing the special case render queue list.
Mask for additive shadows (not for direct use, use SHADOWTYPE_ enum instead)
map< String, MovableObject * >::type MovableObjectMap
A sphere primitive, mostly used for bounds checking.
virtual CompositorChain * _getActiveCompositorChain() const
Gets the active compositor chain of the current scene being rendered.
static const ColourValue White
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
vector< ShadowTextureConfig >::type ShadowTextureConfigList
map< const Camera *, VisibleObjectsBoundsInfo >::type CamVisibleObjectsMap
Visible objects bounding box list.
Render to texture stage, used for texture based shadows.
ShadowTextureConfigList mShadowTextureConfigList
virtual void preFindVisibleObjects(SceneManager *source, IlluminationRenderStage irs, Viewport *v)
Called prior to searching for visible objects in this SceneManager.
A interface class defining a listener which can be used to receive notifications of LOD events.
uint32 lightMask
Sets to zero if directional light.
Pass * mShadowStencilPass
ShadowCameraSetupPtr mDefaultShadowCameraSetup
default shadow camera setup
RenderQueueListenerList mRenderQueueListeners
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.
Default implementation of PlaneBoundedVolumeListSceneQuery.
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 bool isSkyPlaneEnabled(void) const
Return whether a key plane is enabled.
bool mFlipCullingOnNegativeScale
GpuProgramParametersSharedPtr mShadowTextureCustomCasterFPParams
Alternative listener class for dealing with IntersectionSceneQuery.
Specialises the SceneQuery class for querying within a plane-bounded volume.
const LightList * manualLightList
Manual light list.
const CameraList & getCameras() const
Returns a const version of the camera list.
set< LodListener * >::type LodListenerSet
Set of registered LOD listeners.
RenderSystem::RenderSystemContext * rsContext
AxisAlignedBox aabb
The axis-aligned bounds of the visible objects.
IlluminationRenderStage mIlluminationStage
const Pass * mUsedPass
Pass that was actually used at the grouping level.
Class representing colour.
Real mShadowDirLightExtrudeDist
unsigned long mLightClippingInfoMapFrameNumber
Real minDistance
The closest a visible object is to the camera.
AutoParamDataSource * mAutoParamDataSource
Utility class for calculating automatic parameters for gpu programs.
Alternative listener class for dealing with RaySceneQuery.
Default implementation of AxisAlignedBoxSceneQuery.
SkyPlaneGenParameters mSkyPlaneGenParameters
const AnimationList & getAnimations() const
Returns a const version of the animation list.
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 SceneNode * getSkyDomeNode(void) const
Get the sky dome node, if enabled.
virtual Real getShadowDirLightTextureOffset(void) const
Gets the proportional distance which a texture shadow which is generated from a directional light wil...
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'.
Allows the rendering of a simple 2D rectangle This class renders a simple 2D rectangle; this rectangl...
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.
SceneMgrQueuedRenderableVisitor()
Real maxDistanceInFrustum
The farthest object in the frustum regardless of visibility / shadow caster flags.
LodListenerSet mLodListeners
virtual void postUpdateSceneGraph(SceneManager *source, Camera *camera)
Called after updating the scene graph in this SceneManager.
virtual ~SceneManagerFactory()
Mask for texture shadows (not for direct use, use SHADOWTYPE_ enum instead)
NameGenerator mMovableNameGenerator
GpuProgramParametersSharedPtr mFiniteExtrusionParams
CameraIterator getCameraIterator(void)
Returns a specialised MapIterator over all cameras in the scene.
static const Quaternion IDENTITY
map< String, InstancedGeometry * >::type InstancedGeometryList
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
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
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 ...
String mShadowTextureCustomCasterVertexProgram
Mask for stencil shadows (not for direct use, use SHADOWTYPE_ enum instead)
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.
Real mShadowTextureFadeStart
Proportion of texture offset in view direction e.g. 0.4.
vector< Camera * >::type ShadowTextureCameraList
virtual bool isShadowTechniqueIntegrated(void) const
Is the shadow technique integrated into primary materials?
Cached light information, used to tracking light's changes.
size_t mShadowIndexBufferSize
ulong mLightsDirtyCounter
CamVisibleObjectsMap mCamVisibleObjectsMap
virtual bool isShadowTechniqueStencilBased(void) const
Is there a stencil shadow based shadowing technique in use?
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator,...
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.
~SceneMgrQueuedRenderableVisitor()
Texture * mCurrentShadowTexture
CompositorChain * activeChain
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
Default sorting routine which sorts lights which cast shadows to the front of a list,...
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
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.
String mShadowTextureCustomReceiverVertexProgram
virtual const SkyPlaneGenParameters & getSkyPlaneGenParameters(void) const
Get the parameters used to construct the SkyPlane, if any.
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
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.
Mask for modulative shadows (not for direct use, use SHADOWTYPE_ enum instead)
Standard 3-dimensional vector.
TexturePtr mNullShadowTexture
'New' rendering operation using vertex buffers.
vector< MovableObjectLodChangedEvent >::type MovableObjectLodChangedEventList
List of movable object LOD changed events.
map< String, StaticGeometry * >::type StaticGeometryList
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 setNormaliseNormalsOnScale(bool n)
Set whether to automatically normalise normals on objects whenever they are scaled.
Vector3 mCameraRelativePosition
Pass * mShadowReceiverPass
A pass designed to let us render shadow receivers for texture shadows.
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 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.