RadShader Class Reference

#include <RadShader.h>

Inheritance diagram for RadShader:

GlobalShader Shader GRAObject List of all members.

Public Member Functions

 RadShader (Radiosity *m, int d, LocalShader *s)
virtual void setScene (Scene *)
virtual void distributeEnergy (void)
virtual bool setRenderedShape (SceneGraphObject *, const Matrix4 *)
virtual Color3f * illuminatePoint (const Vector3 &, const Vector3 &, const Vector3 &, float, double *, const Matrix4 *)

Protected Attributes

int _meshDensity
LocalShader_pLocalShader
ReflectionModel_pReflectionModel
SceneGraphObject * _pShape
Scene_pScene
DiffuseBRDF * _pDefaultDiffBRDF
SpecularBRDF * _pDefaultSpecBRDF

Detailed Description

Shader distributing omnidirectional radiance-based energy in scene and emplying any given local shader for final surface shading. The local shader must be able to exploit precomputed energy.

Definition at line 21 of file RadShader.h.


Constructor & Destructor Documentation

RadShader Radiosity m,
int  d,
LocalShader s
[inline]
 

Definition at line 27 of file RadShader.h.


Member Function Documentation

void distributeEnergy void   )  [virtual]
 

View-independent global energy distribution in the whole scene (first stage of the global illumination process)

Implements Shader.

Definition at line 82 of file RadShader.cc.

References Shader::_pReflectionModel, and ReflectionModel::illuminatePoint().

Color3f * illuminatePoint const Vector3 &  ,
const Vector3 &  ,
const Vector3 &  ,
float  ,
double *  ,
const Matrix4 * 
[virtual]
 

View-restricted illumination of individual points on surface (second stage of the global illumination process). Two combinations of parametters are possible: 1) Vectors are not transformed and the transformation matrix is identical to the matrix of the setRenderedShape() function. 2) Vectors are already transformed and the matrix is NULL.

Parameters:
location point's location on surface (space coords.)
normal normalized normal vector
eyeDir normalized direction from towards viewer
eyeDist distance to viewer
pNV either cross-product of normal and eyeDir or NULL
pTrMat transformation matrix or NULL
Returns:
final color of the point on success, NULL otherwise

Implements Shader.

Definition at line 95 of file RadShader.cc.

References RadShader::_pLocalShader, and Shader::illuminatePoint().

bool setRenderedShape SceneGraphObject *  s,
const Matrix4 *  m
[virtual]
 

Sets the shape of interest used for per-surface point illumination, see illuminatePoint().

Parameters:
pShape shape of interest
pTrMat transformation matrix of the shape

Reimplemented from Shader.

Definition at line 89 of file RadShader.cc.

References RadShader::_pLocalShader, and Shader::setRenderedShape().

void setScene Scene pScene  )  [virtual]
 

Sets the scene for energy distribution, see distributeEnergy().

Parameters:
o scene

Reimplemented from Shader.

Definition at line 8 of file RadShader.cc.

References RadShader::_meshDensity, Shader::_pScene, and Scene::root().


Member Data Documentation

int _meshDensity [protected]
 

Definition at line 23 of file RadShader.h.

Referenced by RadShader::setScene().

DiffuseBRDF* _pDefaultDiffBRDF [protected, inherited]
 

Definition at line 39 of file Shader.h.

Referenced by PhotonMapShader::distributeEnergy().

SpecularBRDF* _pDefaultSpecBRDF [protected, inherited]
 

Definition at line 40 of file Shader.h.

Referenced by PhotonMapShader::distributeEnergy().

LocalShader* _pLocalShader [protected]
 

Definition at line 24 of file RadShader.h.

Referenced by RadShader::illuminatePoint(), and RadShader::setRenderedShape().

ReflectionModel* _pReflectionModel [protected, inherited]
 

Definition at line 36 of file Shader.h.

Referenced by RadShader::distributeEnergy(), and RTShader::illuminatePoint().

Scene* _pScene [protected, inherited]
 

Definition at line 38 of file Shader.h.

Referenced by PhotonMapShader::_create_maps_per_shape(), PhotonMapShader::_create_scene_maps(), PhotonMapShader::_emit_caustic_photon(), PhotonMapShader::_emit_global_photon(), PhotonMapShader::distributeEnergy(), and RadShader::setScene().

SceneGraphObject* _pShape [protected, inherited]
 

Definition at line 37 of file Shader.h.

Referenced by RTShader::illuminatePoint(), and GLShader::setRenderedShape().


The documentation for this class was generated from the following files:
Generated on Tue Nov 21 15:11:43 2006 for gra by  doxygen 1.4.6