xmsgeom  1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
GmMultiPolyIntersectorData.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 <set>
14 
15 // 5. Shared code headers
16 #include <xmscore/points/pt.h>
17 
18 //----- Namespace --------------------------------------------------------------
19 
20 namespace xms
21 {
24 class ix
25 {
26 public:
31  ix(Pt3d a_pt, int a_i, double a_t)
32  : m_pt(a_pt)
33  , m_i(a_i)
34  , m_t(a_t)
35  {
36  }
40  bool operator==(const ix& rhs) { return (m_pt == rhs.m_pt && m_i == rhs.m_i && m_t == rhs.m_t); }
41 
43  int m_i;
44  double m_t;
45 }; // class ix
46 
50 {
51  std::vector<Pt3d> m_points;
52  std::vector<std::vector<int> > m_polys;
53  std::set<int> m_polys1;
54  std::set<int> m_polys2;
55  std::vector<ix> m_ixs;
56 }; // struct GmMultiPolyIntersectorData
57 
58 } // 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.
ix(Pt3d a_pt, int a_i, double a_t)
std::vector< Pt3d > m_points
All points used by all polygons.