CookTorranceBRDF.h

Go to the documentation of this file.
00001 /* $Id: CookTorranceBRDF.h,v 1.1 2002/12/05 15:02:18 cvs Exp $ */
00002 
00003 #ifndef __COOK_AND_TORRANCE_BRDF_H
00004 #define __COOK_AND_TORRANCE_BRDF_H
00005 
00006 #include <esg/brdf/SpecularBRDF.h>
00007 #include <esg/brdf/PhongBRDF.h>
00008 
00009 namespace esg {
00010 
00019 class OGSCENE_EXPORT CookTorranceBRDF : public SpecularBRDF {
00020 protected:
00021         virtual void _duplicate_attributes (const BRDF& src) {
00022             SpecularBRDF::_duplicate_attributes(src);
00023         }
00024         
00025 public:
00029         CookTorranceBRDF (void) : SpecularBRDF(true) {}
00030 
00031         virtual RetVal reflectance(const MatVisitor& visitor,
00032                                    const Vector3*    L,
00033                                    const Vector3*    V,
00034                                    const Vector3*    N,
00035                                    Vector3&          color);
00036 
00037         virtual RetVal reflectanceVNL(const MatVisitor& visitor,
00038                                       const Vector3*    L,
00039                                       const Vector3*    V,
00040                                       const Vector3*    N,
00041                                       double            NV,
00042                                       double            NL,
00043                                       Vector3&          color);
00044         
00045         virtual RetVal reflectanceNL(const MatVisitor& visitor,
00046                                      const Vector3*    L,
00047                                      const Vector3*    V,
00048                                      const Vector3*    N,
00049                                      double            NL,
00050                                      Vector3&          color);
00051 
00052         virtual BRDF * clone (void) const { return new CookTorranceBRDF(); }
00053 
00054         virtual double albedo (const MatVisitor& visitor,
00055                                const Vector3&    N,
00056                                const Vector3*    V) const {
00057             PhongBRDF b;
00058             return b.albedo(visitor, N, V); // TO DO!
00059         }
00060 
00061         virtual void importanceSample(const MatVisitor& visitor,
00062                                       const Vector3&    D,
00063                                       double            r1,
00064                                       double            r2,
00065                                       Vector3&          dir,
00066                                       double*           pPDFVal) {
00067         // TO DO!
00068             PhongBRDF b;
00069             b.importanceSample(visitor, D, r1, r2, dir, pPDFVal);
00070         }
00071 
00072         virtual Vector2 dir2uv (const MatVisitor& visitor,
00073                                 const Vector3&    N,
00074                                 const Vector3&    D) const {
00075             // TO DO
00076             PhongBRDF b;
00077             return dir2uv(visitor, N, D);
00078         }
00079 };
00080     
00081 }; // namespace
00082 
00083 #endif

Generated on Wed Jun 28 12:24:28 2006 for esg by  doxygen 1.4.6