1 // pavement.hxx - class to represent complex taxiway specified in v850 apt.dat
3 // Copyright (C) 2009 Frederic Bouvier
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License as
7 // published by the Free Software Foundation; either version 2 of the
8 // License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful, but
11 // WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef FG_PAVEMENT_HXX
22 #define FG_PAVEMENT_HXX
24 #include <Navaids/positioned.hxx>
26 class FGPavement : public FGPositioned
30 * 111 = Node (simple point).
31 * 112 = Node with Bezier control point.
32 * 113 = Node (close loop) point (to close a pavement boundary).
33 * 114 = Node (close loop) point with Bezier control point (to close a pavement boundary).
34 * 115 = Node (end) point to terminate a linear feature (so has no descriptive codes).
35 * 116 = Node (end) point with Bezier control point, to terminate a linear feature (so has no descriptive codes).
37 struct NodeBase : public SGReferenced
41 virtual ~NodeBase(){} // To enable RTTI
43 struct SimpleNode : public NodeBase //111,113
45 SimpleNode(const SGGeod &aPos, bool aClose) {
50 struct BezierNode : public NodeBase //112,114
52 BezierNode(const SGGeod &aPos, const SGGeod &aCtrlPt, bool aClose) {
59 typedef std::vector<SGSharedPtr<NodeBase> > NodeList;
62 FGPavement(const std::string& aIdent, const SGGeod& aPos);
64 void addNode(const SGGeod &aPos, bool aClose = false);
65 void addBezierNode(const SGGeod &aPos, const SGGeod &aCtrlPt, bool aClose = false);
67 const NodeList &getNodeList() const { return mNodes; }
74 #endif // of FG_PAVEMENT_HXX