00001 00002 #ifndef __object_set_hpp__ 00003 #define __object_set_hpp__ 00004 00005 #include <crbn/basic/basic.h> 00006 #include <crbn/basic/vec3.hpp> 00007 #include <crbn/basic/bbox.hpp> 00008 #include <crbn/basic/intersection.hpp> 00009 #include <crbn/basic/packed.h> 00010 00011 #include <crbn/graphics/grcinterface.hpp> 00012 00027 class ObjectSet 00028 { 00029 public: 00030 ObjectSet() : _ok( false ) {} 00031 virtual ~ObjectSet() {} 00032 00036 virtual ObjectSet* duplicate() = 0; 00037 00038 void set_grcinterface( GraphicsCacheInterface* grcinterface ) { _grcinterface = grcinterface; } 00039 00040 bool is_ok() { return _ok; } 00041 00042 uint32 memory() { return _memory_used; } 00043 00047 virtual void clear() = 0; 00048 00054 virtual void bbox_set( bbox& bb ) = 0; 00055 00062 virtual void add( uint32 obj, bbox& bb ) = 0; 00063 00064 virtual void realize() = 0; 00065 00075 virtual uint32 intersect( ray& r, float& distance, packed& data ) = 0; 00076 00077 public: 00078 bool _ok; 00079 uint32 _memory_used; 00080 GraphicsCacheInterface* _grcinterface; 00081 }; 00082 00083 #endif // __object_set_hpp__