]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/material/mat.hxx
Reduce compiler.h to almost nothing (but it's worth keeping around I think, for
[simgear.git] / simgear / scene / material / mat.hxx
index 38cc7c95cc3992d99742bc884b9bb3b3b95ffeaa..621f7940243c8d67c60bd2cefa105b689d3b5c21 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <simgear/compiler.h>
 
-#include STL_STRING      // Standard C++ string library
+#include <string>      // Standard C++ string library
 #include <vector>
 #include <map>
 
@@ -177,11 +177,18 @@ public:
   inline double get_tree_range () const { return tree_range; }
   
   /**
-   * Get the list of textures to use for trees in the forest
+   * Get the number of tree varieties available
    *
-   * @return the vector of forest textures to use.
+   * @return the number of different trees defined in the texture strip
    */
-  inline vector<string> get_tree_textures () const { return  tree_textures; }
+  inline int get_tree_varieties () const { return tree_varieties; }
+  
+  /**
+   * Get the texture strip to use for trees
+   *
+   * @return the texture to use for trees.
+   */
+  inline string get_tree_texture () const { return  tree_texture; }
 
   /**
    * Return if the surface material is solid, if it is not solid, a fluid
@@ -292,7 +299,7 @@ private:
   bool wrapu, wrapv;
 
   // use mipmapping?
-  int mipmap;
+  bool mipmap;
 
   // coverage of night lighting.
   double light_coverage;
@@ -309,6 +316,9 @@ private:
   // Width of the tree
   double tree_width;
 
+  // Number of varieties of tree texture
+  int tree_varieties;
+
   // True if the material is solid, false if it is a fluid
   bool solid;
 
@@ -336,8 +346,8 @@ private:
   // taxiway-/runway-sign texture elements
   map<string, SGSharedPtr<SGMaterialGlyph> > glyphs;
   
-  // The list of forest textures, used when creating trees
-  vector<string> tree_textures;
+  // Tree texture, typically a strip of applicable tree textures
+  string tree_texture;
 \f
   ////////////////////////////////////////////////////////////////////
   // Internal constructors and methods.
@@ -349,7 +359,7 @@ private:
   void build_state( bool defer_tex_load );
   void set_state( osg::StateSet *s );
 
-  void assignTexture( osg::StateSet *state, const std::string &fname, int _wrapu = TRUE, int _wrapv = TRUE, int _mipmap = TRUE );
+  void assignTexture( osg::StateSet *state, const std::string &fname, bool _wrapu = true, bool _wrapv = true, bool _mipmap = true );
 
 };