ripplebumpmap.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 //
00005 
00006 #ifndef RIPPLEBUMPMAP_H
00007 #define RIPPLEBUMPMAP_H
00008 
00009 #include "bumpmap.h"
00010 #include "pluginfactory.h"
00011 
00012 class RippleBumpMap;
00013 
00015 BumpMap * new_ripplebumpmap(xmlNode * node);
00017 void delete_ripplebumpmap(RippleBumpMap * bumpmap);
00018 
00021 class RippleBumpMap : public BumpMap
00022 {
00023     protected:
00025     class StaticInit {
00026         public:
00028             StaticInit() {
00029                 BumpMapFactory::get_instance()->registerPlugin("ripple", sigc::ptr_fun(new_ripplebumpmap));
00030             }
00031     };
00032 
00034     static StaticInit m_init;
00035 
00036     public:
00038         virtual Ray perturb_normal(const Ray& normal, const Point3D& intersection_point) ;
00039 };
00040 
00041 BumpMap * new_ripplebumpmap(xmlNode * node) {
00042     
00043     // TODO attributes? scaling at least?
00044 
00045     BumpMap * rv = new RippleBumpMap();
00046     return rv;
00047 }
00048 
00049 void delete_ripplebumpmap(RippleBumpMap * ptr) {
00050     delete ptr, ptr = NULL;
00051 }
00052 
00053 #endif
00054 

Generated on Tue Oct 30 22:12:15 2007 for mbrt by  doxygen 1.5.2