00001
00002
00003 #ifndef __PHONG_REFLECTION_H
00004 #define __PHONG_REFLECTION_H
00005
00006 #include <gra/reflection/LocalReflection.h>
00007
00008
00009
00010
00011
00012
00013
00014 using namespace esg;
00015
00016 namespace gra {
00017
00018 class GRA_EXPORT PhongReflection : public LocalReflection {
00019 public:
00020 enum SpecularEval { PHONG, BLINN };
00021
00022 protected:
00023 Color3f _globalAmbient;
00024
00025 public:
00026 PhongReflection (Emittance * e = NULL,
00027 SpecularEval s = PHONG,
00028 const Color3f& c = Color3f(0,0,0));
00029
00030 virtual ~PhongReflection ();
00031
00032 virtual void setDiffuseBRDF (DiffuseBRDF*) {}
00033 virtual void setSpecularBRDF (SpecularBRDF*) {}
00034 virtual void setGlobalAmbient (const Color3f& c) { _globalAmbient.set(c); }
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 virtual Color3f* illuminatePoint(PointEnv & ,
00045 MatVisitor & );
00046 };
00047
00048 }
00049
00050 #endif // __PHONG_REFLECTION_H