From: ehofman Date: Sun, 16 Aug 2009 19:33:58 +0000 (+0000) Subject: Expose the color of the sun (which is not the scene specular color anymore) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c824731bc6bcb2e652aa97c7cac67c33e3e4aac1;p=simgear.git Expose the color of the sun (which is not the scene specular color anymore) --- diff --git a/simgear/scene/sky/oursun.cxx b/simgear/scene/sky/oursun.cxx index cb1c5f66..8f5db650 100644 --- a/simgear/scene/sky/oursun.cxx +++ b/simgear/scene/sky/oursun.cxx @@ -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]); } diff --git a/simgear/scene/sky/oursun.hxx b/simgear/scene/sky/oursun.hxx index 4410847d..3414c862 100644 --- a/simgear/scene/sky/oursun.hxx +++ b/simgear/scene/sky/oursun.hxx @@ -81,6 +81,7 @@ public: // retrun the current color of the sun SGVec4f get_color(); + SGVec4f get_scene_color(); }; diff --git a/simgear/scene/sky/sky.hxx b/simgear/scene/sky/sky.hxx index 7e34f9e4..6590c03f 100644 --- a/simgear/scene/sky/sky.hxx +++ b/simgear/scene/sky/sky.hxx @@ -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. *