xmsgeom  1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
GmMultiPolyIntersector.h
Go to the documentation of this file.
1 #pragma once
2 //------------------------------------------------------------------------------
8 //------------------------------------------------------------------------------
9 
10 //----- Included files ---------------------------------------------------------
11 
12 // 3. Standard library headers
13 #include <vector>
14 
15 // 5. Shared code headers
16 #include <xmscore/misc/base_macros.h> // for XM_DISALLOW_COPY_AND_ASSIGN
18 #include <xmscore/points/ptsfwd.h> // for Pt3d
19 
20 //----- Namespace --------------------------------------------------------------
21 
22 namespace xms
23 {
24 //----- Forward declarations ---------------------------------------------------
25 
26 class GmMultiPolyIntersectionSorter;
27 
28 //----- Classes ----------------------------------------------------------------
29 
31 enum GmMultiPolyIntersectorQueryEnum { GMMPIQ_COVEREDBY, GMMPIQ_INTERSECTS };
32 
35 {
36 public:
37  static boost::shared_ptr<GmMultiPolyIntersector> New(
38  const std::vector<Pt3d>& a_points,
39  const std::vector<std::vector<int> >& a_polys,
40  boost::shared_ptr<GmMultiPolyIntersectionSorter> a_sorter,
41  int a_startingId = 1);
43 
44  virtual void SetQuery(GmMultiPolyIntersectorQueryEnum a_query) = 0;
45  virtual void TraverseLineSegment(double x1,
46  double y1,
47  double x2,
48  double y2,
49  std::vector<int>& polyids,
50  std::vector<double>& tvalues) = 0;
51  virtual void TraverseLineSegment(double x1,
52  double y1,
53  double x2,
54  double y2,
55  std::vector<int>& polyidxs) = 0;
56  virtual void TraverseLineSegment(double a_x1,
57  double a_y1,
58  double a_x2,
59  double a_y2,
60  std::vector<int>& a_polyids,
61  std::vector<Pt3d>& a_pts) = 0;
62  virtual int PolygonFromPoint(const Pt3d& a_pt) = 0;
63 
65 protected:
67  virtual ~GmMultiPolyIntersector();
68 
69 private:
71 
72 }; // class GmMultiPolyIntersector
73 
74 } // namespace xms
See GmMultiPolyIntersectorImpl comments.
static boost::shared_ptr< GmMultiPolyIntersector > New(const std::vector< Pt3d > &a_points, const std::vector< std::vector< int > > &a_polys, boost::shared_ptr< GmMultiPolyIntersectionSorter > a_sorter, int a_startingId=1)
Creates a new GmMultiPolyIntersectorImpl object.
#define XM_DISALLOW_COPY_AND_ASSIGN(TypeName)