OpendTect  6.6
emundo.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: 4-11-2002
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 #include "earthmodelmod.h"
16 #include "undo.h"
17 #include "emposid.h"
18 #include "coord.h"
19 #include "color.h"
20 
21 namespace Geometry { class ParametricSurface; }
22 template <class T> class Array2D;
23 
24 namespace EM
25 {
26 class Horizon3D;
27 
32 mExpClass(EarthModel) EMUndo : public Undo
33 {
34 public:
35 
36  ObjectID getCurrentEMObjectID(bool forredo) const;
37 };
38 
39 
40 mExpClass(EarthModel) EMUndoEvent : public UndoEvent
41 {
42 public:
43 
44  virtual ObjectID getObjectID() const =0;
45 };
46 
47 
49 {
50 public:
51  SetPosUndoEvent(const Coord3& oldpos,const EM::PosID&);
52 
53  const char* getStandardDesc() const;
54  bool unDo();
55  bool reDo();
56  ObjectID getObjectID() const { return posid_.objectID(); }
57 
58 protected:
61 
62  static const char* savedposstr_;
63 };
64 
65 
71 {
72 public:
76  Array2D<float>*,const RowCol& oldorigin);
77 
78  const char* getStandardDesc() const;
79  bool unDo();
80  bool reDo();
82 
83 protected:
84  bool setArray(const Array2D<float>&, const RowCol& origin);
86 
93 };
94 
95 
101 {
102 public:
103  SetPosAttribUndoEvent(const EM::PosID&,int attrib,
104  bool yn );
105 
106  const char* getStandardDesc() const;
107  bool unDo();
108  bool reDo();
109  ObjectID getObjectID() const { return posid_.objectID(); }
110 
111 protected:
113  bool yn_;
114  int attrib_;
115 };
116 
117 
123 {
124 public:
126  const EM::PosID& to,
127  const Coord3& tosprevpos);
128 
129  const char* getStandardDesc() const;
130  bool unDo();
131  bool reDo();
132  ObjectID getObjectID() const { return to_.objectID(); }
133 
134 protected:
136  const EM::PosID to_;
138 };
139 
140 
146 {
147 public:
149  const Color& oldcol,
150  const Color& newcol);
151  const char* getStandardDesc() const;
152  bool unDo();
153  bool reDo();
154  ObjectID getObjectID() const { return objectid_; }
155 
156 protected:
160 };
161 
162 } // namespace EM
163 
Coord3
A cartesian coordinate in 3D space.
Definition: coord.h:72
emposid.h
Conv::to
T to(const F &fr)
Definition: convert.h:34
EM::SetPosAttribUndoEvent
UndoEvent for setting position attribute.
Definition: emundo.h:101
EM::SetPosAttribUndoEvent::unDo
bool unDo()
Geometry
Definition: arraytesselator.h:21
EM::SetAllHor3DPosUndoEvent::neworigin_
RowCol neworigin_
Definition: emundo.h:90
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
EM::SetPosUndoEvent::unDo
bool unDo()
EM::SetAllHor3DPosUndoEvent::sid_
EM::SectionID sid_
Definition: emundo.h:88
EM::SetAllHor3DPosUndoEvent::newarr_
Array2D< float > * newarr_
Definition: emundo.h:92
EM::SetAllHor3DPosUndoEvent::SetAllHor3DPosUndoEvent
SetAllHor3DPosUndoEvent(EM::Horizon3D *, EM::SectionID, Array2D< float > *, const RowCol &oldorigin)
EM::SetPosUndoEvent::getStandardDesc
const char * getStandardDesc() const
EM::SetPosUndoEvent::savedpos_
Coord3 savedpos_
Definition: emundo.h:60
EM
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: bulk2dhorizonscanner.h:26
EM::PosIDChangeEvent::getObjectID
ObjectID getObjectID() const
Definition: emundo.h:132
EM::SetAllHor3DPosUndoEvent::getStandardDesc
const char * getStandardDesc() const
EM::PosIDChangeEvent::PosIDChangeEvent
PosIDChangeEvent(const EM::PosID &from, const EM::PosID &to, const Coord3 &tosprevpos)
EM::SetPosUndoEvent
Definition: emundo.h:49
EM::EMUndo
Set position UndoEvent.
Definition: emundo.h:33
EM::SetAllHor3DPosUndoEvent::horizon_
EM::Horizon3D * horizon_
Definition: emundo.h:87
EM::SetPosUndoEvent::SetPosUndoEvent
SetPosUndoEvent(const Coord3 &oldpos, const EM::PosID &)
EM::PosIDChangeEvent::reDo
bool reDo()
EM::SetPrefColorEvent::newcolor_
const Color newcolor_
Definition: emundo.h:159
EM::SetPosUndoEvent::getObjectID
ObjectID getObjectID() const
Definition: emundo.h:56
EM::EMUndoEvent
Definition: emundo.h:41
UndoEvent
Holds the information on how to undo/redo something.
Definition: undo.h:104
EM::SetPosAttribUndoEvent::yn_
bool yn_
Definition: emundo.h:113
undo.h
EM::SetPrefColorEvent::reDo
bool reDo()
EM::SetAllHor3DPosUndoEvent
UndoEvent for setting all positions on a EM::Horizon3D section.
Definition: emundo.h:71
EM::SetAllHor3DPosUndoEvent::~SetAllHor3DPosUndoEvent
~SetAllHor3DPosUndoEvent()
EM::SetAllHor3DPosUndoEvent::setArray
bool setArray(const Array2D< float > &, const RowCol &origin)
EM::PosIDChangeEvent::to_
const EM::PosID to_
Definition: emundo.h:136
EM::PosIDChangeEvent::getStandardDesc
const char * getStandardDesc() const
EM::PosIDChangeEvent::from_
const EM::PosID from_
Definition: emundo.h:135
EM::SetPosAttribUndoEvent::reDo
bool reDo()
EM::SetPosAttribUndoEvent::SetPosAttribUndoEvent
SetPosAttribUndoEvent(const EM::PosID &, int attrib, bool yn)
EM::PosIDChangeEvent::unDo
bool unDo()
EM::SetAllHor3DPosUndoEvent::oldorigin_
RowCol oldorigin_
Definition: emundo.h:89
EM::SetAllHor3DPosUndoEvent::oldarr_
Array2D< float > * oldarr_
Definition: emundo.h:91
EM::EMUndoEvent::getObjectID
virtual ObjectID getObjectID() const =0
EM::SetPosUndoEvent::savedposstr_
static const char * savedposstr_
Definition: emundo.h:62
EM::SetPrefColorEvent::getStandardDesc
const char * getStandardDesc() const
EM::SetAllHor3DPosUndoEvent::unDo
bool unDo()
EM::SetPosUndoEvent::posid_
EM::PosID posid_
Definition: emundo.h:59
EM::SetAllHor3DPosUndoEvent::getObjectID
ObjectID getObjectID() const
EM::SectionID
od_int16 SectionID
Definition: emposid.h:24
EM::SetPrefColorEvent::unDo
bool unDo()
EM::ObjectID
od_int32 ObjectID
Definition: emposid.h:23
EM::SetAllHor3DPosUndoEvent::reDo
bool reDo()
EM::PosIDChangeEvent
Saves information from a EMObject::changePosID call.
Definition: emundo.h:123
EM::EMUndo::getCurrentEMObjectID
ObjectID getCurrentEMObjectID(bool forredo) const
color.h
RowCol
IdxPair used for its row() and col().
Definition: rowcol.h:25
EM::SetPrefColorEvent::oldcolor_
const Color oldcolor_
Definition: emundo.h:158
EM::SetPrefColorEvent::SetPrefColorEvent
SetPrefColorEvent(const EM::ObjectID &, const Color &oldcol, const Color &newcol)
EM::SetPosAttribUndoEvent::attrib_
int attrib_
Definition: emundo.h:114
EM::SetPosUndoEvent::reDo
bool reDo()
EM::SetPosAttribUndoEvent::getObjectID
ObjectID getObjectID() const
Definition: emundo.h:109
EM::SetPrefColorEvent
UndoEvent to set preferred Color.
Definition: emundo.h:146
EM::SetPrefColorEvent::getObjectID
ObjectID getObjectID() const
Definition: emundo.h:154
Color
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer,...
Definition: color.h:26
EM::SetAllHor3DPosUndoEvent::SetAllHor3DPosUndoEvent
SetAllHor3DPosUndoEvent(EM::Horizon3D *, EM::SectionID, Array2D< float > *)
EM::PosIDChangeEvent::savedpos_
Coord3 savedpos_
Definition: emundo.h:137
EM::Horizon3D
3D Horizon. A Horizon is made up of one or more grids (so they can overlap at faults)....
Definition: emhorizon3d.h:96
Array2D
Array2D ( Subclass of ArrayND ) is a two dimensional array.
Definition: arraynd.h:140
EM::SetPosAttribUndoEvent::posid_
EM::PosID posid_
Definition: emundo.h:112
EM::PosID
Is an identifier for each position in the earthmodel.
Definition: emposid.h:37
EM::SetPosAttribUndoEvent::getStandardDesc
const char * getStandardDesc() const
EM::SetPrefColorEvent::objectid_
const EM::ObjectID objectid_
Definition: emundo.h:157
coord.h
Undo
Class to handle undo/redo information.
Definition: undo.h:42

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