1 // mkrbeacons.hxx -- marker beacon management class
3 // Written by Curtis Olson, started March 2001.
5 // Copyright (C) 2001 Curtis L. Olson - curt@flightgear.org
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef _FG_MKRBEACON_HXX
25 #define _FG_MKRBEACON_HXX
28 #include <simgear/compiler.h>
29 #include <simgear/misc/fgpath.hxx>
63 FGBeacon( double _lon, double _lat, double _elev, fgMkrBeacType _type );
66 inline double get_elev() const { return elev; }
67 inline fgMkrBeacType get_type() const { return type; }
68 inline double get_x() const { return x; }
69 inline double get_y() const { return y; }
70 inline double get_z() const { return z; }
75 class FGMarkerBeacons {
78 typedef vector < FGBeacon > beacon_list_type;
79 typedef beacon_list_type::iterator beacon_list_iterator;
80 typedef beacon_list_type::const_iterator beacon_list_const_iterator;
82 typedef map < int, beacon_list_type > beacon_map_type;
83 typedef beacon_map_type::iterator beacon_map_iterator;
84 typedef beacon_map_type::const_iterator beacon_map_const_iterator;
86 beacon_map_type beacon_map;
88 // real add a marker beacon
89 bool FGMarkerBeacons::real_add( const int master_index, const FGBeacon& b );
96 // initialize the structures
99 // add a marker beacon
100 bool add( double lon, double lat, double elev,
101 FGBeacon::fgMkrBeacType type );
103 // returns marker beacon type if we are over a marker beacon, NOBEACON
105 FGBeacon::fgMkrBeacType query( double lon, double lat, double elev );
109 extern FGMarkerBeacons *current_beacons;
112 #endif // _FG_MKRBEACON_HXX