xmsgrid  1.0
GmMultiPolyIntersectorData.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 <set>
13 
14 // 5. Shared code headers
15 #include <xmscore/points/pt.h>
16 
17 //----- Namespace --------------------------------------------------------------
18 
19 namespace xms
20 {
23 class ix
24 {
25 public:
30  ix(Pt3d a_pt, int a_i, double a_t)
31  : m_pt(a_pt)
32  , m_i(a_i)
33  , m_t(a_t)
34  {
35  }
39  bool operator==(const ix& rhs) { return (m_pt == rhs.m_pt && m_i == rhs.m_i && m_t == rhs.m_t); }
40 
42  int m_i;
43  double m_t;
44 }; // class ix
45 
49 {
50  std::vector<Pt3d> m_points;
51  std::vector<std::vector<int> > m_polys;
52  std::set<int> m_polys1;
53  std::set<int> m_polys2;
54  std::vector<ix> m_ixs;
55 }; // struct GmMultiPolyIntersectorData
56 
57 } // namespace xms
std::vector< std::vector< int > > m_polys
0-based? indices into m_points to form polygons
bool operator==(const ix &rhs)
An intersection point of a line with a polygon.
std::set< int > m_polys2
polygon IDs (1-based) that 2nd point is inside on on
Pt3d m_pt
Intersection location.
int m_i
The polygon id (1 based)
double m_t
t values
std::set< int > m_polys1
polygon IDs (1-based) that 1st point is inside or on
std::vector< ix > m_ixs
Intersections.
Struct used by GmMultiPolyIntersector.
XMS Namespace.
Definition: geoms.cpp:34
ix(Pt3d a_pt, int a_i, double a_t)
std::vector< Pt3d > m_points
All points used by all polygons.