OGRE: Ogre::RTShader::ShaderGenerator::SGSceneManagerListener Class Reference - OGRE Documentation

Public Member Functions | Protected Attributes

# Ogre::RTShader::ShaderGenerator::SGSceneManagerListener Class Reference

Shader generator scene manager sub class. More...

`#include <OgreShaderGenerator.h>`

Inheritance diagram for Ogre::RTShader::ShaderGenerator::SGSceneManagerListener:
[legend]

List of all members.

## Public Member Functions
| SGSceneManagerListener (ShaderGenerator *owner)
virtual void | preFindVisibleObjects (SceneManager *source, SceneManager::IlluminationRenderStage irs, Viewport *v)
| Listener overridden function notify the shader generator when finding visible objects process started.
virtual void | postFindVisibleObjects (SceneManager *source, SceneManager::IlluminationRenderStage irs, Viewport *v)
virtual void | shadowTexturesUpdated (size_t numberOfShadowTextures)
virtual void | shadowTextureCasterPreViewProj (Light *light, Camera *camera, size_t iteration)
virtual void | shadowTextureReceiverPreViewProj (Light *light, Frustum *frustum)
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.
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info
void * | operator new (size_t sz)
void * | operator new (size_t sz, void *ptr)
| placement operator new
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info
void * | operator new[] (size_t sz)
void | operator delete (void *ptr)
void | operator delete (void *ptr, void *)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)
## Protected Attributes
ShaderGenerator * | mOwner

## Detailed Description

Shader generator scene manager sub class.

Definition at line 600 of file OgreShaderGenerator.h.

## Constructor & Destructor Documentation

Ogre::RTShader::ShaderGenerator::SGSceneManagerListener::SGSceneManagerListener | ( | ShaderGenerator * | owner | ) |

Definition at line 603 of file OgreShaderGenerator.h.

## Member Function Documentation

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | `[inherited]`

Definition at line 95 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |  |
| ) |  |  | `[inherited]`

Definition at line 101 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |  |
| ) |  |  | `[inherited]`

Definition at line 107 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | `[inherited]`

Definition at line 112 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |  |
| ) |  |  | `[inherited]`

Definition at line 118 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func |
| ) |  |  | `[inherited]`

operator new, with debug line info

Definition at line 67 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | `[inherited]`

Definition at line 72 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr |
| ) |  |  | `[inherited]`

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | `[inherited]`

Definition at line 90 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func |
| ) |  |  | `[inherited]`

array operator new, with debug line info

Definition at line 85 of file OgreMemoryAllocatedObject.h.

virtual void Ogre::SceneManager::Listener::postFindVisibleObjects | ( | SceneManager * | source,
|  | IlluminationRenderStage | irs,
|  | Viewport * | v |
| ) |  |  | `[virtual, inherited]`

Called after searching for visible objects in this SceneManager.

Remarks:
  Note that the render queue at this stage will be full of the current scenes contents, ready for rendering. You may manually add renderables to this queue if you wish.

Parameters:

  | source | The SceneManager instance raising this event.
  | irs | The stage of illumination being dealt with. IRS_NONE for a regular render, IRS_RENDER_TO_TEXTURE for a shadow caster render.
  | v | The viewport being updated. You can get the camera from here.

Definition at line 247 of file OgreSceneManager.h.

virtual void Ogre::RTShader::ShaderGenerator::SGSceneManagerListener::postFindVisibleObjects | ( | SceneManager * | source,
|  | SceneManager::IlluminationRenderStage | irs,
|  | Viewport * | v |
| ) |  |  | `[virtual]`

Definition at line 617 of file OgreShaderGenerator.h.

virtual void Ogre::SceneManager::Listener::preFindVisibleObjects | ( | SceneManager * | source,
|  | IlluminationRenderStage | irs,
|  | Viewport * | v |
| ) |  |  | `[virtual, inherited]`

Called prior to searching for visible objects in this SceneManager.

Remarks:
  Note that the render queue at this stage will be full of the last render's contents and will be cleared after this method is called.

Parameters:

  | source | The SceneManager instance raising this event.
  | irs | The stage of illumination being dealt with. IRS_NONE for a regular render, IRS_RENDER_TO_TEXTURE for a shadow caster render.
  | v | The viewport being updated. You can get the camera from here.

Definition at line 233 of file OgreSceneManager.h.

virtual void Ogre::RTShader::ShaderGenerator::SGSceneManagerListener::preFindVisibleObjects | ( | SceneManager * | source,
|  | SceneManager::IlluminationRenderStage | irs,
|  | Viewport * | v |
| ) |  |  | `[virtual]`

Listener overridden function notify the shader generator when finding visible objects process started.

Definition at line 611 of file OgreShaderGenerator.h.

References Ogre::RTShader::ShaderGenerator::preFindVisibleObjects().

virtual void Ogre::SceneManager::Listener::sceneManagerDestroyed | ( | SceneManager * | source | ) | `[virtual, inherited]`

Event notifying the listener of the SceneManager's destruction.

Definition at line 328 of file OgreSceneManager.h.

virtual void Ogre::RTShader::ShaderGenerator::SGSceneManagerListener::shadowTextureCasterPreViewProj | ( | Light * | light,
|  | Camera * | camera,
|  | size_t | iteration |
| ) |  |  | `[virtual]`

Definition at line 628 of file OgreShaderGenerator.h.

virtual void Ogre::SceneManager::Listener::shadowTextureCasterPreViewProj | ( | Light * | light,
|  | Camera * | camera,
|  | size_t | iteration |
| ) |  |  | `[virtual, inherited]`

This event occurs just before the view & projection matrices are set for rendering into a shadow texture.

Remarks:
  You can use this event hook to perform some custom processing, such as altering the camera being used for rendering the light's view, including setting custom view & projection matrices if you want to perform an advanced shadow technique.

Note:
  This event will only be fired when texture shadows are in use.

Parameters:

  | light | Pointer to the light for which shadows are being rendered
  | camera | Pointer to the camera being used to render
  | iteration | For lights that use multiple shadow textures, the iteration number

Definition at line 281 of file OgreSceneManager.h.

virtual void Ogre::RTShader::ShaderGenerator::SGSceneManagerListener::shadowTextureReceiverPreViewProj | ( | Light * | light,
|  | Frustum * | frustum |
| ) |  |  | `[virtual]`

Definition at line 634 of file OgreShaderGenerator.h.

virtual void Ogre::SceneManager::Listener::shadowTextureReceiverPreViewProj | ( | Light * | light,
|  | Frustum * | frustum |
| ) |  |  | `[virtual, inherited]`

This event occurs just before the view & projection matrices are set for re-rendering a shadow receiver.

Remarks:
  You can use this event hook to perform some custom processing, such as altering the projection frustum being used for rendering the shadow onto the receiver to perform an advanced shadow technique.

Note:
  This event will only be fired when texture shadows are in use.

Parameters:

  | light | Pointer to the light for which shadows are being rendered
  | frustum | Pointer to the projection frustum being used to project the shadow texture

Definition at line 298 of file OgreSceneManager.h.

virtual void Ogre::SceneManager::Listener::shadowTexturesUpdated | ( | size_t | numberOfShadowTextures | ) | `[virtual, inherited]`

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).

Remarks:
  This callback is useful for those that wish to perform some additional processing on shadow textures before they are used to render shadows. For example you could perform some filtering by rendering the existing shadow textures into another alternative shadow texture with a shader.]

Note:
  This event will only be fired when texture shadows are in use.

Parameters:

  | numberOfShadowTextures | The number of shadow textures in use

Definition at line 265 of file OgreSceneManager.h.

virtual void Ogre::RTShader::ShaderGenerator::SGSceneManagerListener::shadowTexturesUpdated | ( | size_t | numberOfShadowTextures | ) | `[virtual]`

Definition at line 623 of file OgreShaderGenerator.h.

virtual bool Ogre::SceneManager::Listener::sortLightsAffectingFrustum | ( | LightList & | lightList | ) | `[virtual, inherited]`

Hook to allow the listener to override the ordering of lights for the entire frustum.

Remarks:
  Whilst ordinarily lights are sorted per rendered object (

See also:
  MovableObject::queryLights), texture shadows adds another issue in that, given there is a finite number of shadow textures, we must choose which lights to render texture shadows from based on the entire frustum. These lights should always be listed first in every objects own list, followed by any other lights which will not cast texture shadows (either because they have shadow casting off, or there aren't enough shadow textures to service them).

  This hook allows you to override the detailed ordering of the lights per frustum. The default ordering is shadow casters first (which you must also respect if you override this method), and ordered by distance from the camera within those 2 groups. Obviously the closest lights with shadow casting enabled will be listed first. Only lights within the range of the frustum will be in the list.

Parameters:

  | lightList | The list of lights within range of the frustum which you may sort.

Returns:
  true if you sorted the list, false otherwise.

Definition at line 324 of file OgreSceneManager.h.

## Member Data Documentation

ShaderGenerator* Ogre::RTShader::ShaderGenerator::SGSceneManagerListener::mOwner`[protected]`

Definition at line 641 of file OgreShaderGenerator.h.

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

- OgreShaderGenerator.h

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Wed Nov 3 2010 19:25:05