OpendTect-6_4  6.4
geom2dintersections.h
Go to the documentation of this file.
1 #ifndef geom2dintersections_h
2 #define geom2dintersections_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: April 2006
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "geometrymod.h"
16 #include "bufstringset.h"
17 #include "executor.h"
18 #include "geometrymod.h"
19 #include "paralleltask.h"
20 #include "threadlock.h"
21 
22 namespace Survey { class Geometry2D; }
23 
25 {
26 public:
27  BendPoints();
28 
31 };
32 
33 
36 public:
38 
39  od_int64 nrDone() const;
40  od_int64 totalNr() const;
41  uiString uiMessage() const;
42  uiString uiNrDoneText() const;
43 
44  const ObjectSet<BendPoints>& bendPoints() const { return bendptset_; }
45 
46 protected:
47 
48  int nextStep();
49 
52  int curidx_;
53 };
54 
55 
57 {
58 public:
59 
61  {
62  Point(Pos::GeomID id,int mynr,int linenr)
63  : line(id),mytrcnr(mynr),linetrcnr(linenr)
64  { setMyGeomID(-1); }
65  Point(Pos::GeomID myid,Pos::GeomID lineid,
66  int mynr,int linenr);
67  Point(const Point&);
68 
69  bool operator==(const Point& oth) const
70  { return mytrcnr == oth.mytrcnr; }
71  bool operator>(const Point& oth) const
72  { return mytrcnr > oth.mytrcnr; }
73  bool operator<(const Point& oth) const
74  { return mytrcnr < oth.mytrcnr; }
75 
76  void setMyGeomID(Pos::GeomID);
77  Pos::GeomID getMyGeomID() const;
78  bool isOpposite(const Point&) const;
79 
80  Pos::GeomID line; // Intersecting line.
81  int mytrcnr;
82  int linetrcnr;
83  };
84 
85  Line2DInterSection(Pos::GeomID);
86 
87  Pos::GeomID geomID() const { return geomid_; }
88  bool isEmpty() const { return points_.isEmpty(); }
89  int size() const { return points_.size(); }
90 
92  getPoint(int idx) const { return points_[idx]; }
93 
94  bool getIntersectionTrcNrs(Pos::GeomID,int& mytrcnr,
95  int& crosstrcnr) const;
97 
98  void addPoint(Pos::GeomID id,int mynr,int linenr);
99  void sort();
100 
101 protected:
102 
105 };
106 
107 
109 {
110 public:
111  const Line2DInterSection* get(Pos::GeomID) const;
112 
113  void getAll(TypeSet<Line2DInterSection::Point>&) const;
114 };
115 
116 
119 public:
122 
123  od_int64 nrIterations() const;
124  uiString uiMessage() const;
125  uiString uiNrDoneText() const;
126 
127 protected:
128 
132 
133  bool doWork(od_int64 start,od_int64 stop,int threadid);
134  bool doFinish(bool success);
136  int counter_;
137 };
138 
139 #endif
#define mExpClass(module)
Definition: commondefs.h:160
const Line2DInterSection::Point & getPoint(int idx) const
Definition: geom2dintersections.h:92
const TypeSet< Pos::GeomID > & geomids_
Definition: geom2dintersections.h:50
Definition: geom2dintersections.h:117
int size() const
Definition: geom2dintersections.h:89
ObjectSet< const Survey::Geometry2D > geoms_
Definition: geom2dintersections.h:129
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
#define od_int64
Definition: plftypes.h:36
int counter_
Definition: geom2dintersections.h:136
TypeSet< int > idxs_
Definition: geom2dintersections.h:30
Pos::GeomID geomID() const
Definition: geom2dintersections.h:87
Definition: uistring.h:89
Line2DInterSectionSet & lsintersections_
Definition: geom2dintersections.h:131
Generalization of a task that can be run in parallel.
Definition: paralleltask.h:66
Pos::GeomID geomid_
Definition: geom2dintersections.h:29
int curidx_
Definition: geom2dintersections.h:52
Definition: vishorizonsectiondef.h:31
const ObjectSet< BendPoints > & bendptset_
Definition: geom2dintersections.h:130
ObjectSet< BendPoints > bendptset_
Definition: geom2dintersections.h:51
Index_Type GeomID
Definition: commontypes.h:52
bool isEmpty() const
Definition: geom2dintersections.h:88
TypeSet< Line2DInterSection::Point > points_
Definition: geom2dintersections.h:104
void sort(ObjectSet< T > &os)
Sort ObjectSet. Must have operator > defined for elements.
Definition: objectset.h:220
Threads::Lock lock_
Definition: geom2dintersections.h:135
Definition: geom2dintersections.h:56
Definition: survgeom.h:25
Definition: geom2dintersections.h:34
const ObjectSet< BendPoints > & bendPoints() const
Definition: geom2dintersections.h:44
Definition: geom2dintersections.h:108
Definition: geom2dintersections.h:24
Definition: arraytesselator.h:21
mExpStruct(Geometry) Point
Definition: geom2dintersections.h:60
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
Pos::GeomID geomid_
Definition: geom2dintersections.h:103

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019