2015-10-18 15:26:19 +00:00
|
|
|
#include "VegetationLayerDefinition.h"
|
|
|
|
|
|
|
|
#include "VegetationModelDefinition.h"
|
2015-10-18 20:15:19 +00:00
|
|
|
#include "VegetationPresenceDefinition.h"
|
2015-10-18 15:26:19 +00:00
|
|
|
|
2015-12-13 16:16:26 +00:00
|
|
|
VegetationLayerDefinition::VegetationLayerDefinition(DefinitionNode *parent, const string &name)
|
2015-11-20 00:16:48 +00:00
|
|
|
: DefinitionNode(parent, name, "vegetationlayer") {
|
2015-10-18 15:26:19 +00:00
|
|
|
model = new VegetationModelDefinition(this);
|
2015-10-18 20:15:19 +00:00
|
|
|
presence = new VegetationPresenceDefinition(this);
|
2015-10-18 15:26:19 +00:00
|
|
|
}
|
|
|
|
|
2015-11-09 21:38:00 +00:00
|
|
|
double VegetationLayerDefinition::getMaxHeight() const {
|
2015-11-02 22:00:02 +00:00
|
|
|
return presence->getMaxHeight();
|
|
|
|
}
|
|
|
|
|
2015-12-10 18:48:42 +00:00
|
|
|
void VegetationLayerDefinition::applyPreset(VegetationLayerPreset, RandomGenerator &random) {
|
|
|
|
model->randomize(random);
|
2015-10-18 15:26:19 +00:00
|
|
|
}
|