OpendTect-6_4  6.4
emeditor.h
Go to the documentation of this file.
1 #ifndef emeditor_h
2 #define emeditor_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Bril
9  Date: 23-10-1996
10  Contents: Ranges
11  RCS: $Id$
12 ________________________________________________________________________
13 
14 -*/
15 
16 #include "mpeenginemod.h"
17 #include "callback.h"
18 #include "emposid.h"
19 #include "factory.h"
20 #include "coord.h"
21 #include "refcount.h"
22 
23 class BufferStringSet;
24 
25 namespace EM { class EMObject; }
26 namespace Geometry { class ElementEditor; }
27 
28 namespace MPE
29 {
30 
47 mExpClass(MPEEngine) ObjectEditor : public CallBacker
49 public:
51 
52  const EM::EMObject& emObject() const { return emobject; }
53 
54  virtual void startEdit( const EM::PosID& );
55  virtual bool setPosition(const Coord3&);
56  virtual void finishEdit();
57 
58  bool canSnapAfterEdit(const EM::PosID&) const;
59  bool getSnapAfterEdit() const;
60  void setSnapAfterEdit(bool yn);
61 
62  void addUser() { nrusers++; }
63  void removeUser() { nrusers--; }
64  int nrUsers() const { return nrusers; }
65 
66  virtual const
72  virtual int getAlongMovingStyle() const { return -1; }
75  virtual void setAlongMovingStyle(int index ) {}
79  virtual void getEditIDs(TypeSet<EM::PosID>&) const;
81  virtual bool addEditID( const EM::PosID& );
84  virtual bool removeEditID( const EM::PosID& );
88  virtual Coord3 getPosition(const EM::PosID&) const;
89  virtual bool mayTranslate1D(const EM::PosID&) const;
90  virtual Coord3 translation1DDirection(const EM::PosID&) const;
91 
92  virtual bool mayTranslate2D(const EM::PosID&) const;
93  virtual Coord3 translation2DNormal(const EM::PosID&) const;
94 
95  virtual bool mayTranslate3D(const EM::PosID&) const;
96 
97  virtual bool maySetNormal(const EM::PosID&) const;
98  virtual Coord3 getNormal(const EM::PosID&) const;
99 
100  virtual bool maySetDirection(const EM::PosID&) const;
101  virtual Coord3 getDirectionPlaneNormal(const EM::PosID&) const;
102  virtual Coord3 getDirection(const EM::PosID&) const;
103 
109  static void enableNodeCloning(bool yn=true);
110 
111 protected:
112 
113  virtual bool setPosition(const EM::PosID&,
114  const Coord3&);
115  Geometry::ElementEditor* getEditor( const EM::SectionID& );
116  const Geometry::ElementEditor* getEditor( const EM::SectionID& ) const;
117  virtual Geometry::ElementEditor* createEditor( const EM::SectionID& )=0;
118 
119  void editPosChangeTrigger(CallBacker*);
120  void emSectionChange(CallBacker*);
121 
122  virtual void getAlongMovingNodes( const EM::PosID&,
124  TypeSet<float>* ) const;
129  virtual void cloneMovingNode() {}
130 
138 
139  int nrusers;
140 
141 private:
144 
146 
148 };
149 
150 mDefineFactory1Param( MPEEngine, ObjectEditor, EM::EMObject&, EditorFactory );
151 
152 } // namespace MPE
153 
154 #endif
#define mRefCountImpl(ClassName)
Macro to setup a class with destructor for reference counting.
Definition: refcount.h:163
od_int16 SectionID
Definition: emposid.h:25
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
TypeSet< EM::PosID > changedpids
Definition: emeditor.h:134
ObjectSet< Geometry::ElementEditor > geeditors
Definition: emeditor.h:142
void removeUser()
Definition: emeditor.h:63
bool snapafterthisedit
Definition: emeditor.h:145
int nrusers
Definition: emeditor.h:139
Is an identifier for each position in the earthmodel.
Definition: emposid.h:37
TypeSet< Coord3 > alongmovingnodesstart
Definition: emeditor.h:136
TypeSet< EM::PosID > alongmovingnodes
Definition: emeditor.h:135
MPE stands for Model, Predict, Edit. Contains tracking and editing functions.
Definition: autotracker.h:32
EM::PosID movingnode
Definition: emeditor.h:132
void addUser()
Definition: emeditor.h:62
mDefineFactory1Param(EarthModel, EMObject, EMManager &, EMOF)
virtual void cloneMovingNode()
Definition: emeditor.h:129
Set of BufferString objects.
Definition: bufstringset.h:28
Definition: geeditor.h:25
Definition: callback.h:254
virtual const BufferStringSet * getAlongMovingStyleNames() const
Definition: emeditor.h:67
virtual int getAlongMovingStyle() const
Definition: emeditor.h:72
Abstraction of EM Object editing. It gives lists of which nodes that may be moved, and in what manner.
Definition: emeditor.h:47
const EM::EMObject & emObject() const
Definition: emeditor.h:52
A cartesian coordinate in 3D space.
Definition: coord.h:72
int nrUsers() const
Definition: emeditor.h:64
bool snapafteredit
Definition: emeditor.h:147
TypeSet< EM::SectionID > sections
Definition: emeditor.h:143
Base class for all EarthModel objects.
Definition: emobject.h:158
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
Notifier< ObjectEditor > editpositionchange
Definition: emeditor.h:104
EM::EMObject & emobject
Definition: emeditor.h:131
Coord3 startpos
Definition: emeditor.h:133
Definition: arraytesselator.h:21
virtual void setAlongMovingStyle(int index)
Definition: emeditor.h:75
TypeSet< float > alongmovingnodesfactors
Definition: emeditor.h:137

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