xmsgrid  1.0
GmPolygon.h
Go to the documentation of this file.
1 #pragma once
2 //------------------------------------------------------------------------------
7 //------------------------------------------------------------------------------
8 
9 //----- Included files ---------------------------------------------------------
10 
11 // 3. Standard library headers
12 #include <vector>
13 
14 // 4. External library headers
15 
16 // 5. Shared code headers
17 #include <xmscore/misc/boost_defines.h> // BSHP
18 #include <xmscore/stl/vector.h>
19 #include <xmscore/misc/base_macros.h> // for XM_DISALLOW_COPY_AND_ASSIGN
20 #include <xmscore/points/ptsfwd.h> // for Pt3d
21 
22 //----- Namespace --------------------------------------------------------------
23 
24 namespace xms
25 {
26 //----- Forward declarations ---------------------------------------------------
27 
28 //----- Classes ----------------------------------------------------------------
29 
33 class GmPolygon
34 {
35 public:
36  static BSHP<GmPolygon> New();
37  GmPolygon();
38  virtual ~GmPolygon();
39 
41  virtual void Setup(const VecPt3d& a_poly, const VecPt3d2d& a_inPolys) = 0;
42  virtual void GetPoints(VecPt3d& a_poly, VecPt3d2d& a_inPolys) const = 0;
43 
44  virtual bool CoveredBy(Pt3d a_point) const = 0;
45  virtual bool Within(Pt3d a_point) const = 0;
46  virtual double MinDistanceToBoundary(Pt3d a_pt) const = 0;
47  virtual void Intersection(const GmPolygon& a_, std::vector<BSHP<GmPolygon>>& a_output) const = 0;
48  virtual void Union(const GmPolygon& a_, std::vector<BSHP<GmPolygon>>& a_output) const = 0;
49 
50 private:
53 }; // class GmPolygon
54 
55 } // namespace xms
GmPolygon()
Constructor.
Definition: GmPolygon.cpp:276
Interface to a boost::geometry::polygon class.
Definition: GmPolygon.h:33
static BSHP< GmPolygon > New()
Creates a class.
Definition: GmPolygon.cpp:289
virtual ~GmPolygon()
Destructor.
Definition: GmPolygon.cpp:282
#define XM_DISALLOW_COPY_AND_ASSIGN(TypeName)
XMS Namespace.
Definition: geoms.cpp:34
std::vector< VecPt3d > VecPt3d2d
std::vector< Pt3d > VecPt3d