OpendTect-6_4  6.4
visannot.h
Go to the documentation of this file.
1 #ifndef visannot_h
2 #define visannot_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kris Tingdahl
9  Date: Jan 2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "visbasemod.h"
17 #include "visosg.h"
18 #include "visobject.h"
19 #include "color.h"
20 #include "trckeyzsampling.h"
21 #include "position.h"
22 #include "sets.h"
23 
24 class AxisInfo;
25 class FontData;
26 class Color;
27 class uiString;
28 
29 namespace osg
30 {
31  class Geode;
32  class Array;
33  class Group;
34  class Geometry;
35  class Vec3f;
36 }
37 
38 namespace osgGeo
39 {
40  class OneSideRender;
41 }
42 
43 namespace visBase
44 {
45 class Text2;
46 class DataObjectGroup;
47 
54 {
55 public:
56  static Annotation* create()
58 
59  void showText(bool yn);
60  bool isTextShown() const;
61 
62  void showScale(bool yn);
63  bool isScaleShown() const;
64 
65  bool canShowGridLines() const;
66  void showGridLines(bool yn);
67  bool isGridLinesShown() const;
68 
69  const FontData& getFont() const;
70  void setFont(const FontData&);
71 
72  void setTrcKeyZSampling(const TrcKeyZSampling&);
73  const TrcKeyZSampling& getTrcKeyZSampling() const;
74  void setScale(const TrcKeyZSampling&);
75  /*<! TrcKeyZSampling(false) as input takes default
76  axis scale of survey box instead */
77  const TrcKeyZSampling& getScale() const;
78 
79  void setScaleFactor(int dim,int scale);
80 
81  void setText(int dim,const uiString&);
82  void fillPar(IOPar&) const;
83  bool usePar(const IOPar&);
84 
85  void setDisplayTransformation(const mVisTrans*);
86  const mVisTrans* getDisplayTransformation() const
87  { return displaytrans_; }
88  virtual void setPixelDensity(float);
89  const Text2* getAnnotTexts() const { return axisannot_; }
90 
91 
92  void setScene(Scene*);
93  void allowShading(bool yn) { allowshading_=yn; }
94 private:
95  ~Annotation();
96  void firstTraversal(CallBacker*);
97  void initGridLines();
98  void updateGridLines();
99  void updateTextPos();
100  void updateTextColor(CallBacker*);
101  void getAxisCoords(int,osg::Vec3f&,osg::Vec3f&) const;
102  void setCorner( int, float, float, float );
103 
104  int scalefactor_[3];
105 
110  osg::Array* gridlinecoords_;
111  osg::Geode* geode_;
112  osgGeo::OneSideRender* gridlines_;
116 
118 
121 
122  static const char* textprefixstr();
123  static const char* cornerprefixstr();
124  static const char* showtextstr();
125  static const char* showscalestr();
126 };
127 
128 } // namespace visBase
129 
130 #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
osg::Geometry * box_
Definition: visannot.h:109
Definition: visdatagroup.h:27
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
void allowShading(bool yn)
Definition: visannot.h:93
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
Definition: uistring.h:89
Data needed to make an actual font.
Definition: fontdata.h:20
static Annotation * create()
Definition: visannot.h:56
osg::Geode * geode_
Definition: visannot.h:111
const Text2 * getAnnotTexts() const
Definition: visannot.h:89
const visBase::Transformation * displaytrans_
Definition: visannot.h:117
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
RefMan< Text2 > axisnames_
Definition: visannot.h:113
#define mVisTrans
Definition: visdata.h:31
Definition: vistext.h:93
RefMan< Text2 > axisannot_
Definition: visannot.h:114
TrcKeyZSampling tkzsdefaultscale_
Definition: visannot.h:107
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
visBase::Scene * scene_
Definition: visannot.h:115
bool allowshading_
Definition: visannot.h:120
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
TrcKeyZSampling tkzs_
Definition: visannot.h:106
Definition: visannot.h:43
Scene manages all DataObjects and has some managing functions such as the selection management and va...
Definition: visscene.h:40
virtual void setFont(const QFont &)
override Qt
Definition: i_uiobjqtbody.h:32
Open Scene Graph.
Definition: visannot.h:29
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
Annotation is a simple wireframe box with text on its axis.
Definition: visannot.h:53
osgGeo::OneSideRender * gridlines_
Definition: visannot.h:112
TrcKeyZSampling scale_
Definition: visannot.h:108
#define mCreateDataObj(clss)
Definition: visdata.h:209
Definition: visobject.h:72
Color annotcolor_
Definition: visannot.h:119
Definition: arraytesselator.h:21
Definition: ptrman.h:168
FixedString Geometry()
Definition: keystrs.h:69
osg::Array * gridlinecoords_
Definition: visannot.h:110

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