]> git.mxchange.org Git - flightgear.git/commitdiff
Tie the sun vector to the property tree
authorErik Hofman <erik@ehofman.com>
Fri, 26 Jun 2015 07:53:03 +0000 (09:53 +0200)
committerErik Hofman <erik@ehofman.com>
Fri, 26 Jun 2015 07:53:03 +0000 (09:53 +0200)
src/Time/light.cxx

index 43e44744ce6fb0a54a36b2326e3f69149ef6301d..c037657b0d353ecba9a17a3c41662b2881453570 100644 (file)
@@ -176,6 +176,11 @@ void FGLight::bind () {
     tie(prop,"/rendering/dome/fog/green",       SGRawValuePointer<float>(&_fog_color[1]));
     tie(prop,"/rendering/dome/fog/blue",        SGRawValuePointer<float>(&_fog_color[2]));
 
+    // Sun vector
+    tie(prop,"/ephemeris/sun/local/x", SGRawValuePointer<float>(&_sun_vec[0]));
+    tie(prop,"/ephemeris/sun/local/y", SGRawValuePointer<float>(&_sun_vec[1]));
+    tie(prop,"/ephemeris/sun/local/z", SGRawValuePointer<float>(&_sun_vec[2]));
+
     // Properties used directly by effects
     _chromeProps[0] = prop->getNode("/rendering/scene/chrome-light/red", true);
     _chromeProps[1] = prop->getNode("/rendering/scene/chrome-light/green",