paysages3d/src/definition/VegetationLayerDefinition.cpp

19 lines
605 B
C++
Raw Normal View History

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
VegetationLayerDefinition::VegetationLayerDefinition(DefinitionNode *parent, const string &name)
: 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
}
double VegetationLayerDefinition::getMaxHeight() const {
2015-11-02 22:00:02 +00:00
return presence->getMaxHeight();
}
void VegetationLayerDefinition::applyPreset(VegetationLayerPreset, RandomGenerator &random) {
model->randomize(random);
2015-10-18 15:26:19 +00:00
}