libcrbn/geometry/gcontext.hpp

Go to the documentation of this file.
00001 
00002 #ifndef __geometry_context_hpp__
00003 #define __geometry_context_hpp__
00004 
00005 #include <vector>
00006 
00007 #include <crbn/basic/paramlist.hpp>
00008 
00009 #include <crbn/geometry/geometry.hpp>
00010 
00011 #include "gcreator.hpp"
00012 
00013 //
00014 // This class centralize all about geometry
00015 //
00016 
00025 class GeometryContext
00026 {
00027  public:
00029   GeometryContext();
00030 
00032   virtual ~GeometryContext();
00033 
00035   void clear();
00036 
00038   uint32 memory() { return _memory_used; }
00039 
00041   //
00042   // About objects.
00043   //
00045 
00046   // adds an object of class 'class' with parameters 'paramlist'.
00047   uint32 geometry_add( char* object_type, paramlist& pl );
00048 
00049   void geometry_get_bbox( uint32 geometry_id, bbox& bb );
00050 
00051   Geometry* get( uint32 geometry_id ) {
00052     return _geometry_list[ geometry_id ];
00053   }
00054 
00055  private:
00056   std::vector<Geometry*> _geometry_list;
00057 
00058   gCreator _gcreator;
00059 
00060   uint32 _memory_used;
00061 };
00062 
00063 #endif // __geometry_context_hpp__

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