]> git.mxchange.org Git - simgear.git/commitdiff
Expose the color of the sun (which is not the scene specular color anymore)
authorehofman <ehofman>
Sun, 16 Aug 2009 19:33:58 +0000 (19:33 +0000)
committerTim Moore <timoore@redhat.com>
Sun, 23 Aug 2009 19:37:02 +0000 (21:37 +0200)
simgear/scene/sky/oursun.cxx
simgear/scene/sky/oursun.hxx
simgear/scene/sky/sky.hxx

index cb1c5f662d340d7702ee30388d225ba0b0f0967f..8f5db650caac60f649cb26ba02d01e001bb4a229 100644 (file)
@@ -419,6 +419,12 @@ bool SGSun::reposition( double rightAscension, double declination,
 
 SGVec4f
 SGSun::get_color()
+{
+    return SGVec4f((*sun_cl)[0][0], (*sun_cl)[0][1], (*sun_cl)[0][2], (*sun_cl)[0][3]);
+}
+
+SGVec4f
+SGSun::get_scene_color()
 {
     return SGVec4f((*scene_cl)[0][0], (*scene_cl)[0][1], (*scene_cl)[0][2], (*scene_cl)[0][3]);
 }
index 4410847d29157fda0db3dc9af7d2193a639647cd..3414c862656fd7078b44e63b6c8d76a7257cc32c 100644 (file)
@@ -81,6 +81,7 @@ public:
 
     // retrun the current color of the sun
     SGVec4f get_color();
+    SGVec4f get_scene_color();
 };
 
 
index 7e34f9e4da7223883add15efda154ad42eb08c4a..6590c03f0cc9fed465eddd5b805d2fc9d6bb3f89 100644 (file)
@@ -366,6 +366,11 @@ public:
      */
     inline SGVec4f get_sun_color() { return oursun->get_color(); }
 
+    /**
+     * Get the current scene color
+     */
+    inline SGVec4f get_scene_color() { return oursun->get_scene_color(); }
+
     /**
      * Add a cloud layer.
      *