From 40e74181e2a1178363db4525b0cc6befeb02ed5b Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 15 Aug 2007 14:34:29 +0000 Subject: [PATCH] Add a simple class definition here that was removed from SimGear. --- src/Lib/Polygon/point2d.hxx | 19 +++++++++++++++++++ src/Lib/Polygon/polygon.cxx | 1 + 2 files changed, 20 insertions(+) create mode 100644 src/Lib/Polygon/point2d.hxx diff --git a/src/Lib/Polygon/point2d.hxx b/src/Lib/Polygon/point2d.hxx new file mode 100644 index 00000000..bbf5dcb9 --- /dev/null +++ b/src/Lib/Polygon/point2d.hxx @@ -0,0 +1,19 @@ +/** + * Simple 2d point class where members can be accessed as x, dist, or lon + * and y, theta, or lat + */ + +class point2d { +public: + union { + double x; + double dist; + double lon; + }; + union { + double y; + double theta; + double lat; + }; +}; + diff --git a/src/Lib/Polygon/polygon.cxx b/src/Lib/Polygon/polygon.cxx index 6351c0e2..58be765e 100644 --- a/src/Lib/Polygon/polygon.cxx +++ b/src/Lib/Polygon/polygon.cxx @@ -41,6 +41,7 @@ SG_USING_STD(endl); #include #include "polygon.hxx" +#include "point2d.hxx" // Constructor TGPolygon::TGPolygon( void )