#include <GLShader.h>
Inheritance diagram for GLShader:
Public Types | |
enum | MeshMode { VERTICES, EDGES, FACETS, FACET_EDGES, FACET_CORNERS } |
enum | ShadingMode { COLOR, FLAT, SMOOTH, TEXTURE } |
enum | FacetMode { AUTO, FRONT, BACK, FRONT_AND_BACK } |
Public Member Functions | |
GLShader (MeshMode mmode=FACETS, ShadingMode smode=SMOOTH, int density=1, FacetMode fmode=AUTO) | |
virtual | ~GLShader () |
virtual bool | setRenderedShape (SceneGraphObject *pShape, const Matrix4 *pTrMat) |
virtual Color3f * | illuminatePoint (const Vector3 &location, const Vector3 &normal, const Vector3 &eyeDir, float eyeDist, double *pNV, const Matrix4 *pTrMat) |
virtual void | setMeshDensity (int d) |
virtual int | getMeshDensity () const |
virtual void | distributeEnergy (void) |
virtual void | setScene (Scene *o) |
Protected Member Functions | |
void | _illum_vertices (Mesh &) const |
void | _illum_edges (Mesh &) const |
void | _illum_facets (GLenum, Mesh &) const |
bool | _use_precomputed_energy (PolygonalEnergy &) const |
Protected Attributes | |
MeshMode | _meshMode |
ShadingMode | _shadingMode |
int | _meshDensity |
FacetMode | _facetMode |
bool | _exploitEnergy |
whether to exploit precomputed energy coats | |
ReflectionModel * | _pReflectionModel |
SceneGraphObject * | _pShape |
Scene * | _pScene |
DiffuseBRDF * | _pDefaultDiffBRDF |
SpecularBRDF * | _pDefaultSpecBRDF |
Following combinations of mesh/shading/facet modes are currently supported. When FLAT shading mode is required then appropriate FACET mode is automaticaly selected.
VERTICES & (COLOR | SMOOTH) EDGES & (COLOR | SMOOTH) FACET* & (COLOR | FLAT | SMOOTH) & (AUTO | BACK | FRONT | FRONT_AND_BACK)
Definition at line 29 of file GLShader.h.
|
If MeshMode::FACET is used then the following restrictions can be applied to omit one-side facets.
Definition at line 56 of file GLShader.h. |
|
Type of mesh visualization.
Definition at line 34 of file GLShader.h. |
|
Shading mode.
Definition at line 45 of file GLShader.h. |
|
Constructor.
Definition at line 84 of file GLShader.h. |
|
Destructor. Definition at line 102 of file GLShader.h. |
|
Definition at line 29 of file GLShader.cc. References GLShader::_shadingMode, GLShader::SMOOTH, and GLShader::TEXTURE. Referenced by GLShader::setRenderedShape(). |
|
Definition at line 58 of file GLShader.cc. References GLShader::_facetMode, GLShader::_shadingMode, GLShader::AUTO, GLShader::BACK, GLShader::FLAT, GLShader::FRONT, GLShader::FRONT_AND_BACK, GLShader::SMOOTH, and GLShader::TEXTURE. Referenced by GLShader::setRenderedShape(). |
|
Definition at line 6 of file GLShader.cc. References GLShader::_shadingMode, GLShader::SMOOTH, and GLShader::TEXTURE. Referenced by GLShader::setRenderedShape(). |
|
Definition at line 124 of file GLShader.cc. Referenced by GLShader::setRenderedShape(). |
|
View-independent global energy distribution in the whole scene (first stage of the global illumination process) Implements Shader. Definition at line 41 of file LocalShader.h. |
|
Definition at line 151 of file GLShader.h. |
|
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.
Implements Shader. Definition at line 132 of file GLShader.h. |
|
Sets relative density of produced meshes.
Definition at line 146 of file GLShader.h. |
|
Sets the shape of interest used for per-surface point illumination, see illuminatePoint().
Reimplemented from Shader. Definition at line 163 of file GLShader.cc. References LocalShader::_exploitEnergy, GLShader::_illum_edges(), GLShader::_illum_facets(), GLShader::_illum_vertices(), GLShader::_meshDensity, GLShader::_meshMode, Shader::_pShape, GLShader::_shadingMode, GLShader::_use_precomputed_energy(), GLShader::COLOR, GLShader::EDGES, GLShader::FACET_CORNERS, GLShader::FACET_EDGES, GLShader::FACETS, and GLShader::VERTICES. |
|
Sets the scene for energy distribution, see distributeEnergy().
Reimplemented in PhotonMapShader, and RadShader. Definition at line 67 of file Shader.h. Referenced by PhotonMapShader::setScene(). |
|
whether to exploit precomputed energy coats
Definition at line 19 of file LocalShader.h. Referenced by GLShader::setRenderedShape(). |
|
Definition at line 67 of file GLShader.h. Referenced by GLShader::_illum_facets(). |
|
Definition at line 66 of file GLShader.h. Referenced by GLShader::setRenderedShape(). |
|
Definition at line 64 of file GLShader.h. Referenced by GLShader::setRenderedShape(). |
|
Definition at line 39 of file Shader.h. Referenced by PhotonMapShader::distributeEnergy(). |
|
Definition at line 40 of file Shader.h. Referenced by PhotonMapShader::distributeEnergy(). |
|
Definition at line 36 of file Shader.h. Referenced by RadShader::distributeEnergy(), and RTShader::illuminatePoint(). |
|
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(). |
|
Definition at line 37 of file Shader.h. Referenced by RTShader::illuminatePoint(), and GLShader::setRenderedShape(). |
|
Definition at line 65 of file GLShader.h. Referenced by GLShader::_illum_edges(), GLShader::_illum_facets(), GLShader::_illum_vertices(), and GLShader::setRenderedShape(). |