]> git.mxchange.org Git - flightgear.git/blobdiff - src/Time/light.hxx
GUI ‘restore defaults’ support.
[flightgear.git] / src / Time / light.hxx
index 42a9f27d8869cd807900739c1555b14fc32da0c9..a1f1c8d795d998f48c01b04898171986f95736f5 100644 (file)
@@ -38,6 +38,7 @@
 
 #include <simgear/props/props.hxx>
 #include <simgear/structure/subsystem_mgr.hxx>
+#include <simgear/props/tiedpropertylist.hxx>
 #include <simgear/math/interpolater.hxx>
 
 
@@ -89,6 +90,7 @@ private:
     SGVec4f _scene_chrome;
 
     // clear sky, fog and cloud color
+    SGVec4f _sun_color;
     SGVec4f _sky_color;
     SGVec4f _fog_color;
     SGVec4f _cloud_color;
@@ -96,7 +98,11 @@ private:
     // clear sky and fog color adjusted for sunset effects
     SGVec4f _adj_fog_color;
     SGVec4f _adj_sky_color;
+
+    // input parameters affected by the weather system
     float _saturation;
+    float _scattering;
+    float _overcast;
 
     double _dt_total;
 
@@ -108,6 +114,22 @@ private:
     // properties for chrome light; not a tie because I want to fire
     // property listeners when the values change.
     SGPropertyNode_ptr _chromeProps[4];
+  
+    SGPropertyNode_ptr _sunAngleRad;
+
+    SGPropertyNode_ptr _humidity;
+
+    simgear::TiedPropertyList _tiedProperties;
+
+    /**
+     * Tied-properties helper, record nodes which are tied for easy un-tie-ing
+     */
+    template <typename T>
+    void tie(SGPropertyNode* aNode, const char* aRelPath, const SGRawValue<T>& aRawValue)
+    {
+        _tiedProperties.Tie(aNode->getNode(aRelPath, true), aRawValue);
+    }
+
 public:
 
     FGLight ();