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

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