OpendTect-6_4  6.4
emfault.h
Go to the documentation of this file.
1 #ifndef emfault_h
2 #define emfault_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 9-04-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "earthmodelmod.h"
17 #include "emsurface.h"
18 #include "emsurfacegeometry.h"
19 #include "faultsticksurface.h"
20 #include "undo.h"
21 
22 
23 namespace EM
24 {
25 class Fault;
26 class FaultStickSetGeometry;
27 
33 {
34 public:
35  virtual bool insertStick(const SectionID&,int sticknr,int firstcol,
36  const Coord3& pos,const Coord3& editnormal,
37  bool addtohistory) { return false; }
38  virtual bool insertKnot(const SectionID&,const SubID&,
39  const Coord3& pos,bool addtohistory)
40  { return false; }
41  virtual bool removeStick(const SectionID&,int sticknr,
42  bool addtohistory) { return false; }
43  virtual bool removeKnot(const SectionID&,const SubID&,
44  bool addtohistory) { return false; }
45 
46  virtual const Coord3& getEditPlaneNormal(const SectionID&,
47  int sticknr) const;
48  virtual const MultiID* pickedMultiID(const SectionID&,int stcknr) const
49  { return 0; }
50  virtual const char* pickedName(const SectionID&,int sticknr) const
51  { return 0; }
52 
53  virtual void copySelectedSticksTo(FaultStickSetGeometry& destfssg,
54  const SectionID& destsid,
55  bool addtohistory) const;
56 
57  virtual int nrSelectedSticks() const;
58  virtual void selectAllSticks(bool select=true);
59  virtual void removeSelectedSticks(bool addtohistory);
60 
61  virtual void selectStickDoubles(bool select=true,
62  const FaultGeometry* ref=0);
63  virtual void removeSelectedDoubles(bool addtohistory,
64  const FaultGeometry* ref=0);
65  virtual int nrStickDoubles(const SectionID&,int sticknr,
66  const FaultGeometry* ref=0) const;
67 
68 protected:
69  void selectSticks(bool select=true,
70  const FaultGeometry* doublesref=0);
71  bool removeSelStick(int selidx,bool addtohistory,
72  const FaultGeometry* doublesref=0);
73 
75  : SurfaceGeometry(surf) {}
76 };
77 
78 
79 
84 mExpClass(EarthModel) Fault : public Surface
85 {
86 public:
87  virtual void removeAll();
88  virtual FaultGeometry& geometry() = 0;
89  virtual const FaultGeometry& geometry() const
90  { return const_cast<Fault*>(this)->geometry(); }
91 
92 protected:
94  : Surface(em) {}
95 
96  const IOObjContext& getIOObjContext() const = 0;
97 };
98 
99 
105 {
106 public:
107  //Interface for insert
109  //Interface for removal
111  const Coord3& oldpos,
112  const Coord3& oldnormal );
113  const char* getStandardDesc() const;
114  bool unDo();
115  bool reDo();
116 
117 protected:
121  bool remove_;
122 };
123 
124 
130 {
131 public:
132  //Interface for insert
134  //Interface for removal
136  const Coord3& oldpos);
137  const char* getStandardDesc() const;
138  bool unDo();
139  bool reDo();
140 
141 protected:
145  bool remove_;
146 };
147 
148 
149 
150 } // namespace EM
151 
152 
153 #endif
od_int16 SectionID
Definition: emposid.h:25
#define mExpClass(module)
Definition: commondefs.h:160
FaultGeometry(Surface &surf)
Definition: emfault.h:74
Fault Surface base class.
Definition: emfault.h:84
Is an identifier for each position in the earthmodel.
Definition: emposid.h:37
virtual bool insertKnot(const SectionID &, const SubID &, const Coord3 &pos, bool addtohistory)
Definition: emfault.h:38
Coord3 normal_
Definition: emfault.h:143
virtual bool insertStick(const SectionID &, int sticknr, int firstcol, const Coord3 &pos, const Coord3 &editnormal, bool addtohistory)
Definition: emfault.h:35
virtual bool removeKnot(const SectionID &, const SubID &, bool addtohistory)
Definition: emfault.h:43
virtual const FaultGeometry & geometry() const
Definition: emfault.h:89
od_int64 SubID
Definition: emposid.h:26
virtual const char * pickedName(const SectionID &, int sticknr) const
Definition: emfault.h:50
virtual bool removeStick(const SectionID &, int sticknr, bool addtohistory)
Definition: emfault.h:41
void removeAll()
Coord3 normal_
Definition: emfault.h:119
bool remove_
Definition: emfault.h:121
FaultStickSet geometry.
Definition: emfaultstickset.h:30
Manages the loaded/half loaded EM objects in OpendTect.
Definition: emmanager.h:46
virtual const MultiID * pickedMultiID(const SectionID &, int stcknr) const
Definition: emfault.h:48
Fault knot UndoEvent.
Definition: emfault.h:129
Surface geometry.
Definition: emsurfacegeometry.h:41
Holds the information on how to undo/redo something.
Definition: undo.h:104
A cartesian coordinate in 3D space.
Definition: coord.h:72
FixedString Fault()
Definition: keystrs.h:65
Fault(EMManager &em)
Definition: emfault.h:93
bool remove_
Definition: emfault.h:145
FaultGeometry base class.
Definition: emfault.h:32
Base class for surfaces like horizons and faults. A surface is made up of one or more segments or pat...
Definition: emsurface.h:33
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
EM::PosID posid_
Definition: emfault.h:120
Coord3 pos_
Definition: emfault.h:142
Fault stick UndoEvent.
Definition: emfault.h:104
IOObjContext * getIOObjContext(Seis::GeomType, bool forread)
EM::PosID posid_
Definition: emfault.h:144
Compound key consisting of ints.
Definition: multiid.h:25
Coord3 pos_
Definition: emfault.h:118
Holds the context for selecting and/or creating IOObjs.
Definition: ctxtioobj.h:62

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