OpendTect-6_4  6.4
vislocationdisplay.h
Go to the documentation of this file.
1 #ifndef vislocationdisplay_h
2 #define vislocationdisplay_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: June 2006
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "vissurveymod.h"
17 #include "visobject.h"
18 #include "vissurvobj.h"
19 
20 class Sphere;
21 namespace Pick { class Set; class Location; class SetMgr; }
22 template <class T> class Selector;
23 
24 
25 namespace visSurvey
26 {
27 
28 class Sower;
29 
37  , public visSurvey::SurveyObject
38 {
39  friend class Sower;
40 
41 public:
42  virtual void setSet(Pick::Set*); // once!
43  void setSetMgr(Pick::SetMgr*);
45  Pick::Set* getSet() { return set_; }
46  const Pick::Set* getSet() const { return set_; }
47 
48  MultiID getMultiID() const { return storedmid_; }
49 
50  const char* errMsg() const { return errmsg_.str(); }
51 
52  void fullRedraw(CallBacker* =0);
53  void showAll(bool yn);
54  bool allShown() const { return showall_; }
55  virtual void setOnlyAtSectionsDisplay(bool);
56  virtual bool displayedOnlyAtSections() const;
57  void allowDoubleClick(bool yn);
58 
59  virtual BufferString getManipulationString() const;
60  void getObjectInfo(BufferString&) const;
62  IOPar& iop ) const
63  { return SurveyObject::getMousePosInfo(ei,iop);}
64  virtual void getMousePosInfo(const visBase::EventInfo&,
66  BufferString&) const;
67  virtual bool hasColor() const { return true; }
68  virtual Color getColor() const;
69  virtual void setColor(Color);
70 
71  virtual bool allowsPicks() const { return true; }
72  virtual bool isPicking() const;
73  virtual void otherObjectsMoved(
75  virtual NotifierAccess* getManipulationNotifier() { return &manip_; }
76  virtual void setDisplayTransformation(const mVisTrans*);
77  virtual const mVisTrans* getDisplayTransformation() const;
78  void setRightHandSystem(bool yn);
79  virtual void setSceneEventCatcher(visBase::EventCatcher*);
80  virtual void turnOnSelectionMode(bool) {}
81 
82  int getPickIdx(visBase::DataObject*) const;
83 
84  const SurveyObject* getPickedSurveyObject() const;
85 
86  bool canRemoveSelection() const { return true; }
87  void removeSelection(const Selector<Coord3>&,
88  TaskRunner*);
89 
90  bool setZAxisTransform(ZAxisTransform*,TaskRunner*);
91  const ZAxisTransform* getZAxisTransform() const;
92 
93  virtual void fillPar(IOPar&) const;
94  virtual bool usePar(const IOPar&);
95 
96  Coord3 convertCoords(const Coord3&,bool disptoworld);
97 
98 protected:
100  virtual void setPosition(int idx,const Pick::Location&,
101  bool add=false);
102  virtual void removePosition(int);
103  virtual void removeAll();
104  virtual void redrawMultiSets() {}
105 
106  virtual bool hasDirection() const { return false; }
107  virtual bool hasText() const { return false; }
108  virtual int clickedMarkerIndex(
109  const visBase::EventInfo& evi)const;
110  virtual bool isMarkerClick(
111  const visBase::EventInfo& evi)const;
112  virtual void updateDragger() {}
113  virtual void setDraggerNormal(const Coord3&) {}
114  virtual bool draggerNormal() const {return true;}
115  virtual bool removeSelections(TaskRunner*);
116 
117  virtual int isDirMarkerClick(const TypeSet<int>&) const;
118  void triggerDeSel();
119 
120  virtual ~LocationDisplay();
121 
122  bool addPick(const Coord3&,const Sphere&,bool);
123  void removePick(int,bool setundo=true);
124 
125  bool getPickSurface(const visBase::EventInfo&,
126  Coord3& pos, Coord3& normal) const;
127  Coord3 display2World(const Coord3&) const;
128  Coord3 world2Display(const Coord3&) const;
129  bool transformPos(Pick::Location&) const;
130  const Coord3 getActivePlaneNormal(
131  const visBase::EventInfo&) const;
132 
133  void pickCB(CallBacker* cb);
134  virtual void locChg(CallBacker* cb);
135  virtual void setChg(CallBacker* cb);
136  virtual void dispChg(CallBacker* cb);
137 
143 
145 
146  bool showall_;
149  int voiidx_;
150  bool ctrldown_;
152 
156 
158 
159  static const char* sKeyID();
160  static const char* sKeyMgrName();
161  static const char* sKeyShowAll();
162  static const char* sKeyMarkerType();
163  static const char* sKeyMarkerSize();
164 
167  bool undomove_;
169 
170 };
171 
172 } // namespace visSurvey
173 
174 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Sower * sower_
Definition: vislocationdisplay.h:165
bool showall_
Definition: vislocationdisplay.h:146
bool ctrldown_
Definition: vislocationdisplay.h:150
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
const char * str() const
Definition: odstring.h:48
virtual bool hasColor() const
Definition: vislocationdisplay.h:67
Pick::SetMgr * picksetmgr_
Definition: vislocationdisplay.h:139
int pickedsobjid_
Picked SurveyObject ID.
Definition: vislocationdisplay.h:148
bool allShown() const
Definition: vislocationdisplay.h:54
int waitsfordirectionid_
Definition: vislocationdisplay.h:141
const char * errMsg() const
Definition: vislocationdisplay.h:50
ZAxisTransform * datatransform_
Definition: vislocationdisplay.h:155
Pick location in space,.
Definition: picklocation.h:46
void getMousePosInfo(const visBase::EventInfo &ei, IOPar &iop) const
Definition: vislocationdisplay.h:61
Interface class for Notifier. See comments there.
Definition: callback.h:161
int voiidx_
Definition: vislocationdisplay.h:149
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:65
ObjectSet< Selector< Coord3 > > selectors_
Definition: vislocationdisplay.h:151
MultiID storedmid_
Definition: vislocationdisplay.h:157
bool canRemoveSelection() const
Definition: vislocationdisplay.h:86
virtual bool allowsPicks() const
Definition: vislocationdisplay.h:71
Used for displaying a polyline, preview for a random line created throught well path.
Definition: visarrowdisplay.h:20
bool undomove_
Definition: vislocationdisplay.h:167
virtual bool hasText() const
Definition: vislocationdisplay.h:107
visBase::EventCatcher * eventcatcher_
Definition: vislocationdisplay.h:153
Definition: callback.h:254
Set of picks with something in common.
Definition: pickset.h:31
Set of pointers to objects.
Definition: commontypes.h:32
const Pick::Set * getSet() const
Definition: vislocationdisplay.h:46
virtual void redrawMultiSets()
Definition: vislocationdisplay.h:104
void removeAll()
VisualObjectImpl
Definition: visobject.h:128
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Class that can execute a task.
Definition: task.h:169
virtual bool hasDirection() const
Definition: vislocationdisplay.h:106
int waitsforpositionid_
Definition: vislocationdisplay.h:142
#define mVisTrans
Definition: visdata.h:31
const mVisTrans * transformation_
Definition: vislocationdisplay.h:154
bool selectionmodel_
Definition: vislocationdisplay.h:168
Interface for classes that select on basis of a key.
Definition: selector.h:25
int mousepressid_
Definition: vislocationdisplay.h:147
Used for displaying picksets of varying types. The class is not intended for standalone usage...
Definition: vislocationdisplay.h:36
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
Pick::Set * set_
Definition: vislocationdisplay.h:138
A cartesian coordinate in 3D space.
Definition: coord.h:72
virtual bool draggerNormal() const
Definition: vislocationdisplay.h:114
Definition: visannot.h:43
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
BufferString errmsg_
Definition: horizontracker.h:119
Notifier< LocationDisplay > manip_
Definition: vislocationdisplay.h:140
Pick::Set * getSet()
Definition: vislocationdisplay.h:45
Definition: picklocation.h:21
Base class for all &#39;Display&#39; objects.
Definition: vissurvobj.h:58
Definition: visevent.h:44
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
Represents a point in spherical coordinates. The angle phi lies in the horizontal plane...
Definition: trigonometry.h:582
virtual NotifierAccess * getManipulationNotifier()
Definition: vislocationdisplay.h:75
virtual void setDraggerNormal(const Coord3 &)
Definition: vislocationdisplay.h:113
Definition: vissower.h:32
virtual void updateDragger()
Definition: vislocationdisplay.h:112
Base class for z-axis transforms.
Definition: zaxistransform.h:37
Utility to manage pick set lifecycles. Also supports change notifications.
Definition: picksetmgr.h:34
virtual void turnOnSelectionMode(bool)
Definition: vislocationdisplay.h:80
TypeSet< int > invalidpicks_
Definition: vislocationdisplay.h:144
Definition: visevent.h:87
Compound key consisting of ints.
Definition: multiid.h:25
MultiID getMultiID() const
Definition: vislocationdisplay.h:48
Coord3 undoloccoord_
Definition: vislocationdisplay.h:166

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