]> git.mxchange.org Git - flightgear.git/blobdiff - src/Time/light.hxx
Prepare and implement reinit methods for instruments
[flightgear.git] / src / Time / light.hxx
index a7be74786792882f5af0bd63fceaf1657c9153e9..dd68c47410e41b4b6deffa9c0ee6b7e5f5192ff7 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;
@@ -114,6 +116,18 @@ private:
     SGPropertyNode_ptr _chromeProps[4];
   
     SGPropertyNode_ptr _sunAngleRad;
+
+    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 ();