#include <plib/ul.h>
-#ifdef SG_MATH_EXCEPTION_CLASH
-# include <math.h>
-#endif
-
#include <osg/CullFace>
#include <osg/Material>
#include <osg/ShadeModel>
{
string tname = textures[i]->getStringValue();
string otname = tname;
- if (season && strncmp(season, "summer", 6))
- {
- if (tname.substr(0,7) == "Terrain")
- tname.insert(7,"."+string(season));
- }
if (tname == "") {
tname = "unknown.rgb";
wrapv = props->getBoolValue("wrapv", true);
mipmap = props->getBoolValue("mipmap", true);
light_coverage = props->getDoubleValue("light-coverage", 0.0);
+ tree_coverage = props->getDoubleValue("tree-coverage", 0.0);
+ tree_height = props->getDoubleValue("tree-height-m", 0.0);
+ tree_width = props->getDoubleValue("tree-width-m", 0.0);
+ tree_range = props->getDoubleValue("tree-range-m", 0.0);
+ tree_varieties = props->getIntValue("tree-varieties", 1);
+
+ SGPath tpath( fg_root );
+ tpath.append(props->getStringValue("tree-texture"));
+ tree_texture = tpath.str();
// surface values for use with ground reactions
solid = props->getBoolValue("solid", true);
}
void SGMaterial::assignTexture( osg::StateSet *state, const std::string &fname,
- int _wrapu, int _wrapv, int _mipmap )
+ bool _wrapu, bool _wrapv, bool _mipmap )
{
osg::Texture2D* texture = SGLoadTexture2D(fname, 0, _wrapu, _wrapv,
mipmap ? -1 : 0);