]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/tgdb/TreeBin.hxx
Replace SG_USE_STD() by using std::
[simgear.git] / simgear / scene / tgdb / TreeBin.hxx
index da94313e9763adf634acd7a0e3f4a16764abf9fc..3c7970281005d2e83d1f9bd756aa801b1f19005f 100644 (file)
 #define TREE_BIN_HXX
 
 #include <vector>
+#include <string>
 
 #include <osg/Geometry>
 #include <osg/Group>
 #include <osg/Matrix>
 
-#include <simgear/math/SGVec3.hxx>
+#include <simgear/math/SGMath.hxx>
 
 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, int t, float s) :
+      position(p), texture_index(t), scale(s)
+    { }
+    SGVec3f position;
+    int texture_index;
+    float scale;
+  };
+
     typedef std::vector<Tree> 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, t, s)); }
 
     unsigned getNumTrees() const
     { return _trees.size(); }