Expose the color of the sun (which is not the scene specular color anymore)

This commit is contained in:
ehofman
2009-08-23 21:37:02 +02:00
committed by Tim Moore
parent 0c39caa622
commit c824731bc6
3 changed files with 12 additions and 0 deletions
+6
View File
@@ -419,6 +419,12 @@ bool SGSun::reposition( double rightAscension, double declination,
SGVec4f SGVec4f
SGSun::get_color() 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]); return SGVec4f((*scene_cl)[0][0], (*scene_cl)[0][1], (*scene_cl)[0][2], (*scene_cl)[0][3]);
} }
+1
View File
@@ -81,6 +81,7 @@ public:
// retrun the current color of the sun // retrun the current color of the sun
SGVec4f get_color(); SGVec4f get_color();
SGVec4f get_scene_color();
}; };
+5
View File
@@ -366,6 +366,11 @@ public:
*/ */
inline SGVec4f get_sun_color() { return oursun->get_color(); } 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. * Add a cloud layer.
* *