libcrbn/matter/mcontext.hpp

00001 
00002 #ifndef __matter_context_hpp__
00003 #define __matter_context_hpp__
00004 
00005 #include <crbn/matter/minterface.hpp>
00006 
00007 #include "mcache.hpp"
00008 #include "mcreator.hpp"
00009 
00010 //
00011 // All about BRDF (aka matter) managment.
00012 //
00013 
00014 class MatterContext: public MatterInterface
00015 {
00016  public:
00017 
00018   // ctor.
00019   MatterContext();
00020 
00021   // dtor.
00022   virtual ~MatterContext();
00023 
00024   // returns the memory used by this object.
00025   uint32 memory();
00026 
00027   // makes what must be done after the scene declaration.
00028   bool realize();
00029 
00030   // evaluates the 'index' matter.
00031   float eval( uint32 index, intersection& inter, ray& r );
00032 
00033   // create a new matter according to 'pl'.
00034   uint32 create( char* matter_type, paramlist& pl );
00035 
00036   inline mCache* mcache_get() { return &_mcache; }
00037  protected:
00038   mCache _mcache;
00039   mCreator _mcreator;
00040 };
00041 
00042 #endif // __matter_context_hpp__

Generated on Tue Nov 14 15:40:08 2006 for libcrbn by  doxygen 1.5.0