X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Froute%2Fwaypoint.hxx;h=29edf7397c24e44a184c76d8bbd5da378ed1f49a;hb=6d1d3173fef50d38244a652543dab3e275193533;hp=2141200c40daa7c86b42161eae1acc75693f6323;hpb=03a7d72a62eb3f2a15242146b7b43ac54ab1fa44;p=simgear.git diff --git a/simgear/route/waypoint.hxx b/simgear/route/waypoint.hxx index 2141200c..29edf739 100644 --- a/simgear/route/waypoint.hxx +++ b/simgear/route/waypoint.hxx @@ -27,12 +27,6 @@ #ifndef _WAYPOINT_HXX #define _WAYPOINT_HXX - -#ifndef __cplusplus -# error This library requires C++ -#endif - - #include #include @@ -61,19 +55,18 @@ public: */ enum modetype { WGS84 = 0, - SPHERICAL = 1, }; private: - - modetype mode; - SGGeod pos; - double distance; - std::string id; std::string name; - + + // route data associated with the waypoint + double _distance; + double _track; + double _speed; + public: /** @@ -92,7 +85,7 @@ public: /** * Construct from a geodetic position, in WGS84 coordinates */ - SGWayPoint(const SGGeod& pos, const std::string& s = "", const std::string& n = "" ); + SGWayPoint(const SGGeod& pos, const std::string& s, const std::string& n); /** Destructor */ ~SGWayPoint(); @@ -147,14 +140,20 @@ public: * is for your convenience only. * @return waypoint distance holder (what ever the user has stashed here) */ - inline double get_distance() const { return distance; } + inline double get_distance() const { return _distance; } /** * Set the waypoint distance value to a value of our choice. * @param d distance */ - inline void set_distance( double d ) { distance = d; } + inline void set_distance( double d ) { _distance = d; } + + inline double get_track() const { return _track; } + inline void set_track(double t) { _track = t; } + inline double get_speed() const { return _speed; } + inline void set_speed(double v) { _speed = v; } + /** @return waypoint id */ inline const std::string& get_id() const { return id; }