OpendTect-6_4  6.4
vissurvscene.h
Go to the documentation of this file.
1 #ifndef vissurvscene_h
2 #define vissurvscene_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "vissurveymod.h"
17 #include "visscene.h"
18 #include "bufstring.h"
19 #include "keyboardevent.h"
20 #include "mouseevent.h"
21 #include "trckeyzsampling.h"
22 #include "trckeyvalue.h"
23 #include "position.h"
24 
25 class MouseCursor;
26 class TaskRunner;
27 class FontData;
28 class ZAxisTransform;
29 template <class T> class Selector;
30 
31 namespace ZDomain { class Info; }
32 
33 namespace visBase
34 {
35  class Annotation;
36  class MarkerSet;
37  class PolygonSelection;
38  class SceneColTab;
39  class TopBotImage;
40  class Transformation;
41  class VisualObject;
42 }
43 
44 namespace visSurvey
45 {
46 
77 {
78 public:
79  static Scene* create()
80  mCreateDataObj(Scene);
81 
82  virtual void removeAll();
83  virtual void addObject(visBase::DataObject*);
91  virtual int size() const;
92  virtual int getFirstIdx(const DataObject*) const;
93  virtual int getFirstIdx(int did) const
94  { return visBase::Scene::getFirstIdx(did); }
95  visBase::DataObject* getObject(int);
96  const visBase::DataObject* getObject(int) const;
97 
98  void addUTMObject(visBase::VisualObject*);
99  void addInlCrlZObject(visBase::DataObject*);
100  virtual void removeObject(int idx);
101 
102  void setTrcKeyZSampling(const TrcKeyZSampling&);
103  const TrcKeyZSampling& getTrcKeyZSampling() const { return tkzs_; }
104  void showAnnotText(bool);
105  bool isAnnotTextShown() const;
106  void showAnnotScale(bool);
107  bool isAnnotScaleShown() const;
108  void showAnnotGrid(bool);
109  bool isAnnotGridShown() const;
110  void showAnnot(bool);
111  bool isAnnotShown() const;
112  void setAnnotText(int dim,const uiString&);
113  void setAnnotFont(const FontData&);
114  const FontData& getAnnotFont() const;
115  void setAnnotScale(const TrcKeyZSampling&);
116  const TrcKeyZSampling& getAnnotScale() const;
117  void savePropertySettings();
118 
119  visBase::PolygonSelection* getPolySelection() { return polyselector_; }
120  void setPolygonSelector(visBase::PolygonSelection*);
121  const Selector<Coord3>* getSelector() const;
122  visBase::SceneColTab* getSceneColTab() { return scenecoltab_; }
123  void setSceneColTab(visBase::SceneColTab*);
124 
130  Coord3 getMousePos(bool displayspace) const;
131  TrcKeyValue getMousePos() const;
132  BufferString getMousePosValue() const;
133  BufferString getMousePosString() const;
134  const MouseCursor* getMouseCursor() const;
135  void passMouseCursor(const MouseCursor&);
136  const KeyboardEvent& getKeyboardEvent() const { return kbevent_; }
137  const MouseEvent& getMouseEvent() const { return mouseevent_; }
138  void setEventHandled();
139 
140  void objectMoved(CallBacker*);
141 
142  void setFixedZStretch(float);
148  float getFixedZStretch() const;
149 
150  void setTempZStretch(float);
151  float getTempZStretch() const;
152 
153  void setZScale(float);
158  float getZScale() const;
162  float getApparentVelocity(float zstretch) const;
163  /*<!Velocity Unit depends on display depth in
164  feet setting. */
165 
166  const mVisTrans* getTempZStretchTransform() const;
167  const mVisTrans* getInlCrl2DisplayTransform() const;
168  const mVisTrans* getUTM2DisplayTransform() const;
169  void setZAxisTransform(ZAxisTransform*,TaskRunner*);
170  ZAxisTransform* getZAxisTransform();
171  const ZAxisTransform* getZAxisTransform() const;
172 
173  bool isRightHandSystem() const;
174 
175  void setZDomainInfo(const ZDomain::Info&);
176  const ZDomain::Info& zDomainInfo() const;
177  void getAllowedZDomains(BufferString&) const;
178 
179  // Convenience
180  const char* zDomainKey() const;
181  uiString zDomainUserName() const;
182  const char* zDomainUnitStr(bool withparens=false) const;
183  int zDomainUserFactor() const;
184  const char* zDomainID() const;
185 
186  void setAnnotColor(const Color&);
187  const Color getAnnotColor() const;
188  void setMarkerPos(const TrcKeyValue&,int sceneid);
189  void setMarkerSize(float );
190  float getMarkerSize() const;
191  const Color& getMarkerColor() const;
192  void setMarkerColor(const Color&);
193 
194  void createTopBotImage(bool istop);
195  visBase::TopBotImage* getTopBotImage(bool istop);
196 
197  void fillPar(IOPar&) const;
198  virtual bool usePar(const IOPar&);
199 
200  static const char* sKeyZStretch();
201 
202 protected:
203  ~Scene();
204 
205  void setup();
206  void updateAnnotationText();
207  void updateTransforms(const TrcKeyZSampling&);
208  void mouseCB(CallBacker*);
209  void keyPressCB(CallBacker*);
210  visBase::MarkerSet* createMarkerSet() const;
211  void mouseCursorCB(CallBacker*);
212  static const Color& cDefaultMarkerColor();
213 
214  void togglePosModeManipObjSel();
215  void selChangeCB(CallBacker*);
216 
220 
222 
226 
228 
234 
237  int getImageFromPar(const IOPar&,const char*,
239 
246 
248 
250  float zscale_;
255 
257  bool usepar_;
260 
261  static const char* sKeyShowAnnot();
262  static const char* sKeyShowScale();
263  static const char* sKeyShowGrid();
264  static const char* sKeyAnnotFont();
265  static const char* sKeyAnnotColor();
266  static const char* sKeyMarkerColor();
267  static const char* sKeyShowCube();
268  static const char* sKeyZAxisTransform();
269  static const char* sKeyAppAllowShading();
270  static const char* sKeyTopImageID();
271  static const char* sKeyBotImageID();
272 
273 public:
274  Coord3 getTopBottomIntersection(
275  const visBase::EventInfo&,
276  bool outerface,bool ignoreocclusion) const;
277  Coord3 getTopBottomSurveyPos(
278  const visBase::EventInfo&, bool outerface,
279  bool ignoreocclusion,
280  bool inlcrlspace=true ) const;
281 
282  void setMoreObjectsToDoHint(bool yn);
283  bool getMoreObjectsToDoHint() const;
284  void selectPosModeManipObj(int selid);
285 };
286 
287 } // namespace visSurvey
288 
289 
290 #endif
Definition: visobject.h:37
#define mExpClass(module)
Definition: commondefs.h:160
Definition: trckeyvalue.h:27
Coord3 xytmousepos_
Definition: vissurvscene.h:240
virtual int getFirstIdx(int id) const
RefMan< visBase::Transformation > utm2disptransform_
Definition: vissurvscene.h:225
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Selector< Coord3 > * coordselector_
Definition: vissurvscene.h:232
Definition of a mouse cursor, can be either a predefined shape (from the enum, or a file...
Definition: mousecursor.h:26
visBase::Annotation * annot_
Definition: vissurvscene.h:229
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
visBase::SceneColTab * scenecoltab_
Definition: vissurvscene.h:233
BufferString mouseposval_
Definition: vissurvscene.h:242
const MouseEvent & getMouseEvent() const
Definition: vissurvscene.h:137
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
bool spacebarwaspressed_
Definition: vissurvscene.h:219
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:65
Notifier< Scene > sceneboundingboxupdated
Definition: vissurvscene.h:129
Keyboard event.
Definition: keyboardevent.h:23
visBase::PolygonSelection * polyselector_
Definition: vissurvscene.h:231
IOPar & infopar_
Definition: vissurvscene.h:245
Definition: uistring.h:89
visBase::PolygonSelection * getPolySelection()
Definition: vissurvscene.h:119
Data needed to make an actual font.
Definition: fontdata.h:20
Used for displaying a polyline, preview for a random line created throught well path.
Definition: visarrowdisplay.h:20
visBase::SceneColTab * getSceneColTab()
Definition: vissurvscene.h:122
ZAxisTransform * datatransform_
Definition: vissurvscene.h:227
Definition: callback.h:254
RefMan< visBase::Transformation > inlcrlscale_
Definition: vissurvscene.h:224
const MouseCursor * mousecursor_
Definition: vissurvscene.h:244
void removeAll()
MouseEvent mouseevent_
Definition: vissurvscene.h:252
Definition: vispolygonselection.h:40
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Class that can execute a task.
Definition: task.h:169
Notifier< Scene > mouseposchange
Definition: vissurvscene.h:125
Threads::Lock updatelock_
Definition: vissurvscene.h:259
#define mVisTrans
Definition: visdata.h:31
TrcKey mousetrckey_
Definition: vissurvscene.h:241
Notifier< Scene > mousecursorchange
Definition: vissurvscene.h:126
const KeyboardEvent & getKeyboardEvent() const
Definition: vissurvscene.h:136
visBase::TopBotImage * topimg_
Definition: vissurvscene.h:235
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
Notifier< Scene > keypressed
Definition: vissurvscene.h:127
KeyboardEvent kbevent_
Definition: vissurvscene.h:251
Notifier< Scene > mouseclicked
Definition: vissurvscene.h:128
float zscale_
Definition: vissurvscene.h:250
Database for 3D objects.
Definition: vissurvscene.h:76
int posmodemanipdeselobjid_
Definition: vissurvscene.h:218
RefMan< visBase::Transformation > inlcrlrotation_
Definition: vissurvscene.h:223
Interface for classes that select on basis of a key.
Definition: selector.h:25
TrcKeyZSampling tkzs_
Definition: vissurvscene.h:253
TypeSet< int > hoveredposmodemanipobjids_
Definition: vissurvscene.h:217
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
const TrcKeyZSampling & getTrcKeyZSampling() const
Definition: vissurvscene.h:103
A cartesian coordinate in 3D space.
Definition: coord.h:72
RefMan< visBase::Transformation > tempzstretchtrans_
Definition: vissurvscene.h:221
virtual int getFirstIdx(int did) const
Definition: vissurvscene.h:93
Definition: visannot.h:43
bool usepar_
Definition: vissurvscene.h:257
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
ZDomain::Info * zdomaininfo_
Definition: vissurvscene.h:249
Definition: visscenecoltab.h:30
static uiHor3DInterpol * create(uiParent *)
TrcKeyZSampling annotscale_
Definition: vissurvscene.h:254
Definition: vistopbotimage.h:28
BufferString mouseposstr_
Definition: vissurvscene.h:243
bool ctshownusepar_
Definition: vissurvscene.h:256
float curzstretch_
Definition: vissurvscene.h:247
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
Annotation is a simple wireframe box with text on its axis.
Definition: visannot.h:53
visBase::TopBotImage * botimg_
Definition: vissurvscene.h:236
#define mCreateDataObj(clss)
Definition: visdata.h:209
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:28
Base class for z-axis transforms.
Definition: zaxistransform.h:37
MarkerSet is a set of basic pickmarker with a constant size on screen. Size and shape are settable...
Definition: vismarkerset.h:36
Definition: mouseevent.h:73
visBase::MarkerSet * markerset_
Definition: vissurvscene.h:230
bool moreobjectstodo_
Definition: vissurvscene.h:258
Information of z-domain.
Definition: zdomain.h:91
Definition: zdomain.h:20

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