- // wanted to travel towards the sun.
- double sun_rotation;
-
- ///////////////////////////////////////////////////////////
- // Have the same for the moon. Useful for having some light at night
- // and stuff. I (Durk) also want to use this for adding similar
- // coloring effects to the moon as I did to the sun.
- ///////////////////////////////////////////////////////////
- // position of the moon in various forms
-
- // in geocentric coordinates
- double moon_lon, moon_gc_lat;
+ // wanted to travel towards celestial object.
+ double _sun_rotation, _moon_rotation;
+
+ /**
+ * Derived lighting values
+ */
+
+ // ambient, diffuse and specular component
+ SGVec4f _scene_ambient;
+ SGVec4f _scene_diffuse;
+ SGVec4f _scene_specular;
+ SGVec4f _scene_chrome;
+
+ // clear sky, fog and cloud color
+ SGVec4f _sun_color;
+ SGVec4f _sky_color;
+ SGVec4f _fog_color;
+ SGVec4f _cloud_color;
+
+ // clear sky and fog color adjusted for sunset effects
+ SGVec4f _adj_fog_color;
+ SGVec4f _adj_sky_color;
+
+ // input parameters affected by the weather system
+ float _saturation;
+ float _scattering;
+ float _overcast;
+
+ double _dt_total;
+
+ void update_sky_color ();
+ void update_adj_fog_color ();
+
+ void updateSunPos();
+
+ // properties for chrome light; not a tie because I want to fire
+ // property listeners when the values change.
+ SGPropertyNode_ptr _chromeProps[4];
+
+ SGPropertyNode_ptr _sunAngleRad;
+public: