paysages3d/src/definition/CloudsDefinition.cpp

21 lines
586 B
C++
Raw Normal View History

2013-11-15 22:26:44 +00:00
#include "CloudsDefinition.h"
#include "CloudLayerDefinition.h"
static DefinitionNode *_layerConstructor(Layers *parent, const std::string &name) {
return new CloudLayerDefinition(parent, name);
2013-11-15 22:26:44 +00:00
}
CloudsDefinition::CloudsDefinition(DefinitionNode *parent) : Layers(parent, "clouds", _layerConstructor) {
2013-11-15 22:26:44 +00:00
}
void CloudsDefinition::applyPreset(CloudsPreset preset) {
2013-11-15 22:26:44 +00:00
clear();
if (preset == CLOUDS_PRESET_PARTLY_CLOUDY) {
CloudLayerDefinition layer(NULL, "Strato-cumulus");
layer.type = CloudLayerDefinition::STRATOCUMULUS;
2013-11-15 22:26:44 +00:00
addLayer(layer);
}
}