OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "geometrymod.h"
15 #include "bufstringset.h"
16 #include "executor.h"
17 #include "geometrymod.h"
18 #include "paralleltask.h"
19 #include "threadlock.h"
20 
21 namespace Survey { class Geometry2D; }
22 
24 {
25 public:
27 
30 };
31 
32 
35 public:
37 
38  od_int64 nrDone() const;
39  od_int64 totalNr() const;
42 
43  const ObjectSet<BendPoints>& bendPoints() const { return bendptset_; }
44 
45 protected:
46 
47  int nextStep();
48 
51  int curidx_;
52 };
53 
54 
56 {
57 public:
58 
60  {
61  Point(Pos::GeomID id,int mynr,int linenr)
62  : line(id),mytrcnr(mynr),linetrcnr(linenr)
63  , mygeomids_(-1)
64  {}
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  bool isOpposite(const Point&) const;
77 
78  Pos::GeomID line; // Intersecting line.
79  Pos::GeomID mygeomids_;
80  int mytrcnr;
81  int linetrcnr;
82  };
83 
85 
86  Pos::GeomID geomID() const { return geomid_; }
87  bool isEmpty() const { return points_.isEmpty(); }
88  int size() const { return points_.size(); }
89 
91  getPoint(int idx) const { return points_[idx]; }
92 
94  int& crosstrcnr) const;
96 
97  void addPoint(Pos::GeomID id,int mynr,int linenr);
98  void sort();
99 
100 protected:
101 
104 };
105 
106 
108 {
109 public:
110 
113 };
114 
115 
118 public:
121 
125 
126 protected:
127 
131 
132  bool doWork(od_int64 start,od_int64 stop,int threadid);
133  bool doFinish(bool success);
135  int counter_;
136 };
137 
BendPointFinder2DGeomSet::nrDone
mODTextTranslationClass(BendPointFinder2DGeomSet) public od_int64 nrDone() const
Line2DInterSectionFinder::counter_
int counter_
Definition: geom2dintersections.h:135
Line2DInterSection::isEmpty
bool isEmpty() const
Definition: geom2dintersections.h:87
Line2DInterSectionSet::getByGeomID
const Line2DInterSection * getByGeomID(Pos::GeomID) const
BendPointFinder2DGeomSet
Definition: geom2dintersections.h:34
Line2DInterSectionSet::getAll
void getAll(TypeSet< Line2DInterSection::Point > &) const
ObjectSet< BendPoints >
Line2DInterSectionSet
Definition: geom2dintersections.h:108
Geometry
Definition: arraytesselator.h:21
BendPoints
Definition: geom2dintersections.h:24
od_int64
#define od_int64
Definition: plftypes.h:35
Line2DInterSection::geomID
Pos::GeomID geomID() const
Definition: geom2dintersections.h:86
Line2DInterSectionFinder::doFinish
bool doFinish(bool success)
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Line2DInterSectionFinder::doWork
bool doWork(od_int64 start, od_int64 stop, int threadid)
Line2DInterSectionFinder::uiMessage
uiString uiMessage() const
will be message() again in 7.x
Point
@ Point
Definition: vishorizonsectiondef.h:30
BendPointFinder2DGeomSet::totalNr
od_int64 totalNr() const
Line2DInterSection::addPoint
void addPoint(Pos::GeomID id, int mynr, int linenr)
operator==
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:81
BendPointFinder2DGeomSet::curidx_
int curidx_
Definition: geom2dintersections.h:51
mODTextTranslationClass
#define mODTextTranslationClass(clss)
Definition: uistring.h:40
BendPoints::BendPoints
BendPoints()
Line2DInterSectionFinder::bendptset_
const ObjectSet< BendPoints > & bendptset_
Definition: geom2dintersections.h:129
Line2DInterSectionFinder::lsintersections_
Line2DInterSectionSet & lsintersections_
Definition: geom2dintersections.h:130
BendPointFinder2DGeomSet::uiMessage
uiString uiMessage() const
will be message() again in 7.x
Line2DInterSection::mExpStruct
mExpStruct(Geometry) Point
Definition: geom2dintersections.h:59
Executor
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
Line2DInterSection
Definition: geom2dintersections.h:56
BendPointFinder2DGeomSet::bendPoints
const ObjectSet< BendPoints > & bendPoints() const
Definition: geom2dintersections.h:43
Survey
Definition: surveydisklocation.h:18
Line2DInterSection::points_
TypeSet< Line2DInterSection::Point > points_
Definition: geom2dintersections.h:103
executor.h
BendPointFinder2DGeomSet::nextStep
int nextStep()
Line2DInterSectionFinder
Definition: geom2dintersections.h:117
BendPoints::geomid_
Pos::GeomID geomid_
Definition: geom2dintersections.h:28
Line2DInterSection::size
int size() const
Definition: geom2dintersections.h:88
Line2DInterSectionFinder::lock_
Threads::Lock lock_
Definition: geom2dintersections.h:134
Line2DInterSectionFinder::geoms_
ObjectSet< const Survey::Geometry2D > geoms_
Definition: geom2dintersections.h:128
ParallelTask
Generalization of a task that can be run in parallel.
Definition: paralleltask.h:66
Line2DInterSection::getPoint
const Line2DInterSection::Point & getPoint(int idx) const
Definition: geom2dintersections.h:91
Line2DInterSectionFinder::uiNrDoneText
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
bufstringset.h
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
Line2DInterSectionFinder::nrIterations
mODTextTranslationClass(Line2DInterSectionFinder) public od_int64 nrIterations() const
Line2DInterSection::getIntersectionTrcNrs
bool getIntersectionTrcNrs(Pos::GeomID, int &mytrcnr, int &crosstrcnr) const
Returns false when not found.
Line2DInterSection::Line2DInterSection
Line2DInterSection(Pos::GeomID)
threadlock.h
Line2DInterSection::sort
void sort()
Line2DInterSection::geomid_
Pos::GeomID geomid_
Definition: geom2dintersections.h:102
operator>
bool operator>(const ObjectWithName &obj1, const ObjectWithName &obj2)
Definition: namedobj.h:95
BendPointFinder2DGeomSet::bendptset_
ObjectSet< BendPoints > bendptset_
Definition: geom2dintersections.h:50
BendPointFinder2DGeomSet::uiNrDoneText
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
BendPoints::idxs_
TypeSet< int > idxs_
Definition: geom2dintersections.h:29
BendPointFinder2DGeomSet::geomids_
const TypeSet< Pos::GeomID > & geomids_
Definition: geom2dintersections.h:49
paralleltask.h
Threads::Lock
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class.
Definition: threadlock.h:53
Pos::GeomID
Index_Type GeomID
Definition: commontypes.h:87
TypeSet< int >

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