]> git.mxchange.org Git - flightgear.git/blob - src/WeatherCM/FGWeatherFeature.h
Changes to keep the various autopilot properties from stepping on each
[flightgear.git] / src / WeatherCM / FGWeatherFeature.h
1 /*****************************************************************************
2
3  Header:       FGWeatherFeature.h       
4  Author:       Christian Mayer
5  Date started: 28.05.99
6
7  -------- Copyright (C) 1999 Christian Mayer (fgfs@christianmayer.de) --------
8
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
17  details.
18
19  You should have received a copy of the GNU General Public License along with
20  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21  Place - Suite 330, Boston, MA  02111-1307, USA.
22
23  Further information about the GNU General Public License can also be found on
24  the world wide web at http://www.gnu.org.
25
26 FUNCTIONAL DESCRIPTION
27 ------------------------------------------------------------------------------
28 Abstract class that every weather feature, such as wind layers, are derivated
29 from
30
31 HISTORY
32 ------------------------------------------------------------------------------
33 28.05.1999 Christian Mayer      Created
34 16.06.1999 Durk Talsma          Portability for Linux
35 20.06.1999 Christian Mayer      added lots of consts
36 30.06.1999 Christian Mayer      STL portability
37 11.10.1999 Christian Mayer      changed set<> to map<> on Bernie Bright's 
38                                 suggestion
39 19.10.1999 Christian Mayer      change to use PLIB's sg instead of Point[2/3]D
40                                 and lots of wee code cleaning
41 *****************************************************************************/
42
43 /****************************************************************************/
44 /* SENTRY                                                                   */
45 /****************************************************************************/
46 #ifndef FGWeatherFeature_H
47 #define FGWeatherFeature_H
48
49 /****************************************************************************/
50 /* INCLUDES                                                                 */
51 /****************************************************************************/
52 #include <simgear/compiler.h>
53
54 #include <plib/sg.h>
55
56 #include "FGWeatherDefs.h"
57                 
58 /****************************************************************************/
59 /* DEFINES                                                                  */
60 /****************************************************************************/
61 enum LayerType {
62     fgWind,
63     fgTurbulence,
64     fgTemperature,
65     fgAirDensity,
66     fgCloud,
67     fgRain
68 };
69
70 /****************************************************************************/
71 /* CLASS DECLARATION                                                        */
72 /****************************************************************************/
73 class FGWeatherFeature
74 {
75 private:
76 protected:
77     sgVec3 position;                //middle of the feature in lat/lon/alt
78     WeatherPrecision minSize;       //smalest size of the feature
79                                     //=> a disk is specifies
80
81     LayerType FeatureType; 
82
83 public:
84     LayerType getFeature(void)         const { return FeatureType; }
85     bool isFeature(const LayerType& f) const { return (f == FeatureType); }
86 };
87
88 /****************************************************************************/
89 #endif /*FGWeatherFeature_H*/