xmsgrid  1.0
GmMultiPolyIntersector.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 // 5. Shared code headers
15 #include <xmscore/misc/base_macros.h> // for XM_DISALLOW_COPY_AND_ASSIGN
17 #include <xmscore/points/ptsfwd.h> // for Pt3d
18 
19 //----- Namespace --------------------------------------------------------------
20 
21 namespace xms
22 {
23 //----- Forward declarations ---------------------------------------------------
24 
25 class GmMultiPolyIntersectionSorter;
26 
27 //----- Classes ----------------------------------------------------------------
28 
30 enum GmMultiPolyIntersectorQueryEnum { GMMPIQ_COVEREDBY, GMMPIQ_INTERSECTS };
31 
34 {
35 public:
36  static boost::shared_ptr<GmMultiPolyIntersector> New(
37  const std::vector<Pt3d>& a_points,
38  const std::vector<std::vector<int> >& a_polys,
39  boost::shared_ptr<GmMultiPolyIntersectionSorter> a_sorter,
40  int a_startingId = 1);
42 
43  virtual void SetQuery(GmMultiPolyIntersectorQueryEnum a_query) = 0;
44  virtual void TraverseLineSegment(double a_x1,
45  double a_y1,
46  double a_x2,
47  double a_y2,
48  std::vector<int>& a_polyids,
49  std::vector<double>& a_tvalues) = 0;
50  virtual void TraverseLineSegment(double a_x1,
51  double a_y1,
52  double a_x2,
53  double a_y2,
54  std::vector<int>& a_polyids) = 0;
55  virtual void TraverseLineSegment(double a_x1,
56  double a_y1,
57  double a_x2,
58  double a_y2,
59  std::vector<int>& a_polyids,
60  std::vector<Pt3d>& a_pts) = 0;
61  virtual void TraverseLineSegment(double a_x1,
62  double a_y1,
63  double a_x2,
64  double a_y2,
65  std::vector<int>& a_polyids,
66  std::vector<double>& a_tvalues,
67  std::vector<Pt3d>& a_pts) = 0;
68  virtual int PolygonFromPoint(const Pt3d& a_pt) = 0;
69 
71 protected:
73  virtual ~GmMultiPolyIntersector();
74 
75 private:
77 
78 }; // class GmMultiPolyIntersector
79 
80 } // namespace xms
See GmMultiPolyIntersectorImpl comments.
GmMultiPolyIntersectorQueryEnum
Type of query.
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)
XMS Namespace.
Definition: geoms.cpp:34