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

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