PhongReflection Class Reference

#include <PhongReflection.h>

Inheritance diagram for PhongReflection:

LocalReflection ReflectionModel GRAObject List of all members.

Public Types

enum  SpecularEval { PHONG, BLINN }
enum  ShadowDetection { SD_NONE, SD_RAY_FROM_EMITTANCE, SD_GEOMETRY_SAMPLING }

Public Member Functions

 PhongReflection (Emittance *e=NULL, SpecularEval s=PHONG, const Color3f &c=Color3f(0, 0, 0))
virtual ~PhongReflection ()
virtual void setDiffuseBRDF (DiffuseBRDF *)
virtual void setSpecularBRDF (SpecularBRDF *)
virtual void setGlobalAmbient (const Color3f &c)
virtual Color3f * illuminatePoint (PointEnv &, MatVisitor &)
virtual void setScene (Scene *)
virtual Color3f * illuminatePoint (PointEnv &)
const LightArray * lights (void) const
unsigned getBlockingObjCaches (void) const
unsigned getActBlockingObjCache (void) const
void setActBlockingObjCache (unsigned i)
void blockingObjCacheOff (void)
virtual void setEmittance (Emittance *e)

Protected Member Functions

bool _light_visible (unsigned, const Vector3 &, double, const Vector3 &, SceneGraphObject::OID)

Protected Attributes

Color3f _globalAmbient
LightArray * _pLights
ShadowDetection _shadowDetection
unsigned _lightTests
unsigned _numCaches
unsigned _useCache
DiffuseBRDF * _pDiffuseBRDF
SpecularBRDF * _pSpecularBRDF
Emittance * _pEmittance
Scene_pScene

Detailed Description

Definition at line 18 of file PhongReflection.h.


Member Enumeration Documentation

enum ShadowDetection [inherited]
 

Enumerator:
SD_NONE 
SD_RAY_FROM_EMITTANCE 
SD_GEOMETRY_SAMPLING 

Definition at line 41 of file LocalReflection.h.

enum SpecularEval
 

Enumerator:
PHONG 
BLINN 

Definition at line 20 of file PhongReflection.h.


Constructor & Destructor Documentation

PhongReflection Emittance *  e = NULL,
SpecularEval  s = PHONG,
const Color3f &  c = Color3f(0, 0, 0)
 

Definition at line 10 of file PhongReflection.cc.

References ReflectionModel::_pDiffuseBRDF, ReflectionModel::_pSpecularBRDF, PhongReflection::BLINN, and PhongReflection::PHONG.

~PhongReflection  )  [virtual]
 

Definition at line 31 of file PhongReflection.cc.

References ReflectionModel::_pDiffuseBRDF, and ReflectionModel::_pSpecularBRDF.


Member Function Documentation

bool _light_visible unsigned  ,
const Vector3 &  ,
double  ,
const Vector3 &  ,
SceneGraphObject::OID 
[protected, inherited]
 

Definition at line 9 of file LocalReflection.cc.

References LocalReflection::_pLights, ReflectionModel::_pScene, LocalReflection::_useCache, and Scene::root().

void blockingObjCacheOff void   )  [inline, inherited]
 

Definition at line 100 of file LocalReflection.h.

unsigned getActBlockingObjCache void   )  const [inline, inherited]
 

Definition at line 98 of file LocalReflection.h.

unsigned getBlockingObjCaches void   )  const [inline, inherited]
 

Definition at line 97 of file LocalReflection.h.

Color3f * illuminatePoint PointEnv &   )  [virtual, inherited]
 

Implements ReflectionModel.

Reimplemented in GLReflection.

Definition at line 85 of file LocalReflection.cc.

Referenced by RayTracing::_direct_illumination(), and PhongReflection::illuminatePoint().

Color3f * illuminatePoint PointEnv &  ,
MatVisitor & 
[virtual]
 

Reimplemented from LocalReflection.

Definition at line 37 of file PhongReflection.cc.

References PhongReflection::_globalAmbient, and LocalReflection::illuminatePoint().

const LightArray* lights void   )  const [inline, inherited]
 

Definition at line 95 of file LocalReflection.h.

void setActBlockingObjCache unsigned  i  )  [inline, inherited]
 

Definition at line 99 of file LocalReflection.h.

Referenced by RayTracing::_direct_illumination().

virtual void setDiffuseBRDF DiffuseBRDF *   )  [inline, virtual]
 

Reimplemented from ReflectionModel.

Definition at line 32 of file PhongReflection.h.

virtual void setEmittance Emittance *  e  )  [inline, virtual, inherited]
 

Reimplemented in Radiosity, and RayTracing.

Definition at line 57 of file ReflectionModel.h.

Referenced by RayTracing::_check_material(), and RayTracing::setEmittance().

virtual void setGlobalAmbient const Color3f &  c  )  [inline, virtual]
 

Definition at line 34 of file PhongReflection.h.

void setScene Scene  )  [virtual, inherited]
 

Reimplemented from ReflectionModel.

Reimplemented in GLReflection.

Definition at line 76 of file LocalReflection.cc.

References LocalReflection::_numCaches, LocalReflection::_pLights, ReflectionModel::_pScene, and Scene::root().

Referenced by GLReflection::setScene().

virtual void setSpecularBRDF SpecularBRDF *   )  [inline, virtual]
 

Reimplemented from ReflectionModel.

Definition at line 33 of file PhongReflection.h.


Member Data Documentation

Color3f _globalAmbient [protected]
 

Definition at line 23 of file PhongReflection.h.

Referenced by PhongReflection::illuminatePoint().

unsigned _lightTests [protected, inherited]
 

Definition at line 50 of file LocalReflection.h.

unsigned _numCaches [protected, inherited]
 

Definition at line 51 of file LocalReflection.h.

Referenced by LocalReflection::setScene().

DiffuseBRDF* _pDiffuseBRDF [protected, inherited]
 

Definition at line 39 of file ReflectionModel.h.

Referenced by PathTracing::_cast_secondary_rays(), RayTracing::_check_material(), PhotonMapping::_sample_diffuse(), RayTracing::illuminatePoint(), PhotonTracing::illuminatePoint(), LocalReflection::illuminatePoint(), PhongReflection::PhongReflection(), and PhongReflection::~PhongReflection().

Emittance* _pEmittance [protected, inherited]
 

Definition at line 41 of file ReflectionModel.h.

Referenced by LocalReflection::illuminatePoint().

LightArray* _pLights [protected, inherited]
 

Definition at line 48 of file LocalReflection.h.

Referenced by LocalReflection::_light_visible(), LocalReflection::illuminatePoint(), LocalReflection::setScene(), and GLReflection::setScene().

Scene* _pScene [protected, inherited]
 

Definition at line 42 of file ReflectionModel.h.

Referenced by RayTracing::_cast_ray(), LocalReflection::_light_visible(), RayTracing::illuminatePoint(), PhotonTracing::illuminatePoint(), LocalReflection::illuminatePoint(), Radiosity::setScene(), and LocalReflection::setScene().

SpecularBRDF* _pSpecularBRDF [protected, inherited]
 

Definition at line 40 of file ReflectionModel.h.

Referenced by PathTracing::_cast_secondary_rays(), RayTracing::_check_material(), PhotonMapping::_sample_specular(), RayTracing::illuminatePoint(), PhotonTracing::illuminatePoint(), LocalReflection::illuminatePoint(), PhongReflection::PhongReflection(), and PhongReflection::~PhongReflection().

ShadowDetection _shadowDetection [protected, inherited]
 

Definition at line 49 of file LocalReflection.h.

unsigned _useCache [protected, inherited]
 

Definition at line 52 of file LocalReflection.h.

Referenced by LocalReflection::_light_visible().


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