OpendTect-6_4  6.4
vishortileresolutiondata.h
Go to the documentation of this file.
1 #ifndef vishortileresolutiondata_h
2 #define vishortileresolutiondata_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: March 2009
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 // this header file only be used in the classes related to Horzonsection .
17 // don't include it in somewhere else !!!
18 
19 
20 #include "typeset.h"
21 #include "vistransform.h"
22 #include "zaxistransform.h"
23 #include "vishorizonsectiontile.h"
24 
25 #include "thread.h"
26 
27 namespace osg
28 {
29  class Geometry;
30  class Geode;
31  class UserDataContainer;
32  class Array;
33  class StateSet;
34  class DrawElementsUShort;
35 }
36 
37 namespace osgUtil { class CullVisitor; }
38 
39 namespace osgGeo { class LayeredTexture; }
40 
41 namespace visBase
42 {
43  class HorizonSectionTile;
44  class TextureChannels;
45  class Coordinates;
46 
48 {
49 public:
51  char resolution);
53 
54  void setTexture(const unsigned int unit,osg::Array* arr,
55  osg::StateSet* stateset);
56  void enableGeometryTypeDisplay(GeometryType type,bool yn);
57 
58  bool tesselateResolution(bool onlyifabsness);
59  void updatePrimitiveSets();
60  void setWireframeColor(Color& color);
61  void dirtyGeometry();
62  const osg::PrimitiveSet* getPrimitiveSet(GeometryType) const;
63  void setLineWidth(int);
64 
65 protected:
66 
67  friend class HorizonSectionTile;
68  friend class HorizonSectionTileGlue;
69 
71  osg::Switch* osgswitch_;
72  osg::UserDataContainer* geodes_;
73 
74  osg::Array* osgvertices_;
75  const osg::Array* normals_;
76  osg::Array* linecolor_;
77 
78  osg::DrawElementsUShort* trianglesps_;
79  osg::DrawElementsUShort* linesps_;
80  osg::DrawElementsUShort* pointsps_;
81  osg::DrawElementsUShort* wireframesps_;
82 
83  osg::DrawElementsUShort* trianglesosgps_;
84  osg::DrawElementsUShort* linesosgps_;
85  osg::DrawElementsUShort* pointsosgps_;
86  osg::DrawElementsUShort* wireframesosgps_;
87 
89 
96 
97 private:
98 
99  void buildOsgGeometres();
100  void setPrimitiveSet(unsigned int,
101  osg::DrawElementsUShort*);
102 
103  void tesselateCell(int row, int col);
104  void refOsgPrimitiveSets();
105  void unRefOsgPrimitiveSets();
106  void createPrimitiveSets();
107  void buildLineGeometry(int idx, int width);
108  void buildTraingleGeometry(int idx);
109  void buildPointGeometry(int idx);
110  void hideFromDisplay();
111  bool detectIsolatedLine(int crdidx,char direction);
112  void setGeometryTexture(const unsigned int unit,
113  const osg::Array* arr,
114  osg::StateSet*stateset,
115  int geometrytype);
116  void dirtyGeometry(int type);
117 };
118 
119 } // namespace visBase
120 
121 #endif
Definition: vishorizonsectiontileglue.h:37
osg::Array * linecolor_
Definition: vishortileresolutiondata.h:76
osg::DrawElementsUShort * trianglesosgps_
Definition: vishortileresolutiondata.h:83
osg::DrawElementsUShort * pointsosgps_
Definition: vishortileresolutiondata.h:85
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
char resolution_
Definition: vishortileresolutiondata.h:92
bool updateprimitiveset_
Definition: vishortileresolutiondata.h:90
GeometryType
Definition: vishorizonsectiondef.h:31
osg::Switch * osgswitch_
Definition: vishortileresolutiondata.h:71
osg::DrawElementsUShort * linesps_
Definition: vishortileresolutiondata.h:79
osg::DrawElementsUShort * wireframesosgps_
Definition: vishortileresolutiondata.h:86
osg::DrawElementsUShort * trianglesps_
Definition: vishortileresolutiondata.h:78
Definition: vishortileresolutiondata.h:37
Definition: vishorizonsectiontile.h:51
int nrverticesperside_
Definition: vishortileresolutiondata.h:93
char needsretesselation_
Definition: vishortileresolutiondata.h:91
Definition: visannot.h:43
bool needsetposition_
Definition: vishortileresolutiondata.h:94
Is a lock that allows a thread to have exlusive rights to something.
Definition: thread.h:43
osg::DrawElementsUShort * linesosgps_
Definition: vishortileresolutiondata.h:84
Open Scene Graph.
Definition: visannot.h:29
const osg::Array * normals_
Definition: vishortileresolutiondata.h:75
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
int dispgeometrytype_
Definition: vishortileresolutiondata.h:95
osg::Array * osgvertices_
Definition: vishortileresolutiondata.h:74
TrcKeyZSampling::Dir direction(TrcKeyZSampling::Dir slctype, int dimnr)
Definition: trckeyzsampling.h:139
osg::DrawElementsUShort * pointsps_
Definition: vishortileresolutiondata.h:80
Definition: vishortileresolutiondata.h:47
Definition: arraytesselator.h:21
const HorizonSectionTile * sectile_
Definition: vishortileresolutiondata.h:70
osg::DrawElementsUShort * wireframesps_
Definition: vishortileresolutiondata.h:81
osg::UserDataContainer * geodes_
Definition: vishortileresolutiondata.h:72
Threads::Mutex tesselatemutex_
Definition: vishortileresolutiondata.h:88

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