Ogre::LodListener Class Reference
LOD

A interface class defining a listener which can be used to receive notifications of lod events. More...

`#include <OgreLodListener.h>`

List of all members.

## Public Member Functions

virtual | ~LodListener ()
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.

## Detailed Description

A interface class defining a listener which can be used to receive notifications of lod events.

Remarks:
  A 'listener' is an interface designed to be called back when particular events are called. This class defines the interface relating to lod events. In order to receive notifications of lod events, you should create a subclass of LodListener and override the methods for which you would like to customise the resulting processing. You should then call SceneManager::addLodListener passing an instance of this class. There is no limit to the number of lod listeners you can register, allowing you to register multiple listeners for different purposes.

For some uses, it may be advantageous to also subclass RenderQueueListener as this interface makes available information regarding render queue invocations.

It is important not to modify the scene graph during rendering, so, for each event, there are two methods, a prequeue method and a postqueue method. The prequeue method is invoked during rendering, and as such should not perform any changes, but if the event is relevant, it may return true indicating the postqueue method should also be called. The postqueue method is invoked at an appropriate time after rendering and scene changes may be safely made there.

Definition at line 117 of file OgreLodListener.h.

## Constructor & Destructor Documentation

virtual Ogre::LodListener::~LodListener | ( |  | ) | `[virtual]`

Definition at line 121 of file OgreLodListener.h.

## Member Function Documentation

virtual void Ogre::LodListener::postqueueEntityMaterialLodChanged | ( | const EntityMaterialLodChangedEvent & | evt | ) | `[virtual]`

Called after an entity's material lod has changed.

Remarks:
  May be called even if not requested from prequeueEntityMaterialLodChanged as only one event queue is maintained per SceneManger instance.

Definition at line 199 of file OgreLodListener.h.

virtual void Ogre::LodListener::postqueueEntityMeshLodChanged | ( | const EntityMeshLodChangedEvent & | evt | ) | `[virtual]`

Called after an entity's mesh lod has changed.

Remarks:
  May be called even if not requested from prequeueEntityMeshLodChanged as only one event queue is maintained per SceneManger instance.

Definition at line 171 of file OgreLodListener.h.

virtual void Ogre::LodListener::postqueueMovableObjectLodChanged | ( | const MovableObjectLodChangedEvent & | evt | ) | `[virtual]`

Called after a movable object's lod has changed.

Remarks:
  May be called even if not requested from prequeueMovableObjectLodChanged as only one event queue is maintained per SceneManger instance.

Definition at line 143 of file OgreLodListener.h.

virtual bool Ogre::LodListener::prequeueEntityMaterialLodChanged | ( | EntityMaterialLodChangedEvent & | evt | ) | `[virtual]`

Called before an entity's material lod has changed.

Remarks:
  Do not change the Ogre state from this method, instead return true and perform changes in postqueueMaterialLodChanged.

It is possible to change the event notification and even alter the newLodIndex field (possibly to prevent the lod from changing, or to skip an index).

Returns:
  True to indicate the event should be queued and postqueueMaterialLodChanged called after rendering is complete.

Definition at line 190 of file OgreLodListener.h.

virtual bool Ogre::LodListener::prequeueEntityMeshLodChanged | ( | EntityMeshLodChangedEvent & | evt | ) | `[virtual]`

Called before an entity's mesh lod has changed.

Remarks:
  Do not change the Ogre state from this method, instead return true and perform changes in postqueueEntityMeshLodChanged.

It is possible to change the event notification and even alter the newLodIndex field (possibly to prevent the lod from changing, or to skip an index).

Returns:
  True to indicate the event should be queued and postqueueEntityMeshLodChanged called after rendering is complete.

Definition at line 162 of file OgreLodListener.h.

virtual bool Ogre::LodListener::prequeueMovableObjectLodChanged | ( | const MovableObjectLodChangedEvent & | evt | ) | `[virtual]`

Called before a movable object's lod has changed.

Remarks:
  Do not change the Ogre state from this method, instead return true and perform changes in postqueueMovableObjectLodChanged.

Returns:
  True to indicate the event should be queued and postqueueMovableObjectLodChanged called after rendering is complete.

Definition at line 134 of file OgreLodListener.h.

The documentation for this class was generated from the following file:

- OgreLodListener.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Sep 2 2012 07:27:30