diff --git a/simgear/scene/material/mat.cxx b/simgear/scene/material/mat.cxx index 0eaa37a6..0483089e 100644 --- a/simgear/scene/material/mat.cxx +++ b/simgear/scene/material/mat.cxx @@ -328,6 +328,7 @@ SGMaterial::read_properties(const SGReaderWriterOptions* options, // Random vegetation properties wood_coverage = props->getDoubleValue("wood-coverage", 0.0); + is_plantation = props->getBoolValue("plantation",false); tree_effect = props->getStringValue("tree-effect", "Effects/tree"); tree_height = props->getDoubleValue("tree-height-m", 0.0); tree_width = props->getDoubleValue("tree-width-m", 0.0); diff --git a/simgear/scene/material/mat.hxx b/simgear/scene/material/mat.hxx index ca70bd65..8e4647d2 100644 --- a/simgear/scene/material/mat.hxx +++ b/simgear/scene/material/mat.hxx @@ -244,6 +244,13 @@ public: */ inline double get_wood_coverage () const { return wood_coverage; } + /** + * Get whether or not vegetation is regularly spaced + * + * @return flag: if true, vegetation is regularly spaced. + */ + inline bool get_is_plantation () const { return is_plantation; } + /** * Get the tree height. * @@ -455,6 +462,9 @@ private: // coverage of woods double wood_coverage; + // are trees regularly planted? + bool is_plantation; + // Range at which trees become visible double tree_range;