Add "is_plantation" property to materials definitions.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user