Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

FinalRenderingRun Class Reference

This class and the EntityRenderingObject class encapsulate the complete illumination model implemented in the illumination workpackage. More...

#include <FinalRenderingRun.h>

Inheritance diagram for FinalRenderingRun:

RenderingRun CausticsFinalRenderingRun EnvMapFinalGathering ImageBasedLightingFinalRenderingRun LightMapFinalRenderingRun SoftShadowFinalRenderingRun List of all members.

Public Member Functions

 FinalRenderingRun (Entity *owner)
 Constructor.
virtual unsigned int getCausticMapUpdateInterval ()
virtual unsigned int getDiffuseEnvironmentUpdateInterval ()
virtual unsigned int getFresnelEnvironmentUpdateInterval ()
virtual unsigned int getLightMapUpdateInterval ()
virtual unsigned int getPRMUpdateInterval ()
virtual unsigned int getSpecularEnvironmentUpdateInterval ()
virtual unsigned int getVRMUpdateInterval ()
virtual void postRender (RenderTarget *backBuffer, CubeMapFaces cf=CUBEMAP_FACE_POSITIVE_X)
 Called after renderSingleEntity has been called for all entities. This is where additional effects can be blend-added to the final image. See FinalRenderingRun::renderSingleEntity for usage guidelines. However, it is encouraged to apply custom render states in this method.
virtual void preRender (RenderTarget *backBuffer, CubeMapFaces cf=CUBEMAP_FACE_POSITIVE_X)
 Called before renderSingleEntity would be called for any entity. Could be useful e.g. for pre-rendering depth. See FinalRenderingRun::renderSingleEntity for usage guidelines. However, it is encouraged to apply custom render states in this method.
virtual void renderSingleEntity (RenderTarget *backBuffer, CubeMapFaces cf=CUBEMAP_FACE_POSITIVE_X)=0
 Perform the passes necessary to render the entity to the frame buffer, with all the illumination effects the implementing FinalRenderingRun-subclass supports. This method is called by IlluminationModule::update, after all the necessary preprocessing steps have been executed. Thus, the references (or names) that had been set via the virtual set<anything> functions reference the updated results.
virtual void setCausticMapTexture (const String &causticMapTextureName)
 Set the entity's Caustic Map. Resources possibly re-computed later must be passed by reference or name.
virtual void setCausticMapUpdateInterval (unsigned int updateIntervalNumOfFrames)
 Set the Caustic Map udate interval desired for the owner entity. If Caustic Map is not used, the method should have no effect.
virtual void setDiffuseEnvironmentTextureCube (const String &diffuseEnvironmentTextureCubeName)
 Set the entity's Diffuse Environment Map. Resources possibly re-computed later must be passed by reference or name.
virtual void setDiffuseEnvironmentUpdateInterval (unsigned int updateIntervalNumOfFrames)
 Set the DEM udate interval desired for the owner entity. If DEM is not used, the method should have no effect.
virtual void setEntryPointsTexture (const String &entryPointsTextureName)
virtual void setFresnelEnvironmentTextureCube (const String &fresnelEnvironmentTextureCubeName)
 Set the entity's Fresnel Environment Map. Resources possibly re-computed later must be passed by reference or name.
virtual void setFresnelEnvironmentUpdateInterval (unsigned int updateIntervalNumOfFrames)
 Set the FEM udate interval desired for the owner entity. If FEM is not used, the method should have no effect.
virtual void setLightMapTexture (const String &lightMapTextureName)
 Set the entity's Light Map. Resources possibly re-computed later must be passed by reference or name.
virtual void setLightMapUpdateInterval (unsigned int updateIntervalNumOfFrames)
 Set the Light Map udate interval desired for the owner entity. If Light Map is not used, the method should have no effect.
virtual void setNClusters (unsigned int &nClusters)
virtual void setNEntryPoints (unsigned int &nEntryPoints)
virtual void setPRMTexture (const String &prmTextureName)
 Set the entity's Precomputed Radiance Map. Resources possibly re-computed later must be passed by reference or name.
virtual void setPRMUpdateInterval (unsigned int updateIntervalNumOfFrames)
 Set the PRM udate interval desired for the owner entity. If PRM is not used, the method should have no effect.
virtual void setSpecularEnvironmentTextureCube (const String &specularEnvironmentTextureCubeName)
 Set the entity's Specular Environment Map. Resources possibly re-computed later must be passed by reference or name.
virtual void setSpecularEnvironmentUpdateInterval (unsigned int updateIntervalNumOfFrames)
 Set the SEM udate interval desired for the owner entity. If SEM is not used, the method should have no effect.
virtual void setTileSize (unsigned int &tileSize)
void setVisible (bool visible)
 Calls Entity::setVisible.
virtual void setVRMTexture (const String &vrmTextureName)
 Set the entity's Visibility Ratio Map (soft shadow map). Resources possibly re-computed later must be passed by reference or name.
virtual void setVRMUpdateInterval (unsigned int updateIntervalNumOfFrames)
 Set the VRM udate interval desired for the owner entity. If VRM is not used, the method should have no effect.

Protected Attributes

Entity * owner

Detailed Description

This class and the EntityRenderingObject class encapsulate the complete illumination model implemented in the illumination workpackage.

A FinalRenderingRun instance is stored with all Entities. What preprocessing is necessary for the final rendering is coded into classes derived from FinalRenderingRun. How often (in how many frames) those preprocessing runs are to be performed can be set.

Typically, a FinalRenderingRun-derived class has a number of static ManagedOgreRenderTexturePass instances for performing intermediate computations, and a non-static ManagedOgreRenderTexturePass member that renders to the frame buffer.

Data flow between runs

A RenderingRun gathers its input from the following sources:


Constructor & Destructor Documentation

FinalRenderingRun Entity *  owner  )  [inline]
 

Constructor.

Parameters:
owner The entity the FinalRenderingRun is linked to.


Member Function Documentation

virtual unsigned int getCausticMapUpdateInterval  )  [inline, virtual]
 

Returns:
0 if Caustic Map is not used, the desired length of the update interval otherwise.

Reimplemented in CausticsFinalRenderingRun.

virtual unsigned int getDiffuseEnvironmentUpdateInterval  )  [inline, virtual]
 

Returns:
0 if Diffuse Enviroment Map is not used, the desired length of the update interval otherwise.

virtual unsigned int getFresnelEnvironmentUpdateInterval  )  [inline, virtual]
 

Returns:
0 if Fresnel Enviroment Map is not used, the desired length of the update interval otherwise.

Reimplemented in EnvMapFinalGathering.

virtual unsigned int getLightMapUpdateInterval  )  [inline, virtual]
 

Returns:
0 if Light Map is not used, the desired length of the update interval otherwise.

Reimplemented in LightMapFinalRenderingRun.

virtual unsigned int getPRMUpdateInterval  )  [inline, virtual]
 

Returns:
0 if PRM is not used, the desired length of the update interval otherwise.

virtual unsigned int getSpecularEnvironmentUpdateInterval  )  [inline, virtual]
 

Returns:
0 if Specular Enviroment Map is not used, the desired length of the update interval otherwise.

virtual unsigned int getVRMUpdateInterval  )  [inline, virtual]
 

Returns:
0 if VRM is not used, the desired length of the update interval otherwise.

virtual void postRender RenderTarget *  backBuffer,
CubeMapFaces  cf = CUBEMAP_FACE_POSITIVE_X
[inline, virtual]
 

Called after renderSingleEntity has been called for all entities. This is where additional effects can be blend-added to the final image. See FinalRenderingRun::renderSingleEntity for usage guidelines. However, it is encouraged to apply custom render states in this method.

Parameters:
backBuffer The render target to be rendered to. While this is typically the frame buffer, 'final' rendering can be performed for a texture output, e.g. when rendering an environment map.
cf Meaningful if the render target is a cube map. Identifies the face to be rendered to.

Reimplemented in ImageBasedLightingFinalRenderingRun.

virtual void preRender RenderTarget *  backBuffer,
CubeMapFaces  cf = CUBEMAP_FACE_POSITIVE_X
[inline, virtual]
 

Called before renderSingleEntity would be called for any entity. Could be useful e.g. for pre-rendering depth. See FinalRenderingRun::renderSingleEntity for usage guidelines. However, it is encouraged to apply custom render states in this method.

Parameters:
backBuffer The render target to be rendered to. While this is typically the frame buffer, 'final' rendering can be performed for a texture output, e.g. when rendering an environment map.
cf Meaningful if the render target is a cube map. Identifies the face to be rendered to.

virtual void renderSingleEntity RenderTarget *  backBuffer,
CubeMapFaces  cf = CUBEMAP_FACE_POSITIVE_X
[pure virtual]
 

Perform the passes necessary to render the entity to the frame buffer, with all the illumination effects the implementing FinalRenderingRun-subclass supports. This method is called by IlluminationModule::update, after all the necessary preprocessing steps have been executed. Thus, the references (or names) that had been set via the virtual set<anything> functions reference the updated results.

This method is supposed to reproduce the behaviour of rendering an object using the standard OGRE pipeline. Thus, it is forbidden to commit any of the following:

  • clear the color, depth or stencil of the backbuffer
  • alter the depth testing, stencil testing, alpha blending render state without restoring it
  • render with altered depth testing, stencil testing, alpha blending to the backbuffer
  • alter entity or billboard visibilities without restoring them
    Parameters:
    backBuffer The render target to be rendered to. While this is typically the frame buffer, 'final' rendering can be performed for a texture output, e.g. when rendering an environment map.
    cf Meaningful if the render target is a cube map. Identifies the face to be rendered to.

Implemented in CausticsFinalRenderingRun, ImageBasedLightingFinalRenderingRun, LightMapFinalRenderingRun, EnvMapFinalGathering, and SoftShadowFinalRenderingRun.

virtual void setCausticMapTexture const String &  causticMapTextureName  )  [inline, virtual]
 

Set the entity's Caustic Map. Resources possibly re-computed later must be passed by reference or name.

Parameters:
causticMapTextureName The precomputed Caustic Map texture's name, as returned by CausticMapRenderingRun::getResultTextureName().

virtual void setCausticMapUpdateInterval unsigned int  updateIntervalNumOfFrames  )  [inline, virtual]
 

Set the Caustic Map udate interval desired for the owner entity. If Caustic Map is not used, the method should have no effect.

Parameters:
updateIntervalNumOfFrames After how many frames should the preprocesing step be repeated to update the Caustic Map.

Reimplemented in CausticsFinalRenderingRun.

virtual void setDiffuseEnvironmentTextureCube const String &  diffuseEnvironmentTextureCubeName  )  [inline, virtual]
 

Set the entity's Diffuse Environment Map. Resources possibly re-computed later must be passed by reference or name.

Parameters:
diffuseEnvironmentTextureCubeName The precomputed Diffuse Environment Map texture's name, as returned by DiffuseEnvironmentRenderingRun::getResultTextureName().

virtual void setDiffuseEnvironmentUpdateInterval unsigned int  updateIntervalNumOfFrames  )  [inline, virtual]
 

Set the DEM udate interval desired for the owner entity. If DEM is not used, the method should have no effect.

Parameters:
updateIntervalNumOfFrames After how many frames should the preprocesing step be repeated to update the DEM.

virtual void setEntryPointsTexture const String &  entryPointsTextureName  )  [inline, virtual]
 

virtual void setFresnelEnvironmentTextureCube const String &  fresnelEnvironmentTextureCubeName  )  [inline, virtual]
 

Set the entity's Fresnel Environment Map. Resources possibly re-computed later must be passed by reference or name.

Parameters:
fresnelEnvironmentTextureCubeName The precomputed Fresnel Environment Map texture's name, as returned by FresnelEnvironmentRenderingRun::getResultTextureName().

Reimplemented in EnvMapFinalGathering.

virtual void setFresnelEnvironmentUpdateInterval unsigned int  updateIntervalNumOfFrames  )  [inline, virtual]
 

Set the FEM udate interval desired for the owner entity. If FEM is not used, the method should have no effect.

Parameters:
updateIntervalNumOfFrames After how many frames should the preprocesing step be repeated to update the FEM.

Reimplemented in EnvMapFinalGathering.

virtual void setLightMapTexture const String &  lightMapTextureName  )  [inline, virtual]
 

Set the entity's Light Map. Resources possibly re-computed later must be passed by reference or name.

Parameters:
lightMapTextureName The precomputed Light Map texture's name, as returned by LightMapRenderingRun::getResultTextureName().

Reimplemented in LightMapFinalRenderingRun.

virtual void setLightMapUpdateInterval unsigned int  updateIntervalNumOfFrames  )  [inline, virtual]
 

Set the Light Map udate interval desired for the owner entity. If Light Map is not used, the method should have no effect.

Parameters:
updateIntervalNumOfFrames After how many frames should the preprocesing step be repeated to update the Light Map.

Reimplemented in LightMapFinalRenderingRun.

virtual void setNClusters unsigned int &  nClusters  )  [inline, virtual]
 

virtual void setNEntryPoints unsigned int &  nEntryPoints  )  [inline, virtual]
 

virtual void setPRMTexture const String &  prmTextureName  )  [inline, virtual]
 

Set the entity's Precomputed Radiance Map. Resources possibly re-computed later must be passed by reference or name.

Parameters:
prmTextureName The precomputed Light Map texture's name, as returned by PRMRenderingRun::getResultTextureName().

virtual void setPRMUpdateInterval unsigned int  updateIntervalNumOfFrames  )  [inline, virtual]
 

Set the PRM udate interval desired for the owner entity. If PRM is not used, the method should have no effect.

Parameters:
updateIntervalNumOfFrames After how many frames should the preprocesing step be repeated to update the PRM.

virtual void setSpecularEnvironmentTextureCube const String &  specularEnvironmentTextureCubeName  )  [inline, virtual]
 

Set the entity's Specular Environment Map. Resources possibly re-computed later must be passed by reference or name.

Parameters:
specularEnvironmentTextureCubeName The precomputed Specular Environment Map texture's name, as returned by SpecularEnvironmentRenderingRun::getResultTextureName().

virtual void setSpecularEnvironmentUpdateInterval unsigned int  updateIntervalNumOfFrames  )  [inline, virtual]
 

Set the SEM udate interval desired for the owner entity. If SEM is not used, the method should have no effect.

Parameters:
updateIntervalNumOfFrames After how many frames should the preprocesing step be repeated to update the SEM.

virtual void setTileSize unsigned int &  tileSize  )  [inline, virtual]
 

void setVisible bool  visible  )  [inline]
 

Calls Entity::setVisible.

Parameters:
visible True if the entity should be made visible, false if it should be hidden.

virtual void setVRMTexture const String &  vrmTextureName  )  [inline, virtual]
 

Set the entity's Visibility Ratio Map (soft shadow map). Resources possibly re-computed later must be passed by reference or name.

Parameters:
vrmTextureName The precomputed VRM texture's name, as returned by VRMRenderingRun::getResultTextureName().

virtual void setVRMUpdateInterval unsigned int  updateIntervalNumOfFrames  )  [inline, virtual]
 

Set the VRM udate interval desired for the owner entity. If VRM is not used, the method should have no effect.

Parameters:
updateIntervalNumOfFrames After how many frames should the preprocesing step be repeated to update the VRM.


Member Data Documentation

Entity* owner [protected]
 

The owner entity of this FinalRenderingRun instance.


The documentation for this class was generated from the following file:
Generated on Mon Apr 18 10:59:27 2005 for OGRE_IllumModule by  doxygen 1.4.2