1. Listener
virtual void
addListener (Listener *s)
Add a listener which will get called back on scene manager events.
Listener借口提供的功能
Public Member Functions
virtual void
preFindVisibleObjects (SceneManager *source, IlluminationRenderStage irs, Viewport *v)
Called prior to searching for visible objects in this SceneManager.
virtual void
postFindVisibleObjects (SceneManager *source, IlluminationRenderStage irs, Viewport *v)
Called after searching for visible objects in this SceneManager.
virtual void
shadowTexturesUpdated (size_t numberOfShadowTextures)
Event raised after all shadow textures have been rendered into for all queues / targets but before any other geometry has been rendered (including main scene geometry and any additional shadow receiver passes).
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 texture.
virtual void
shadowTextureReceiverPreViewProj (Light *light, Frustum *frustum)
This event occurs just before the view & projection matrices are set for re-rendering a shadow receiver.
virtual bool
sortLightsAffectingFrustum (LightList &lightList)
Hook to allow the listener to override the ordering of lights for the entire frustum.
virtual void
sceneManagerDestroyed (SceneManager *source)
Event notifying the listener of the SceneManager's destruction.
2. LodListener
这个接口可以实现对Lod的处理的,比如可以根据Lod对mesh及submesn进行自定义的剔除操作,从而优化程序效率。
void
addLodListener (LodListener *listener)
Add a level of detail listener.
LodListener接口的功能
Public Member Functions
virtual bool
prequeueMovableObjectLodChanged (const MovableObjectLodChangedEvent &evt)
Called before a movable object's lod has changed.
virtual void
postqueueMovableObjectLodChanged (const MovableObjectLodChangedEvent &evt)
Called after a movable object's lod has changed.
virtual bool
prequeueEntityMeshLodChanged (EntityMeshLodChangedEvent &evt)
Called before an entity's mesh lod has changed.
virtual void
postqueueEntityMeshLodChanged (const EntityMeshLodChangedEvent &evt)
Called after an entity's mesh lod has changed.
virtual bool
prequeueEntityMaterialLodChanged (EntityMaterialLodChangedEvent &evt)
Called before an entity's material lod has changed.
virtual void
postqueueEntityMaterialLodChanged (const EntityMaterialLodChangedEvent &evt)
Called after an entity's material lod has changed.
3.RenderQueueListener
virtual void
addRenderQueueListener (RenderQueueListener *newListener)
Registers a new RenderQueueListener which will be notified when render queues are processed.
virtual
~RenderQueueListener ()
virtual void
preRenderQueues ()
Event raised before all render queues are processed.
virtual void
postRenderQueues ()
Event raised after all render queues are processed.
virtual void
renderQueueStarted (uint8 queueGroupId, const String &invocation, bool &skipThisInvocation)
Event raised before a queue group is rendered.
virtual void
renderQueueEnded (uint8 queueGroupId, const String &invocation, bool &repeatThisInvocation)
Event raised after a queue group is rendered.
4.RenderObjectListener
virtual void
addRenderObjectListener (RenderObjectListener *newListener)
Registers a new Render Object Listener which will be notified when rendering an object.
Public Member Functions
virtual void
notifyRenderSingleObject (Renderable *rend, const Pass *pass, const AutoParamDataSource *source, const LightList *pLightList, bool suppressRenderStateChanges)=0
Event raised when render single object started.