]> git.mxchange.org Git - simgear.git/blobdiff - simgear/environment/visual_enviro.hxx
Make at least the header aliasing safe.
[simgear.git] / simgear / environment / visual_enviro.hxx
index 946c169caaa05ade89bbeb3ca3354be970f31eee..e51bd4d69540671bea5f611a2cbb83e2f4ce0524 100644 (file)
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 //
 #ifndef _VISUAL_ENVIRO_HXX
 #define _VISUAL_ENVIRO_HXX
 
+#include <plib/sg.h>
+
 #include <simgear/compiler.h>
 #include STL_STRING
 #include <vector>
@@ -90,11 +92,31 @@ private:
 
        /** a list of all the radar echo. */
        list_of_SGWxRadarEcho radarEcho;
+       static sgVec3 min_light;
+       static SGfloat streak_bright_nearmost_layer,
+                                  streak_bright_farmost_layer,
+                                  streak_period_max,
+                                  streak_period_change_per_kt,
+                                  streak_period_min,
+                                  streak_length_min,
+                                  streak_length_change_per_kt,
+                                  streak_length_max;
+       static int streak_count_min, streak_count_max;
+       static SGfloat cone_base_radius,
+                                  cone_height;
 
 public:
        SGEnviro();
        ~SGEnviro();
 
+       /** Read the config from the precipitation rendering config properties.
+        * @param precip_rendering_cfgNode "/sim/rendering/precipitation" in fg
+        * Set from whatever info present in the
+        * subnodes passed, substituting hardwired defaults for missing fields.
+        * If NULL is given, do nothing.
+        */
+       void config(const class SGPropertyNode* precip_rendering_cfgNode);
+
     /**
      * Forward a few states used for renderings.
      */
@@ -107,12 +129,12 @@ public:
      * @param heading direction of cloud in radians
      * @param alt asl of cloud in meters
      * @param radius radius of cloud in meters
-     * @param familly cloud familly
+     * @param family cloud family
      * @param dist  squared dist to cloud in meters
      */
-       void callback_cloud(float heading, float alt, float radius, int familly, float dist, int cloudId);
+       void callback_cloud(float heading, float alt, float radius, int family, float dist, int cloudId);
 
-       void drawRain(double pitch, double roll, double heading, double speed, double rain_norm);
+       void drawRain(double pitch, double roll, double heading, double hspeed, double rain_norm);
     /**
      * Draw rain or snow precipitation around the viewer.
      * @param rain_norm rain normalized intensity given by metar class
@@ -120,10 +142,10 @@ public:
      * @param hail_norm hail normalized intensity given by metar class
      * @param pitch pitch rotation of viewer
      * @param roll roll rotation of viewer
-     * @param speed moving speed of viewer in kt
+     * @param hspeed moving horizontal speed of viewer in kt
      */
        void drawPrecipitation(double rain_norm, double snow_norm, double hail_norm,
-                                                       double pitch, double roll, double heading, double speed);
+                                                       double pitch, double roll, double heading, double hspeed);
 
     /**
      * Draw the lightnings spawned by cumulo nimbus.
@@ -186,6 +208,12 @@ public:
        float get_precipitation_density(void) const;
        bool get_precipitation_enable_state(void) const;
 
+       /** 
+        * Decrease the precipitation density to the given percentage.
+        * (Only show the given percentage of rain streaks etc.)
+        * Default precipitation density upon construction is 100.0.
+        * @param density 0.0 to 100.0
+        */
        void set_precipitation_density(float density);
     /**
      * Enable or disable the rendering of precipitation around the viewer.