00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 #ifndef SG_MAT_MODEL_BIN_HXX
00023 #define SG_MAT_MODEL_BIN_HXX
00024 
00025 #include <math.h>
00026 
00027 class SGMatModelBin {
00028 public:
00029   struct MatModel {
00030     MatModel(const SGVec3f& p, SGMatModel *m, int l) :
00031       position(p), model(m), lod(l)
00032     { }
00033     SGVec3f position;
00034     SGMatModel *model;
00035     int lod;
00036   };
00037   typedef std::vector<MatModel> MatModelList;
00038 
00039   void insert(const MatModel& model)
00040   { 
00041     _models.push_back(model);   
00042   }
00043   
00044   void insert(const SGVec3f& p, SGMatModel *m, int l)
00045   { insert(MatModel(p, m, l)); }
00046 
00047   unsigned getNumModels() const
00048   { return _models.size(); }
00049   const MatModel& getMatModel(unsigned i) const
00050   { return _models[i]; }
00051   
00052 private:
00053   MatModelList _models;
00054 };
00055 
00056 #endif