2014-08-28 13:09:47 +00:00
|
|
|
#include "AtmosphereModeler.h"
|
|
|
|
|
|
|
|
#include "MainModelerWindow.h"
|
|
|
|
#include "Scenery.h"
|
|
|
|
#include "AtmosphereDefinition.h"
|
2015-12-30 19:14:16 +00:00
|
|
|
#include "DefinitionNode.h"
|
|
|
|
#include "ModelerCameras.h"
|
2014-08-28 13:09:47 +00:00
|
|
|
|
2015-12-30 19:23:24 +00:00
|
|
|
AtmosphereModeler::AtmosphereModeler(MainModelerWindow *ui) : BaseModelerTool(ui) {
|
2015-12-29 23:20:20 +00:00
|
|
|
addFloatBinding("atmosphere_humidity", "value", "/atmosphere/humidity");
|
2015-12-30 19:14:16 +00:00
|
|
|
addFloatBinding("atmosphere_sun_direction", "phi", "/atmosphere/sun/phi", true);
|
|
|
|
addFloatBinding("atmosphere_sun_direction", "theta", "/atmosphere/sun/theta", true);
|
2015-12-29 23:20:20 +00:00
|
|
|
addFloatBinding("atmosphere_sun_radius", "value", "/atmosphere/sun/radius");
|
2015-12-30 19:14:16 +00:00
|
|
|
addFloatBinding("atmosphere_moon_direction", "phi", "/atmosphere/moon/phi", true);
|
|
|
|
addFloatBinding("atmosphere_moon_direction", "theta", "/atmosphere/moon/theta", true);
|
2015-12-29 23:20:20 +00:00
|
|
|
// addFloatBinding("atmosphere_moon_radius", "value", "/atmosphere/moon/radius");
|
2014-08-28 13:09:47 +00:00
|
|
|
|
2015-12-30 19:23:24 +00:00
|
|
|
ui->setQmlProperty("atmosphere_daytime", "value", ui->getScenery()->getAtmosphere()->getDaytime());
|
2014-08-28 13:09:47 +00:00
|
|
|
}
|
2015-12-30 19:14:16 +00:00
|
|
|
|
2016-01-16 15:21:02 +00:00
|
|
|
void AtmosphereModeler::nodeChanged(const DefinitionNode *node, const DefinitionDiff *, const DefinitionNode *) {
|
2015-12-30 19:14:16 +00:00
|
|
|
if (node->getPath().find("/atmosphere/sun/") == 0) {
|
|
|
|
getWindow()->getCamera()->startSunTool(1000);
|
|
|
|
}
|
|
|
|
}
|