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

PhotonMapFilteringPass Class Reference

Filters the incoming unfiltered photon map texture using an area map and a normal map. More...

#include <PhotonMapFilteringPass.h>

Inheritance diagram for PhotonMapFilteringPass:

ManagedOgreRenderTexturePass List of all members.

Public Member Functions

void generateFilterKernel (t_pmfKernelType kt, int kernelSize)
 Function to generate a filter kernel according to the given shape and size.
float getAreaCompensation ()
 Getter method to obtain area compensation.
float getNormalThreshold ()
 Getter method to obtain normal threshold.
float getResolution ()
 Gets the reciprocal value of the resolution of the unfiltered photon map.
 PhotonMapFilteringPass (Root *mRoot, unsigned int width, unsigned int height, TextureType texType=TEX_TYPE_2D, PixelFormat internalFormat=PF_FLOAT16_RGBA, const NameValuePairList *miscParams=0, bool fullScreenQuadRenderer=false, String renderTextureName="FilteredPhotonMapTexture")
void setAreaCompensation (float ac)
 Setter method to define area compensation.
void setNormalThreshold (float nt)
 Setter method to define normal threshold.
void setResolution (float resolution)
 Sets the reciprocal value of the texture resolution.
 ~PhotonMapFilteringPass ()

Protected Member Functions

void onRenderEnd (NameValuePairList *namedParams=0)
 Post rendering method.
void onRenderStart (NameValuePairList *namedParams=0)
 Pre rendering method.

Private Attributes

float areaCompensation
 Parameters to compensate the values of face areas and to define normal threshold.
float f_pmfFilterKernel [25]
 The filter kernel itself.
int i_pmfKernelSize
 The half of the filter kernel in pixels. (The full width of the filter kernel is: g_pmf_iKernelSize + 1 + g_pmf_iKernelSize).
t_pmfKernelType i_pmfKernelType
 An enumeration type to define the shape of the filter kernel.
float normalThreshold
 Parameters to compensate the values of face areas and to define normal threshold.
float resolution
 The reciprocal value of the resolution of the unfiltered photon map.

Detailed Description

Filters the incoming unfiltered photon map texture using an area map and a normal map.

SuperClass: ManagedOgreRenderTexturePass Class: PhotonMapFilteringPass The instances of this class are to generate a filtered photon map of the owner entity. The shader programs can access to the originally unfiltered photon map and the area map through the texture units of this textures. This association is done by the constructor of the PhotonMapFilteringRenderingRun class. The type of the resulting texture is PF_FLOAT16_RGBA.


Constructor & Destructor Documentation

PhotonMapFilteringPass Root *  mRoot,
unsigned int  width,
unsigned int  height,
TextureType  texType = TEX_TYPE_2D,
PixelFormat  internalFormat = PF_FLOAT16_RGBA,
const NameValuePairList *  miscParams = 0,
bool  fullScreenQuadRenderer = false,
String  renderTextureName = "FilteredPhotonMapTexture"
 

Parameters:
mRoot pointer to the Root object of the graphics engine.
width the width of render texture in pixels.
height the height of render texture in pixels.
texType the type of render texture. Its default value is TEX_TYPE_2D.
internalFormat the pixel format of the render texture. Its default value is PF_FLOAT16_RGBA.
miscParams a pointer to miscelaneous parameters. Its default value is 0.
fullScreenQuadRenderer a bool flag to decide on full screen rendering on a quad. Its default value is false.
renderTextureName a unique name for the render texture. Its default value is "FilteredPhotonMapTexture". Construtor.

~PhotonMapFilteringPass  ) 
 

Destructor.


Member Function Documentation

void generateFilterKernel t_pmfKernelType  kt,
int  kernelSize
 

Function to generate a filter kernel according to the given shape and size.

Parameters:
kt an enumerated type to specify the kernel shape.
kernelSize an integer to define the half of the kernel size in pixels.

float getAreaCompensation  ) 
 

Getter method to obtain area compensation.

Returns:
the multiplier of the area compensation.

float getNormalThreshold  ) 
 

Getter method to obtain normal threshold.

Returns:
the normal threshold.

float getResolution  ) 
 

Gets the reciprocal value of the resolution of the unfiltered photon map.

Returns:
the reciprocal value of the resolution of the unfiltered photon map.

void onRenderEnd NameValuePairList *  namedParams = 0  )  [protected, virtual]
 

Post rendering method.

It runs after the render-texture object is updated. Place all cleanup code here.

Parameters:
namedParams Parameter list.

Reimplemented from ManagedOgreRenderTexturePass.

void onRenderStart NameValuePairList *  namedParams = 0  )  [protected, virtual]
 

Pre rendering method.

It runs before the render-texture object is updated. Place all shader setup here.

Parameters:
namedParams Parameter list.

Reimplemented from ManagedOgreRenderTexturePass.

void setAreaCompensation float  ac  ) 
 

Setter method to define area compensation.

Parameters:
ac a multiplier of the area compensation.

void setNormalThreshold float  nt  ) 
 

Setter method to define normal threshold.

Parameters:
nt a multiplier of the normal threshold.

void setResolution float  resolution  ) 
 

Sets the reciprocal value of the texture resolution.

Parameters:
resolution a float to set the reciprocal value of the resolution of the unfiltered photon map.


Member Data Documentation

float areaCompensation [private]
 

Parameters to compensate the values of face areas and to define normal threshold.

float f_pmfFilterKernel[25] [private]
 

The filter kernel itself.

This array represents one quarter of the filter kernel. The [0, 0] element of this float array is the origin of the kernel.

int i_pmfKernelSize [private]
 

The half of the filter kernel in pixels. (The full width of the filter kernel is: g_pmf_iKernelSize + 1 + g_pmf_iKernelSize).

t_pmfKernelType i_pmfKernelType [private]
 

An enumeration type to define the shape of the filter kernel.

float normalThreshold [private]
 

Parameters to compensate the values of face areas and to define normal threshold.

float resolution [private]
 

The reciprocal value of the resolution of the unfiltered photon map.


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