X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscene%2Ftgdb%2FTreeBin.hxx;h=bb542c230edbd80860cc4f9cbca13bd2f84fba0e;hb=2cc2a857a2cc2daff30601e0f8f697c768dd5b30;hp=48a327fe606e42d12a08b17c4c2015bd7ab0996f;hpb=4b63bc051e701835a12f6f1eca5437b6abd58593;p=simgear.git diff --git a/simgear/scene/tgdb/TreeBin.hxx b/simgear/scene/tgdb/TreeBin.hxx index 48a327fe..bb542c23 100644 --- a/simgear/scene/tgdb/TreeBin.hxx +++ b/simgear/scene/tgdb/TreeBin.hxx @@ -23,44 +23,45 @@ #define TREE_BIN_HXX #include +#include #include #include #include -#include +#include namespace simgear { class TreeBin { public: - struct Tree { - Tree(const SGVec3f& p, string t, float h, float w, double r) : - position(p), texture(t), height(h), width(w), range(r) - { } - SGVec3f position; - string texture; - float height; - float width; - double range; - }; + struct Tree { + Tree(const SGVec3f& p) : + position(p) + { } + SGVec3f position; + }; + typedef std::vector TreeList; + int texture_varieties; + double range; + float height; + float width; + std::string texture; + void insert(const Tree& t) { _trees.push_back(t); } - void insert(const SGVec3f& p, string t, float h, float w, double r) - { insert(Tree(p, t, h, w, r)); } + void insert(const SGVec3f& p, int t, float s) + { insert(Tree(p)); } unsigned getNumTrees() const { return _trees.size(); } const Tree& getTree(unsigned i) const { return _trees[i]; } - -private: TreeList _trees; }; -osg::Geometry* createOrthQuads(float w, float h, const osg::Matrix& rotate); -osg::Group* createForest(const TreeBin& forest, const osg::Matrix& transform); +osg::Group* createForest(TreeBin& forest, const osg::Matrix& transform); } #endif