2013-11-15 22:26:44 +00:00
|
|
|
#include "CloudsDefinition.h"
|
|
|
|
|
|
|
|
#include "CloudLayerDefinition.h"
|
|
|
|
|
2015-08-12 20:21:10 +00:00
|
|
|
static DefinitionNode* _layerConstructor(Layers* parent)
|
2013-11-15 22:26:44 +00:00
|
|
|
{
|
|
|
|
return new CloudLayerDefinition(parent);
|
|
|
|
}
|
|
|
|
|
2015-08-12 20:21:10 +00:00
|
|
|
CloudsDefinition::CloudsDefinition(DefinitionNode* parent):
|
2015-08-12 15:02:27 +00:00
|
|
|
Layers(parent, "clouds", _layerConstructor)
|
2013-11-15 22:26:44 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void CloudsDefinition::applyPreset(CloudsPreset preset)
|
|
|
|
{
|
|
|
|
clear();
|
|
|
|
|
|
|
|
if (preset == CLOUDS_PRESET_PARTLY_CLOUDY)
|
|
|
|
{
|
|
|
|
CloudLayerDefinition* layer = new CloudLayerDefinition(this);
|
2013-12-04 21:52:18 +00:00
|
|
|
layer->type = CloudLayerDefinition::STRATOCUMULUS;
|
|
|
|
layer->setName("Strato-cumulus");
|
2013-11-15 22:26:44 +00:00
|
|
|
addLayer(layer);
|
|
|
|
}
|
|
|
|
}
|