#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) :
+ position(p)
+ { }
+ SGVec3f position;
+ };
+
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)); }
unsigned getNumTrees() const
{ return _trees.size(); }
TreeList _trees;
};
-osg::Geometry* createOrthQuads(float w, float h, const osg::Matrix& rotate);
-osg::Group* createForest(TreeBin& forest, const osg::Matrix& transform);
+
+typedef std::list<TreeBin*> SGTreeBinList;
+
+osg::Group* createForest(SGTreeBinList& forestList, const osg::Matrix& transform);
}
#endif