OpendTect  6.3
visdepthtabplanedragger.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 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "visobject.h"
15 #include "ranges.h"
16 
17 
18 namespace osgGeo { class TabPlaneDragger; }
19 namespace osg { class Switch; }
20 
21 
22 
23 
24 namespace visBase
25 {
26 
27 class PlaneDraggerCallbackHandler;
28 
34 {
35  friend class PlaneDraggerCallbackHandler;
36 
37 public:
40  void removeScaleTabs();
44  void setCenter( const Coord3&, bool alldims = true );
49  Coord3 center() const;
50 
51  void setSize( const Coord3&, bool alldims=true );
56  Coord3 size() const;
57 
58  void setDim(int dim);
64  int getDim() const;
65 
66  void setSpaceLimits( const Interval<float>& x,
67  const Interval<float>& y,
68  const Interval<float>& z );
69  void getSpaceLimits( Interval<float>& x,
70  Interval<float>& y,
71  Interval<float>& z ) const;
72 
73  void setWidthLimits( const Interval<float>& x,
74  const Interval<float>& y,
75  const Interval<float>& z );
76  void getWidthLimits( Interval<float>& x,
77  Interval<float>& y,
78  Interval<float>& z ) const;
79 
80  void setDisplayTransformation( const mVisTrans* );
81  const mVisTrans* getDisplayTransformation() const;
82 
83  void showDraggerBorder(bool yn=true);
84  bool isDraggerBorderShown() const;
85 
86  void showPlane(bool yn=true);
87  bool isPlaneShown() const;
88 
89  void setTransDragKeys(bool depth,int keys);
95  int getTransDragKeys(bool depth) const;
101  void setDragCtrlSpacing(const StepInterval<float>&,
102  const StepInterval<float>&,
103  const StepInterval<float>&);
104 
105  Notifier<DepthTabPlaneDragger> started;
106  Notifier<DepthTabPlaneDragger> motion;
107  Notifier<DepthTabPlaneDragger> changed;
108  Notifier<DepthTabPlaneDragger> finished;
109 
110 protected:
111  ~DepthTabPlaneDragger();
112 
113  void setOsgMatrix(const Coord3& worldscale,
114  const Coord3& worldtrans);
115 
116  void initOsgDragger();
117 
118  int dim_;
119  TypeSet<Coord3> centers_;
120  TypeSet<Coord3> sizes_;
121 
122  ConstRefMan<mVisTrans> transform_;
123 
124  osgGeo::TabPlaneDragger* osgdragger_;
125  osg::Switch* osgdraggerplane_;
126  PlaneDraggerCallbackHandler* osgcallbackhandler_;
127 
128  Interval<float> widthranges_[3];
129  Interval<float> spaceranges_[3];
130  StepInterval<float> dragctrlspacing_[3];
131 };
132 
133 };
#define mExpClass(module)
Definition: commondefs.h:157
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:35
Interval of values.
Definition: commontypes.h:27
Class to help setup a callback handling.
Definition: notify.h:121
3D point or vector
Definition: commontypes.h:57
Set of (small) copyable elements.
Definition: commontypes.h:26
#define mVisTrans
Definition: visdata.h:25
Interval with step.
Definition: commontypes.h:29
Definition: visdepthtabplanedragger.h:33
static DepthTabPlaneDragger * create()
Definition: visdepthtabplanedragger.h:38
Definition: visannot.h:40
Open Scene Graph.
Definition: visannot.h:26
#define mCreateDataObj(clss)
Definition: visdata.h:210
Definition: visobject.h:67
Definition: ptrman.h:227

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