Marble

GeoDataPolygon.h
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2008-2009 Patrick Spendrin <[email protected]>
9 // Copyright 2008 Inge Wallin <[email protected]>
10 //
11 
12 
13 #ifndef MARBLE_GEODATAPOLYGON_H
14 #define MARBLE_GEODATAPOLYGON_H
15 
16 #include <QVector>
17 
18 #include "MarbleGlobal.h"
19 
20 #include "geodata_export.h"
21 #include "GeoDataGeometry.h"
22 
23 namespace Marble
24 {
25 
26 class GeoDataPolygonPrivate;
27 class GeoDataLinearRing;
28 class GeoDataCoordinates;
29 
81 class GEODATA_EXPORT GeoDataPolygon : public GeoDataGeometry
82 {
83  public:
87  explicit GeoDataPolygon( TessellationFlags f = NoTessellation );
88 
89 
93  explicit GeoDataPolygon( const GeoDataGeometry &other );
94 
98  ~GeoDataPolygon() override;
99 
100  const char *nodeType() const override;
101 
102  EnumGeometryId geometryId() const override;
103 
104  GeoDataGeometry *copy() const override;
105 
109  bool operator==( const GeoDataPolygon &other ) const;
110  bool operator!=( const GeoDataPolygon &other ) const;
111 
112 
118  virtual bool isClosed() const;
119 
120 
127  bool tessellate() const;
128 
129 
138  void setTessellate( bool tessellate );
139 
140 
144  TessellationFlags tessellationFlags() const;
145 
146 
150  void setTessellationFlags( TessellationFlags f );
151 
152 
158  const GeoDataLatLonAltBox& latLonAltBox() const override;
159 
165  GeoDataLinearRing &outerBoundary();
166 
172  const GeoDataLinearRing &outerBoundary() const;
173 
179  void setOuterBoundary( const GeoDataLinearRing& boundary );
180 
186  QVector<GeoDataLinearRing>& innerBoundaries();
187 
193  const QVector<GeoDataLinearRing>& innerBoundaries() const;
194 
200  void appendInnerBoundary( const GeoDataLinearRing& boundary );
201 
208  virtual bool contains( const GeoDataCoordinates &coordinates ) const;
209 
210  // Serialization
215  void pack( QDataStream& stream ) const override;
216 
217 
222  void unpack( QDataStream& stream ) override;
223 
224  int renderOrder() const;
225  void setRenderOrder(int);
226 
227  private:
228  Q_DECLARE_PRIVATE(GeoDataPolygon)
229 };
230 
231 class GEODATA_EXPORT GeoDataOuterBoundary : public GeoDataPolygon
232 {
233 };
234 
235 class GEODATA_EXPORT GeoDataInnerBoundary : public GeoDataPolygon
236 {
237 };
238 
239 }
240 
241 #endif // GEODATAPOLYGON_H
A 3d point representation.
A LinearRing that allows to store a closed, contiguous set of line segments.
Binds a QML item to a specific geodetic location in screen coordinates.
A base class for all geodata features.
A polygon that can have "holes".
A class that defines a 3D bounding box for geographic data.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jul 1 2020 23:17:41 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.