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

EnvMapFinalGathering Class Reference

Controlls the rendering of the Environment Mapping effect. More...

#include <EnvMapFinalGathering.h>

Inheritance diagram for EnvMapFinalGathering:

FinalRenderingRun RenderingRun List of all members.

Public Member Functions

 EnvMapFinalGathering (Entity *ent)
virtual unsigned int getFresnelEnvironmentUpdateInterval ()
virtual void renderSingleEntity (RenderTarget *backBuffer, CubeMapFaces cf=CUBEMAP_FACE_POSITIVE_X)
 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.
void setEnvMapPostition (Vector3 envMapPosition)
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.
void setFresnelFactor (float fresnelFactor)
 ~EnvMapFinalGathering (void)

Private Attributes

RenderTarget * backBuffer
Entity * entity
std::vector< bool > entityVisibilityList
EnvMapFinalGatheringPassenvMapFinalGatheringPass

Detailed Description

Controlls the rendering of the Environment Mapping effect.

SuperClass FinalRenderingRun

Class EnvMapFinalGathering


Constructor & Destructor Documentation

EnvMapFinalGathering Entity *  ent  ) 
 

Constructor

Parameters:
ent Owner entity.

~EnvMapFinalGathering void   ) 
 

Destructor


Member Function Documentation

virtual unsigned int getFresnelEnvironmentUpdateInterval  )  [inline, virtual]
 

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

Reimplemented from FinalRenderingRun.

virtual void renderSingleEntity RenderTarget *  backBuffer,
CubeMapFaces  cf = CUBEMAP_FACE_POSITIVE_X
[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.

Implements FinalRenderingRun.

void setEnvMapPostition Vector3  envMapPosition  ) 
 

Sets the world-space position of the environment cube-map for the EnvMap shader. This is used, because the cubemap is not regenerated in every frame.

Parameters:
envMapPosition The position vector

virtual void setFresnelEnvironmentTextureCube const String &  fresnelEnvironmentTextureCubeName  )  [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 from FinalRenderingRun.

virtual void setFresnelEnvironmentUpdateInterval unsigned int  updateIntervalNumOfFrames  )  [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 from FinalRenderingRun.

void setFresnelFactor float  fresnelFactor  ) 
 

Sets the material's Fresnel factor for the EnvMap shader.

Parameters:
fresnelFactor The Fresnel factor. 0.0f means only a small reflection in narrow angles, 1.0f complete reflection to every direction.


Member Data Documentation

RenderTarget* backBuffer [private]
 

Pointer to the back buffer, where we render

Entity* entity [private]
 

Pointer to the entity that the effect is applied on.

std::vector<bool> entityVisibilityList [private]
 

Temporary visibility list, to store and restore the enitities' visibility information.

EnvMapFinalGatheringPass* envMapFinalGatheringPass [private]
 

Pointer to an EnvMapFinalGatheringPass object, which performs the actual rendering.


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