OgreRenderingRun Class Reference

Base class of a RenderingRun in an OGRE environment. More...

Inheritance diagram for OgreRenderingRun:

RenderingRun OgreCausticCubeMapRenderingRun OgreColorCubeMapRenderingRun OgreDepthShadowMapRenderingRun OgreDistanceCubeMapRenderingRun OgrePhotonMapRenderingRun OgreReducedCubeMapRenderingRun OgreSceneCameraDepthRenderingRun List of all members.

Public Member Functions

 OgreRenderingRun (unsigned long startFrame, unsigned long updateInterval)
 Constructor.
OgreRenderingRunasOgreRenderingRun ()
 Conversion to OgreRenderRun.

Protected Member Functions

Vector3 getCubeMapFaceDirection (unsigned char faceId)
 Returns a direction for a cubemap face id.
Texture * createCubeRenderTexture (String name, const Vector3 position, unsigned int resolution=512, PixelFormat format=PF_FLOAT16_RGBA, int numMips=0, ColourValue clearColor=ColourValue::Black)
 Creates a cubemap texture.
void setMaterialForRenderables (String &materialName, RenderQueue *rq)
 Sets the given material for each Renderable in a RenderQueue.
void setMaterialForVisibles (String &materialName, Camera *cam, bool shadowcastersonly=false)
 Sets the given material for each Renderable visible from a given camera.
void restoreMaterials ()
 Restores previously stored materials.
void renderFullscreenQuad (String materialName, RenderTarget *target)
 Renderes a full screen quad on a given RendderTarget with a given material.
void renderPixelSprites (String &materialName, RenderTarget *rt, int width, int height)
 Renderes sprites to pixels of the screen on a given RendderTarget with a given material.

Protected Attributes

std::map< Renderable *, String > visibleObjects
 map of Renderables which will be rendered with a given material
SpriteSet * pixelSprites
 SpriteSet used in pixel sprite rendering.
String spriteSetName
 unique name of the SpriteSet used in pixel sprite rendering

Static Protected Attributes

static MovablePlane * fullScreenQuad = NULL
 fulls screen quad plane used in full screen quad rendering
static Entity * fullScreenQuadEntity = NULL
 fulls screen quad Entity used in full screen quad rendering
static SceneNode * fullScreenQuadNode = NULL
 fulls screen quad SceneNode used in full screen quad rendering

Detailed Description

Base class of a RenderingRun in an OGRE environment.


Constructor & Destructor Documentation

OgreRenderingRun::OgreRenderingRun unsigned long  startFrame,
unsigned long  updateInterval
[inline]
 

Constructor.

Parameters:
startFrame adds an offset to the current frame number to help evenly distribute updates between frames
updateInterval photon map update frequency


Member Function Documentation

OgreRenderingRun* OgreRenderingRun::asOgreRenderingRun  )  [inline, virtual]
 

Conversion to OgreRenderRun.

This function is needed because of virtual inheritance.

Reimplemented from RenderingRun.

Texture * OgreRenderingRun::createCubeRenderTexture String  name,
const Vector3  position,
unsigned int  resolution = 512,
PixelFormat  format = PF_FLOAT16_RGBA,
int  numMips = 0,
ColourValue  clearColor = ColourValue::Black
[protected]
 

Creates a cubemap texture.

This is a helper function to easily create a cubemap texture and automaticly attach viewports to each face so it can be used as a rendertarget.

Parameters:
name the name of the texture to be created
position the initial position of the cubemap
resolution the resolution of one cubemapface
format the pixel format of the cubemap
numMips the number of mipmap levels
clearColor initial color

Vector3 OgreRenderingRun::getCubeMapFaceDirection unsigned char  faceId  )  [protected]
 

Returns a direction for a cubemap face id.

This is a helper function to retrieve the normal direction of a given cubemap face.

Parameters:
faceId the number of the face

void OgreRenderingRun::renderFullscreenQuad String  materialName,
RenderTarget *  target
[protected]
 

Renderes a full screen quad on a given RendderTarget with a given material.

Parameters:
materialName the name of the material bind to the quad
target the RenderTarget the quad should be rendered on

void OgreRenderingRun::renderPixelSprites String &  materialName,
RenderTarget *  rt,
int  width,
int  height
[protected]
 

Renderes sprites to pixels of the screen on a given RendderTarget with a given material.

Pixel sprites are pixel sized quads, placed on each pixel of the RenderTarget. The number of sprites not necessary corresponds to the resolution of the rendertarget. The pixel quads will evenly fill the rendertarget's area with sizes corresponding to the given resolution. We can render fewer or more pixel quads than the number of pixels the rendertarget has (eg.: in case of caustic cubemap generation).

Parameters:
materialName the name of the material bind to the pixel sprites
rt the RenderTarget the quads should be rendered on
width the desired resolution width of the sprites
height the desired resolution height of the sprites

void OgreRenderingRun::restoreMaterials  )  [protected]
 

Restores previously stored materials.

This helper function is typically used after a setMaterialForRenderables or setMaterialForVisibles call and a rendering process to restore the original material settings. The function also tells the current SceneManager to search for visible objects, as this is the default behaviour of SceneManager.

void OgreRenderingRun::setMaterialForRenderables String &  materialName,
RenderQueue *  rq
[protected]
 

Sets the given material for each Renderable in a RenderQueue.

This is a helper function to set a material to each element of a previously filled Renderque. The orginal material of the Renderables are stored so they can be restored later. The function also tells the current SceneManager not to search for visible objects, as we are going to use the given RenderQueue during the next rendering.

Parameters:
materialName the name of the material to set for the Renderables
rq pointer to the filled Renderqueue instance to set material for

void OgreRenderingRun::setMaterialForVisibles String &  materialName,
Camera *  cam,
bool  shadowcastersonly = false
[protected]
 

Sets the given material for each Renderable visible from a given camera.

This helper function is similar to setMaterialForRenderables but it is also responsible for filling the RenderQueue. First the RenderQueue of the current SceneManager fill be filled with the visible objects seen from the given camera. Then the required material will be set for each element of the RenderQueue. The orginal material of the Renderables are stored so they can be restored later. The function also tells the current SceneManager not to search for visible objects, as we are going to use the filled RenderQueue during the next rendering.

Parameters:
materialName the name of the material to set for the Renderables
cam pointer to the camera from which visible objects should be searched
shadowcastersonly flag to search for only shadow casters


Member Data Documentation

MovablePlane * OgreRenderingRun::fullScreenQuad = NULL [static, protected]
 

fulls screen quad plane used in full screen quad rendering

See also:
renderFullscreenQuad

Entity * OgreRenderingRun::fullScreenQuadEntity = NULL [static, protected]
 

fulls screen quad Entity used in full screen quad rendering

See also:
renderFullscreenQuad

SceneNode * OgreRenderingRun::fullScreenQuadNode = NULL [static, protected]
 

fulls screen quad SceneNode used in full screen quad rendering

See also:
renderFullscreenQuad

SpriteSet* OgreRenderingRun::pixelSprites [protected]
 

SpriteSet used in pixel sprite rendering.

See also:
renderPixelSprites

String OgreRenderingRun::spriteSetName [protected]
 

unique name of the SpriteSet used in pixel sprite rendering

See also:
renderPixelSprites

std::map<Renderable*, String> OgreRenderingRun::visibleObjects [protected]
 

map of Renderables which will be rendered with a given material

The String stores the original material name that will be restored after rendering.

See also:
setMaterialForVisibles

setMaterialForRenderables

restoreMaterials


The documentation for this class was generated from the following files:
Generated on Thu Apr 27 17:29:41 2006 for GameTools Illumination Module by  doxygen 1.4.6-NO