X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscene%2Ftgdb%2FSGModelBin.hxx;h=bd61a948a6680e307422ad187e3a1028ca946cde;hb=da07871bc60569a02c1dd12aee754d5c85a55738;hp=1c8514187351ab839959a172d1a726183f8403da;hpb=605125c0e7589ab027561227dcc2bb8e0a51f1ab;p=simgear.git diff --git a/simgear/scene/tgdb/SGModelBin.hxx b/simgear/scene/tgdb/SGModelBin.hxx index 1c851418..bd61a948 100755 --- a/simgear/scene/tgdb/SGModelBin.hxx +++ b/simgear/scene/tgdb/SGModelBin.hxx @@ -27,48 +27,22 @@ class SGMatModelBin { public: struct MatModel { - MatModel(const SGVec3f& p, SGMatModel *m) : - position(p), model(m) + MatModel(const SGVec3f& p, SGMatModel *m, int l) : + position(p), model(m), lod(l) { } SGVec3f position; SGMatModel *model; + int lod; }; typedef std::vector MatModelList; void insert(const MatModel& model) { - float x = model.position.x(); - float y = model.position.y(); - float z = model.position.z(); - - if (_models.size() == 0) - { - min_x = x; - max_x = x; - - min_y = y; - max_y = y; - - min_z = z; - max_z = z; - } - else - { - min_x = SGMisc::min(min_x, x); - max_x = SGMisc::max(max_x, x); - - min_y = SGMisc::min(min_y, y); - max_y = SGMisc::max(max_y, y); - - min_z = SGMisc::min(min_z, z); - max_z = SGMisc::max(max_z, z); - } - _models.push_back(model); } - void insert(const SGVec3f& p, SGMatModel *m) - { insert(MatModel(p, m)); } + void insert(const SGVec3f& p, SGMatModel *m, int l) + { insert(MatModel(p, m, l)); } unsigned getNumModels() const { return _models.size(); } @@ -77,12 +51,6 @@ public: private: MatModelList _models; - float min_x; - float max_x; - float min_y; - float max_y; - float min_z; - float max_z; }; #endif