OpendTect  6.3
vismarkerset.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: Nanne Hemstra
8  Date: July 2002
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "visobject.h"
15 #include "trigonometry.h"
16 #include "draw.h"
17 #include "viscoord.h"
18 #include "visnormals.h"
19 
20 namespace osgGeo { class MarkerSet; }
21 
22 namespace visBase
23 {
24  class PolygonOffset;
25 
34 {
35 public:
36 
38  {
42  ROTATE_TO_AXIS
43  };
44 
45  static MarkerSet* create()
47 
48  Coordinates* getCoordinates() { return coords_; }
49  const Coordinates* getCoordinates() const { return coords_; }
50  Normals* getNormals();
51 
52  void setMaterial(visBase::Material*);
54 
55  void setMarkersSingleColor(const Color& singlecolor);
58  Color getMarkersSingleColor() const;
59  bool usesSingleColor() const;
60  void getColorArray(TypeSet<Color>& colors) const;
61 
62  void setMarkerStyle(const OD::MarkerStyle3D&);
66  OD::MarkerStyle3D& getMarkerStyle() { return markerstyle_; }
67  const OD::MarkerStyle3D& getMarkerStyle() const { return markerstyle_; }
68  void setType(OD::MarkerStyle3D::Type);
70  OD::MarkerStyle3D::Type getType() const;
71 
72  void setScreenSize(float);
76  float getScreenSize() const;
77  static float cDefaultScreenSize() { return 5; }
78 
79  void setMarkerHeightRatio(float);
80  float getMarkerHeightRatio() const;
81 
82  void setMinimumScale(float);
83  float getMinimumScale() const;
84 
85  void setMaximumScale(float);
86  float getMaximumScale() const;
87 
88  void setAutoRotateMode(AutoRotateMode);
89 
90  void setRotationForAllMarkers(const Coord3&, const float);
91  void setSingleMarkerRotation(const Quaternion&, int);
92  void applyRotationToAllMarkers(bool);
93 
94 
95  void doFaceCamera(bool yn);
98  bool facesCamera() const;
99 
100  void setDisplayTransformation( const mVisTrans* );
101  const mVisTrans* getDisplayTransformation() const;
102 
103  void setPixelDensity(float);
104  float getPixelDensity() const { return pixeldensity_; }
105 
106  void removeMarker(int idx);
107 
108  void clearMarkers();
110  void turnMarkerOn(unsigned int idx,bool);
111  bool markerOn(unsigned int);
112  void turnAllMarkersOn(bool);
113 
114  int findClosestMarker(const Coord3&, bool scenespace=false);
115  int findMarker(const Coord3&, const Coord3& eps,
116  bool scenespace = false);
117 
118  void setMarkerResolution(float res);
122  int size() const;
123  int addPos(const Coord3&, bool draw = true);
124  void setPos(int, const Coord3&,bool draw = true);
125  void insertPos(int, const Coord3&,bool draw = true);
126  void forceRedraw(bool);
127  void addPolygonOffsetNodeState();
128  void removePolygonOffsetNodeState();
129 
130 protected:
131  void materialChangeCB(CallBacker*);
132  ~MarkerSet();
133 
135  osg::Array* onoffarr_;
138  osgGeo::MarkerSet* markerset_;
140 
142 
146 };
147 
148 } // namespace visBase
Quaternion is an extension to complex numbers.
Definition: trigonometry.h:329
#define mExpClass(module)
Definition: commondefs.h:157
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
float getPixelDensity() const
Definition: vismarkerset.h:104
float rotationangle_
Definition: vismarkerset.h:143
Definition: vismarkerset.h:41
Definition: vismarkerset.h:40
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:35
Type
Definition: draw.h:95
Definition: vismarkerset.h:39
OD::MarkerStyle3D & getMarkerStyle()
Definition: vismarkerset.h:66
const OD::MarkerStyle3D & getMarkerStyle() const
Definition: vismarkerset.h:67
3D point or vector
Definition: commontypes.h:57
PolygonOffset * offset_
Definition: vismarkerset.h:145
Definition: visnormals.h:29
RefMan< Coordinates > coords_
Definition: vismarkerset.h:134
#define mVisTrans
Definition: visdata.h:25
osgGeo::MarkerSet * markerset_
Definition: vismarkerset.h:138
Definition: vismaterial.h:36
const Coordinates * getCoordinates() const
Definition: vismarkerset.h:49
static MarkerSet * create()
Definition: vismarkerset.h:45
A set of coordinates. The coordinates will be transformed by the transformation before given to Coin...
Definition: viscoord.h:45
float pixeldensity_
Definition: vismarkerset.h:141
Definition: visannot.h:40
static float cDefaultScreenSize()
Definition: vismarkerset.h:77
ConstRefMan< visBase::Transformation > displaytrans_
Definition: vismarkerset.h:137
AutoRotateMode
Definition: vismarkerset.h:37
Coord3 rotationvec_
Definition: vismarkerset.h:144
osg::Array * onoffarr_
Definition: vismarkerset.h:135
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:24
#define mCreateDataObj(clss)
Definition: visdata.h:210
Definition: vispolygonoffset.h:22
Definition: visobject.h:67
OD::MarkerStyle3D markerstyle_
Definition: vismarkerset.h:139
MarkerSet is a set of basic pickmarker with a constant size on screen. Size and shape are settable...
Definition: vismarkerset.h:33
RefMan< Normals > normals_
Definition: vismarkerset.h:136
Definition: draw.h:91
Definition: ptrman.h:200

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