OpendTect-6_4  6.4
vismarkerset.h
Go to the documentation of this file.
1 #ifndef vismarkerset_h
2 #define vismarkerset_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: July 2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "visbasemod.h"
17 #include "visobject.h"
18 #include "trigonometry.h"
19 #include "draw.h"
20 #include "viscoord.h"
21 #include "visnormals.h"
22 
23 namespace osgGeo { class MarkerSet; }
24 
25 namespace visBase
26 {
27  class PolygonOffset;
28 
37 {
38 public:
39 
41  {
45  ROTATE_TO_AXIS
46  };
47 
48  static MarkerSet* create()
50 
51  Coordinates* getCoordinates() { return coords_; }
52  const Coordinates* getCoordinates() const { return coords_; }
53  Normals* getNormals();
54 
55  void setMaterial(visBase::Material*);
57 
58  void setMarkersSingleColor(const Color& singlecolor);
61  Color getMarkersSingleColor() const;
62  bool usesSingleColor() const;
63  void getColorArray(TypeSet<Color>& colors) const;
64 
65  void setMarkerStyle(const MarkerStyle3D&);
69  MarkerStyle3D& getMarkerStyle() { return markerstyle_; }
70  const MarkerStyle3D& getMarkerStyle() const { return markerstyle_; }
71  void setType(MarkerStyle3D::Type);
73  MarkerStyle3D::Type getType() const;
74 
75  void setScreenSize(float);
79  float getScreenSize() const;
80  static float cDefaultScreenSize() { return 5; }
81 
82  void setMarkerHeightRatio(float);
83  float getMarkerHeightRatio() const;
84 
85  void setMinimumScale(float);
86  float getMinimumScale() const;
87 
88  void setMaximumScale(float);
89  float getMaximumScale() const;
90 
91  void setAutoRotateMode(AutoRotateMode);
92 
93  void setRotationForAllMarkers(const Coord3&, const float);
94  void setSingleMarkerRotation(const Quaternion&, int);
95  void applyRotationToAllMarkers(bool);
96 
97 
98  void doFaceCamera(bool yn);
101  bool facesCamera() const;
102 
103  void setDisplayTransformation( const mVisTrans* );
104  const mVisTrans* getDisplayTransformation() const;
105 
106  void setPixelDensity(float);
107  float getPixelDensity() const { return pixeldensity_; }
108 
109  void removeMarker(int idx);
110 
111  void clearMarkers();
113  void turnMarkerOn(unsigned int idx,bool);
114  void turnAllMarkersOn(bool);
115  bool markerOn(unsigned int);
116 
117  int findClosestMarker(const Coord3&, bool scenespace=false);
118  int findMarker(const Coord3&, const Coord3& eps,
119  bool scenespace = false);
120 
121  void setMarkerResolution(float res);
125  int size() const;
126  int addPos(const Coord3&, bool draw = true);
127  void setPos(int, const Coord3&,bool draw = true);
128  void insertPos(int, const Coord3&,bool draw = true);
129  void forceRedraw(bool);
130  void addPolygonOffsetNodeState();
131  void removePolygonOffsetNodeState();
132 
133 protected:
134  void materialChangeCB(CallBacker*);
135  ~MarkerSet();
136 
140  osgGeo::MarkerSet* markerset_;
142 
144 
148  osg::Array* onoffarr_;
149 };
150 
151 } // namespace visBase
152 
153 #endif
Quaternion is an extension to complex numbers.
Definition: trigonometry.h:328
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
float getPixelDensity() const
Definition: vismarkerset.h:107
float rotationangle_
Definition: vismarkerset.h:145
Definition: vismarkerset.h:44
const MarkerStyle3D & getMarkerStyle() const
Definition: vismarkerset.h:70
Definition: vismarkerset.h:43
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
Definition: vismarkerset.h:42
PolygonOffset * offset_
Definition: vismarkerset.h:147
Definition: visnormals.h:32
RefMan< Coordinates > coords_
Definition: vismarkerset.h:137
#define mVisTrans
Definition: visdata.h:31
osgGeo::MarkerSet * markerset_
Definition: vismarkerset.h:140
Definition: vismaterial.h:37
const Coordinates * getCoordinates() const
Definition: vismarkerset.h:52
Definition: draw.h:88
A cartesian coordinate in 3D space.
Definition: coord.h:72
static MarkerSet * create()
Definition: vismarkerset.h:48
RefMan< const visBase::Transformation > displaytrans_
Definition: vismarkerset.h:139
Type
Definition: draw.h:92
A set of coordinates. The coordinates will be transformed by the transformation before given to Coin...
Definition: viscoord.h:46
float pixeldensity_
Definition: vismarkerset.h:143
Definition: visannot.h:43
static float cDefaultScreenSize()
Definition: vismarkerset.h:80
AutoRotateMode
Definition: vismarkerset.h:40
Coord3 rotationvec_
Definition: vismarkerset.h:146
osg::Array * onoffarr_
Definition: vismarkerset.h:148
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
#define mCreateDataObj(clss)
Definition: visdata.h:209
Definition: vispolygonoffset.h:25
Definition: visobject.h:72
MarkerStyle3D markerstyle_
Definition: vismarkerset.h:141
MarkerSet is a set of basic pickmarker with a constant size on screen. Size and shape are settable...
Definition: vismarkerset.h:36
RefMan< Normals > normals_
Definition: vismarkerset.h:138
MarkerStyle3D & getMarkerStyle()
Definition: vismarkerset.h:69
Definition: ptrman.h:168

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