OpendTect  6.3
emfault.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: Kristofer Tingdahl
8  Date: 9-04-2002
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "earthmodelmod.h"
15 #include "emsurface.h"
16 #include "emsurfacegeometry.h"
17 #include "faultsticksurface.h"
18 #include "undo.h"
19 
20 
21 namespace EM
22 {
23 class Fault;
24 class FaultStickSetGeometry;
25 
31 {
32 public:
33  virtual bool insertStick(const SectionID&,int sticknr,int firstcol,
34  const Coord3& pos,const Coord3& editnormal,
35  bool addtohistory) { return false; }
36  virtual bool insertKnot(const SectionID&,const SubID&,
37  const Coord3& pos,bool addtohistory)
38  { return false; }
39  virtual bool removeStick(const SectionID&,int sticknr,
40  bool addtohistory) { return false; }
41  virtual bool removeKnot(const SectionID&,const SubID&,
42  bool addtohistory) { return false; }
43 
44  virtual Coord3 getEditPlaneNormal(const SectionID&,
45  int sticknr) const;
46  virtual const DBKey* pickedDBKey(const SectionID&,int stcknr) const
47  { return 0; }
48  virtual const char* pickedName(const SectionID&,int sticknr) const
49  { return 0; }
50 
51  virtual void copySelectedSticksTo(FaultStickSetGeometry& destfssg,
52  const SectionID& destsid,
53  bool addtohistory) const;
54 
55  virtual int nrSelectedSticks() const;
56  virtual void selectAllSticks(bool select=true);
57  virtual void removeSelectedSticks(bool addtohistory);
58 
59  virtual void selectStickDoubles(bool select=true,
60  const FaultGeometry* ref=0);
61  virtual void removeSelectedDoubles(bool addtohistory,
62  const FaultGeometry* ref=0);
63  virtual int nrStickDoubles(const SectionID&,int sticknr,
64  const FaultGeometry* ref=0) const;
65 
66 protected:
67  void selectSticks(bool select=true,
68  const FaultGeometry* doublesref=0);
69  bool removeSelStick(int selidx,bool addtohistory,
70  const FaultGeometry* doublesref=0);
71 
73  : SurfaceGeometry(surf) {}
74 };
75 
76 
77 
82 mExpClass(EarthModel) Fault : public Surface
83 {
84 public:
85  virtual void removeAll();
86  virtual FaultGeometry& geometry() = 0;
87  virtual const FaultGeometry& geometry() const
88  { return const_cast<Fault*>(this)->geometry(); }
89 
90 protected:
92  : Surface(em) {}
93 
94  const IOObjContext& getIOObjContext() const = 0;
95 };
96 
97 
103 {
104 public:
105  //Interface for insert
107  //Interface for removal
109  const Coord3& oldpos,
110  const Coord3& oldnormal );
111  const char* getStandardDesc() const;
112  bool unDo();
113  bool reDo();
114 
115 protected:
119  bool remove_;
120 };
121 
122 
128 {
129 public:
130  //Interface for insert
132  //Interface for removal
134  const Coord3& oldpos);
135  const char* getStandardDesc() const;
136  bool unDo();
137  bool reDo();
138 
139 protected:
143  bool remove_;
144 };
145 
146 
147 
148 } // namespace EM
od_int16 SectionID
Definition: emposid.h:23
#define mExpClass(module)
Definition: commondefs.h:157
virtual const DBKey * pickedDBKey(const SectionID &, int stcknr) const
Definition: emfault.h:46
FaultGeometry(Surface &surf)
Definition: emfault.h:72
Fault Surface base class.
Definition: emfault.h:82
Is an identifier for each position in the earthmodel.
Definition: emposid.h:35
virtual bool insertKnot(const SectionID &, const SubID &, const Coord3 &pos, bool addtohistory)
Definition: emfault.h:36
Coord3 normal_
Definition: emfault.h:141
virtual bool insertStick(const SectionID &, int sticknr, int firstcol, const Coord3 &pos, const Coord3 &editnormal, bool addtohistory)
Definition: emfault.h:33
virtual bool removeKnot(const SectionID &, const SubID &, bool addtohistory)
Definition: emfault.h:41
virtual const FaultGeometry & geometry() const
Definition: emfault.h:87
od_int64 SubID
Definition: emposid.h:24
virtual const char * pickedName(const SectionID &, int sticknr) const
Definition: emfault.h:48
virtual bool removeStick(const SectionID &, int sticknr, bool addtohistory)
Definition: emfault.h:39
3D point or vector
Definition: commontypes.h:57
void removeAll()
Coord3 normal_
Definition: emfault.h:117
bool remove_
Definition: emfault.h:119
FaultStickSet geometry.
Definition: emfaultstickset.h:28
Manages the loaded/half loaded EM objects in OpendTect.
Definition: emmanager.h:42
Fault knot UndoEvent.
Definition: emfault.h:127
Surface geometry.
Definition: emsurfacegeometry.h:39
Holds the information on how to undo/redo something.
Definition: undo.h:104
FixedString Fault()
Definition: keystrs.h:64
Fault(EMManager &em)
Definition: emfault.h:91
bool remove_
Definition: emfault.h:143
FaultGeometry base class.
Definition: emfault.h:30
Base class for surfaces like horizons and faults. A surface is made up of one or more segments or pat...
Definition: emsurface.h:31
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:23
EM::PosID posid_
Definition: emfault.h:118
Full key to any object in the OpendTect data store.
Definition: dbkey.h:36
Coord3 pos_
Definition: emfault.h:140
Fault stick UndoEvent.
Definition: emfault.h:102
IOObjContext * getIOObjContext(Seis::GeomType, bool forread)
EM::PosID posid_
Definition: emfault.h:142
Coord3 pos_
Definition: emfault.h:116
Holds the context for selecting and/or creating IOObjs.
Definition: ioobjctxt.h:59

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