2012-12-24 13:59:17 +00:00
|
|
|
#include "private.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Atmosphere presets.
|
|
|
|
*/
|
|
|
|
|
|
|
|
void atmosphereAutoPreset(AtmosphereDefinition* definition, AtmospherePreset preset)
|
|
|
|
{
|
|
|
|
definition->sun_color.r = 1.0;
|
|
|
|
definition->sun_color.g = 0.95;
|
|
|
|
definition->sun_color.b = 0.9;
|
|
|
|
definition->sun_color.a = 1.0;
|
2013-01-30 17:00:26 +00:00
|
|
|
definition->sun_radius = 1.0;
|
2012-12-24 13:59:17 +00:00
|
|
|
definition->humidity = 0.1;
|
|
|
|
|
2013-03-11 16:57:26 +00:00
|
|
|
definition->model = ATMOSPHERE_MODEL_BRUNETON;
|
|
|
|
|
2012-12-24 13:59:17 +00:00
|
|
|
switch (preset)
|
|
|
|
{
|
|
|
|
case ATMOSPHERE_PRESET_CLEAR_DAY:
|
2012-12-24 15:15:40 +00:00
|
|
|
definition->hour = 15;
|
|
|
|
definition->minute = 0;
|
2013-01-14 19:07:56 +00:00
|
|
|
definition->dome_lighting = 0.2;
|
2012-12-24 13:59:17 +00:00
|
|
|
break;
|
|
|
|
case ATMOSPHERE_PRESET_CLEAR_SUNSET:
|
2012-12-24 15:15:40 +00:00
|
|
|
definition->hour = 17;
|
|
|
|
definition->minute = 45;
|
2013-01-14 19:07:56 +00:00
|
|
|
definition->dome_lighting = 0.3;
|
2012-12-24 13:59:17 +00:00
|
|
|
definition->sun_radius = 0.03;
|
|
|
|
break;
|
|
|
|
case ATMOSPHERE_PRESET_HAZY_MORNING:
|
2012-12-24 15:15:40 +00:00
|
|
|
definition->hour = 8;
|
|
|
|
definition->minute = 30;
|
2013-01-14 19:07:56 +00:00
|
|
|
definition->dome_lighting = 0.25;
|
2012-12-24 13:59:17 +00:00
|
|
|
definition->humidity = 0.3;
|
|
|
|
break;
|
|
|
|
case ATMOSPHERE_PRESET_FOGGY:
|
2012-12-24 15:15:40 +00:00
|
|
|
definition->hour = 15;
|
|
|
|
definition->minute = 0;
|
2013-01-14 19:07:56 +00:00
|
|
|
definition->dome_lighting = 0.1;
|
2013-03-11 16:57:26 +00:00
|
|
|
definition->humidity = 0.5;
|
2012-12-24 13:59:17 +00:00
|
|
|
break;
|
|
|
|
case ATMOSPHERE_PRESET_STORMY:
|
2012-12-24 15:15:40 +00:00
|
|
|
definition->hour = 15;
|
|
|
|
definition->minute = 0;
|
2013-01-14 19:07:56 +00:00
|
|
|
definition->dome_lighting = 0.05;
|
2013-03-11 16:57:26 +00:00
|
|
|
definition->humidity = 0.8;
|
2012-12-24 13:59:17 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
|
|
|
AtmosphereDefinitionClass.validate(definition);
|
|
|
|
}
|