OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 #include "visbasemod.h"
16 #include "visobject.h"
17 #include "trigonometry.h"
18 #include "draw.h"
19 #include "viscoord.h"
20 #include "visnormals.h"
21 
22 namespace osgGeo { class MarkerSet; }
23 
24 namespace visBase
25 {
26  class PolygonOffset;
27 
36 {
37 public:
38 
40  {
44  ROTATE_TO_AXIS
45  };
46 
47  static MarkerSet* create()
49 
50  Coordinates* getCoordinates() { return coords_; }
51  const Coordinates* getCoordinates() const { return coords_; }
53 
56 
57  void setMarkersSingleColor(const Color& singlecolor);
61  bool usesSingleColor() const;
62  void getColorArray(TypeSet<Color>& colors) const;
63 
68  MarkerStyle3D& getMarkerStyle() { return markerstyle_; }
69  const MarkerStyle3D& getMarkerStyle() const { return markerstyle_; }
73 
74  void setScreenSize(float);
78  float getScreenSize() const;
79  static float cDefaultScreenSize() { return 5; }
80 
81  void setMarkerHeightRatio(float);
82  float getMarkerHeightRatio() const;
83 
84  void setMinimumScale(float);
85  float getMinimumScale() const;
86 
87  void setMaximumScale(float);
88  float getMaximumScale() const;
89 
91 
92  void setRotationForAllMarkers(const Coord3&, const float);
95 
96 
97  void doFaceCamera(bool yn);
100  bool facesCamera() const;
101 
104 
105  void setPixelDensity(float);
106  float getPixelDensity() const { return pixeldensity_; }
107 
108  void removeMarker(int idx);
109 
110  void clearMarkers();
112  void turnMarkerOn(unsigned int idx,bool);
113  void turnAllMarkersOn(bool);
114  bool markerOn(unsigned int);
115 
116  int findClosestMarker(const Coord3&, bool scenespace=false);
117  int findMarker(const Coord3&, const Coord3& eps,
118  bool scenespace = false);
119 
120  void setMarkerResolution(float res);
124  int size() const;
125  int addPos(const Coord3&, bool draw = true);
126  void setPos(int, const Coord3&,bool draw = true);
127  void insertPos(int, const Coord3&,bool draw = true);
128  void forceRedraw(bool);
131 
132 protected:
135 
139  osgGeo::MarkerSet* markerset_;
141 
143 
147  osg::Array* onoffarr_;
148 };
149 
150 } // namespace visBase
151 
visBase::MarkerSet::setRotationForAllMarkers
void setRotationForAllMarkers(const Coord3 &, const float)
visBase::MarkerSet::addPolygonOffsetNodeState
void addPolygonOffsetNodeState()
ConstRefMan< mVisTrans >
visBase::MarkerSet::materialChangeCB
void materialChangeCB(CallBacker *)
Coord3
A cartesian coordinate in 3D space.
Definition: coord.h:72
visBase::MarkerSet::~MarkerSet
~MarkerSet()
visBase::MarkerSet::getDisplayTransformation
const visBase::Transformation * getDisplayTransformation() const
visBase::MarkerSet::setPixelDensity
void setPixelDensity(float)
visBase::MarkerSet::getMarkersSingleColor
Color getMarkersSingleColor() const
visnormals.h
visBase::MarkerSet::addPos
int addPos(const Coord3 &, bool draw=true)
MarkerStyle3D
Definition: draw.h:88
visBase::MarkerSet::getMarkerStyle
const MarkerStyle3D & getMarkerStyle() const
Definition: vismarkerset.h:69
visBase::MarkerSet::ROTATE_TO_CAMERA
@ ROTATE_TO_CAMERA
Definition: vismarkerset.h:43
visBase::MarkerSet::getType
MarkerStyle3D::Type getType() const
visBase
Definition: visannot.h:43
visBase::MarkerSet::findMarker
int findMarker(const Coord3 &, const Coord3 &eps, bool scenespace=false)
visBase::MarkerSet::displaytrans_
ConstRefMan< visBase::Transformation > displaytrans_
Definition: vismarkerset.h:138
visBase::MarkerSet::setType
void setType(MarkerStyle3D::Type)
visBase::MarkerSet::removeMarker
void removeMarker(int idx)
visBase::MarkerSet::markerOn
bool markerOn(unsigned int)
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
viscoord.h
visBase::MarkerSet::usesSingleColor
bool usesSingleColor() const
visBase::MarkerSet::normals_
RefMan< Normals > normals_
Definition: vismarkerset.h:137
visBase::MarkerSet::facesCamera
bool facesCamera() const
visBase::MarkerSet::offset_
PolygonOffset * offset_
Definition: vismarkerset.h:146
visBase::MarkerSet::ROTATE_TO_SCREEN
@ ROTATE_TO_SCREEN
Definition: vismarkerset.h:42
visBase::MarkerSet
MarkerSet is a set of basic pickmarker with a constant size on screen. Size and shape are settable.
Definition: vismarkerset.h:36
visBase::MarkerSet::insertPos
void insertPos(int, const Coord3 &, bool draw=true)
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
visBase::MarkerSet::rotationangle_
float rotationangle_
Definition: vismarkerset.h:144
visBase::MarkerSet::setMarkerResolution
void setMarkerResolution(float res)
visBase::MarkerSet::getPixelDensity
float getPixelDensity() const
Definition: vismarkerset.h:106
visobject.h
visBase::MarkerSet::setScreenSize
void setScreenSize(float)
visBase::MarkerSet::getNormals
Normals * getNormals()
visBase::MarkerSet::onoffarr_
osg::Array * onoffarr_
Definition: vismarkerset.h:147
visBase::MarkerSet::markerstyle_
MarkerStyle3D markerstyle_
Definition: vismarkerset.h:140
visBase::MarkerSet::setPos
void setPos(int, const Coord3 &, bool draw=true)
visBase::MarkerSet::NO_ROTATION
@ NO_ROTATION
Definition: vismarkerset.h:41
visBase::MarkerSet::create
static MarkerSet * create()
Definition: vismarkerset.h:47
visBase::MarkerSet::getScreenSize
float getScreenSize() const
visBase::MarkerSet::cDefaultScreenSize
static float cDefaultScreenSize()
Definition: vismarkerset.h:79
visBase::MarkerSet::setMarkersSingleColor
void setMarkersSingleColor(const Color &singlecolor)
visBase::MarkerSet::rotationvec_
Coord3 rotationvec_
Definition: vismarkerset.h:145
visBase::MarkerSet::setMinimumScale
void setMinimumScale(float)
visBase::MarkerSet::coords_
RefMan< Coordinates > coords_
Definition: vismarkerset.h:136
visBase::MarkerSet::getMarkerStyle
MarkerStyle3D & getMarkerStyle()
Definition: vismarkerset.h:68
visBase::MarkerSet::turnMarkerOn
void turnMarkerOn(unsigned int idx, bool)
visBase::MarkerSet::setMaximumScale
void setMaximumScale(float)
visBase::MarkerSet::setMaterial
void setMaterial(visBase::Material *)
If material is null, markers will be single color.
visBase::MarkerSet::forceRedraw
void forceRedraw(bool)
visBase::MarkerSet::setMarkerHeightRatio
void setMarkerHeightRatio(float)
visBase::MarkerSet::clearMarkers
void clearMarkers()
Removes all markers.
visBase::MarkerSet::setMarkerStyle
void setMarkerStyle(const MarkerStyle3D &)
visBase::MarkerSet::setDisplayTransformation
void setDisplayTransformation(const visBase::Transformation *)
visBase::Material
Definition: vismaterial.h:37
visBase::MarkerSet::applyRotationToAllMarkers
void applyRotationToAllMarkers(bool)
visBase::MarkerSet::getMaximumScale
float getMaximumScale() const
visBase::MarkerSet::pixeldensity_
float pixeldensity_
Definition: vismarkerset.h:142
draw.h
visBase::MarkerSet::getMinimumScale
float getMinimumScale() const
mVisTrans
#define mVisTrans
Definition: visdata.h:28
visBase::MarkerSet::getCoordinates
const Coordinates * getCoordinates() const
Definition: vismarkerset.h:51
Quaternion
Quaternion is an extension to complex numbers.
Definition: trigonometry.h:328
visBase::VisualObjectImpl
Definition: visobject.h:72
visBase::PolygonOffset
Definition: vispolygonoffset.h:25
visBase::MarkerSet::removePolygonOffsetNodeState
void removePolygonOffsetNodeState()
visBase::MarkerSet::turnAllMarkersOn
void turnAllMarkersOn(bool)
trigonometry.h
MarkerStyle3D::Type
Type
Definition: draw.h:91
osgGeo
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
mCreateDataObj
#define mCreateDataObj(clss)
Definition: visdata.h:214
visBase::MarkerSet::setAutoRotateMode
void setAutoRotateMode(AutoRotateMode)
visBase::MarkerSet::size
int size() const
visBase::MarkerSet::setSingleMarkerRotation
void setSingleMarkerRotation(const Quaternion &, int)
visBase::MarkerSet::markerset_
osgGeo::MarkerSet * markerset_
Definition: vismarkerset.h:139
visBase::MarkerSet::getColorArray
void getColorArray(TypeSet< Color > &colors) const
visBase::Coordinates
A set of coordinates. The coordinates will be transformed by the transformation before given to Coin,...
Definition: viscoord.h:45
visBase::MarkerSet::AutoRotateMode
AutoRotateMode
Definition: vismarkerset.h:40
visBase::MarkerSet::getMarkerHeightRatio
float getMarkerHeightRatio() const
Color
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer,...
Definition: color.h:26
visBase::MarkerSet::findClosestMarker
int findClosestMarker(const Coord3 &, bool scenespace=false)
visBase::MarkerSet::doFaceCamera
void doFaceCamera(bool yn)
visBase::Normals
Definition: visnormals.h:32
TypeSet< Color >
RefMan
Definition: ptrman.h:206

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