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

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