OpendTect-6_4  6.4
vispolygonselection.h
Go to the documentation of this file.
1 #ifndef vispolygonselection_h
2 #define vispolygonselection_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: K. Tingdahl
9  Date: June 2008
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "visbasemod.h"
17 #include "visobject.h"
18 #include "selector.h"
19 #include "draw.h"
20 #include "thread.h"
21 
22 
23 namespace osgGeo{ class PolygonSelection; }
24 
25 template <class T> class ODPolygon;
26 
27 namespace visBase
28 {
29 class Material;
30 class SelectionCallBack;
31 class DrawStyle;
32 class Camera;
33 
41 {
42 public:
45  enum SelectionType { Off, Rectangle, Polygon };
46  void setSelectionType(SelectionType);
47  SelectionType getSelectionType() const;
48 
49  void setLineStyle(const OD::LineStyle&);
50  const OD::LineStyle& getLineStyle() const;
51 
52  void clear();
53  bool hasPolygon() const;
54  bool singleSelection() const;
55  bool isSelfIntersecting() const;
56  bool isInside(const Coord3&,
57  bool displayspace=false) const;
58 
59  char includesRange(const Coord3& start,
60  const Coord3& stop,
61  bool displayspace ) const;
70  void setUTMCoordinateTransform(const mVisTrans*);
76  static Notifier<PolygonSelection>* polygonFinished();
77 
78  bool rayPickThrough(const Coord3& worldpos,
79  TypeSet<int>& pickedobjids,
80  int depthidx=0) const;
81  void setMasterCamera(Camera*);
82  void setHUDCamera(Camera*);
83  PolygonSelection* copy() const;
84 
85 protected:
87  const osgGeo::PolygonSelection*);
89 
90  void polygonChangeCB(CallBacker*);
91 
92 
94 
98 
99 
100  osgGeo::PolygonSelection* selector_;
102  SelectionCallBack* selectorcb_;
103 };
104 
105 
107 {
108 public:
111 
112  Selector<Coord3>* clone() const;
113  const char* selectorType() const;
114  bool isOK() const;
115  bool hasPolygon() const;
116  bool includes(const Coord3&) const;
117  bool canDoRange() const { return true; }
118  char includesRange(const Coord3& start,
119  const Coord3& stop) const;
120  void copySelection(const PolygonSelection&);
121 
122 protected:
123  bool isEq(const Selector<Coord3>&) const;
124 
126 };
127 
128 };
129 
130 
131 #endif
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
keep osg camera status and render info
Definition: viscamera.h:30
Camera * mastercamera_
Definition: vispolygonselection.h:101
Lock that permits multiple readers to lock the object at the same time, but it will not allow any rea...
Definition: thread.h:141
SelectionType
Definition: vispolygonselection.h:45
Threads::ReadWriteLock polygonlock_
Definition: vispolygonselection.h:97
Definition: draw.h:118
(Closed) sequence of connected 2-D coordinates.
Definition: polygon.h:27
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
Definition: visdrawstyle.h:33
void clear(std::ios &)
const PolygonSelection & vissel_
Definition: vispolygonselection.h:125
const visBase::Transformation * utm2disptransform_
Definition: vispolygonselection.h:93
osgGeo::PolygonSelection * selector_
Definition: vispolygonselection.h:100
Definition: callback.h:254
bool canDoRange() const
Definition: vispolygonselection.h:117
static PolygonSelection * create()
Definition: vispolygonselection.h:43
Definition: vispolygonselection.h:40
#define mVisTrans
Definition: visdata.h:31
SelectionCallBack * selectorcb_
Definition: vispolygonselection.h:102
Interface for classes that select on basis of a key.
Definition: selector.h:25
A cartesian coordinate in 3D space.
Definition: coord.h:72
Definition: visannot.h:43
Definition: vispolygonselection.h:106
ODPolygon< double > * polygon_
Definition: vispolygonselection.h:96
void copy(TypeSetBase< T, I > &to, const TypeSetBase< S, I > &from)
Definition: typeset.h:212
#define mCreateDataObj(clss)
Definition: visdata.h:209
Definition: visobject.h:72
Definition: seistype.h:26
DrawStyle * drawstyle_
Definition: vispolygonselection.h:95

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