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

FinalRenderingRun Class Reference

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

#include <FinalRenderingRun.h>

Inheritance diagram for FinalRenderingRun:

RenderingRun CausticsFinalRenderingRun ImageBasedLightingFinalRenderingRun LightMapFinalRenderingRun List of all members.

Public Member Functions

 FinalRenderingRun (Entity *owner)
 Constructor.
void setVisible (bool visible)
 Calls Entity::setVisible.
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 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 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 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 unsigned int getVRMUpdateInterval ()
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.
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 unsigned int getLightMapUpdateInterval ()
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 setPRMTexture (const String &prmTextureName)
 Set the entity's Precomputed Radiance Map. Resources possibly re-computed later must be passed by reference or name.
virtual unsigned int getPRMUpdateInterval ()
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 setDiffuseEnvironmentTextureCube (const String &diffuseEnvironmentTextureCubeName)
 Set the entity's Diffuse Environment Map. Resources possibly re-computed later must be passed by reference or name.
virtual unsigned int getDiffuseEnvironmentUpdateInterval ()
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 setSpecularEnvironmentTextureCube (const String &specularEnvironmentTextureCubeName)
 Set the entity's Specular Environment Map. Resources possibly re-computed later must be passed by reference or name.
virtual unsigned int getSpecularEnvironmentUpdateInterval ()
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 setFresnelEnvironmentTextureCube (const String &fresnelEnvironmentTextureCubeName)
 Set the entity's Fresnel Environment Map. Resources possibly re-computed later must be passed by reference or name.
virtual unsigned int getFresnelEnvironmentUpdateInterval ()
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 setCausticMapTexture (const String &causticMapTextureName)
 Set the entity's Caustic Map. Resources possibly re-computed later must be passed by reference or name.
virtual unsigned int getCausticMapUpdateInterval ()
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.

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::FinalRenderingRun Entity *  owner  )  [inline]
 

Constructor.

Parameters:
owner The entity the FinalRenderingRun is linked to.


Member Function Documentation

virtual unsigned int FinalRenderingRun::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 FinalRenderingRun::getDiffuseEnvironmentUpdateInterval  )  [inline, virtual]
 

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

virtual unsigned int FinalRenderingRun::getFresnelEnvironmentUpdateInterval  )  [inline, virtual]
 

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

virtual unsigned int FinalRenderingRun::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 FinalRenderingRun::getPRMUpdateInterval  )  [inline, virtual]
 

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

virtual unsigned int FinalRenderingRun::getSpecularEnvironmentUpdateInterval  )  [inline, virtual]
 

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

virtual unsigned int FinalRenderingRun::getVRMUpdateInterval  )  [inline, virtual]
 

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

virtual void FinalRenderingRun::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 FinalRenderingRun::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 FinalRenderingRun::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, and LightMapFinalRenderingRun.

virtual void FinalRenderingRun::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 FinalRenderingRun::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 FinalRenderingRun::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 FinalRenderingRun::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 FinalRenderingRun::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().

virtual void FinalRenderingRun::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.

virtual void FinalRenderingRun::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 FinalRenderingRun::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 FinalRenderingRun::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 FinalRenderingRun::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 FinalRenderingRun::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 FinalRenderingRun::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.

void FinalRenderingRun::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 FinalRenderingRun::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 FinalRenderingRun::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* FinalRenderingRun::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 09:57:35 2005 for OGRE_IllumModule by  doxygen 1.4.2