OpendTect-6_4  6.4
vishorthreadworks.h
Go to the documentation of this file.
1 #ifndef vishorthreadworks_h
2 #define vishorthreadworks_h
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  RCS: $Id$
10 ________________________________________________________________________
11 -*/
12 // this header file only be used in the classes related to Horzonsection .
13 // don't include it in somewhere else !!!
14 
15 #include "visbasemod.h"
16 #include "vishorizonsectiondef.h"
17 #include "threadwork.h"
18 #include "paralleltask.h"
19 #include "rowcol.h"
20 #include "thread.h"
21 #include "ranges.h"
22 
23 namespace osg { class CullStack; }
24 namespace Geometry { class BinIDSurface; }
25 
26 class BinIDSurface;
27 class ZAxisTransform;
28 
29 
30 namespace visBase
31 {
32  class HorizonSection;
33  class HorizonSectionTile;
46 public:
47  HorizonTileResolutionTesselator(const HorizonSection* hrsection,char res);
49  od_int64 nrIterations() const { return nrtiles_; }
51  { return tr("Tessellating horizon"); }
53  { return tr("Parts completed"); }
54 
55  bool doPrepare(int);
56  bool doWork(od_int64,od_int64,int);
57 
58  bool getTitleCoordinates(int,TypeSet<Coord3>&) const;
59  bool getTitleNormals(int,TypeSet<Coord3>&) const;
60  bool getTitlePrimitiveSet(int,TypeSet<int>&,
61  GeometryType) const;
62 
63 private:
64  bool createTiles();
67  int nrtiles_;
70 };
71 
74 public:
76  const osg::CullStack* cs, char res );
77 
79  { delete [] permutation_; }
80 
81  od_int64 nrIterations() const { return nrtiles_; }
82  od_int64 totalNr() const { return nrtiles_ * 2; }
83  uiString uiMessage() const { return tr("Updating Horizon Display"); }
84  uiString uiNrDoneText() const { return tr("Parts completed"); }
85 
86  bool doPrepare( int );
87  bool doWork( od_int64, od_int64, int );
88 
92  int nrtiles_;
98  const osg::CullStack* tkzs_;
99 };
100 
101 
103 {
104 public:
105  TileTesselator( HorizonSectionTile* tile, char res );
106 
107  int nextStep();
109  char res_;
110  bool doglue_;
111 };
112 
113 
116 public:
119 
121 
122  od_int64 nrIterations() const;
123  uiString uiMessage() const { return tr("Creating Horizon Display"); }
124  uiString uiNrDoneText() const { return tr("Parts completed"); }
125  void setTesselationResolution(char res);
126 
127 
128 protected:
129 
130  bool doWork(od_int64, od_int64, int);
131  bool doFinish(bool);
132 
133  bool doOldWork(od_int64, od_int64, int);
134  bool doNewWork(od_int64, od_int64, int);
146 };
147 
148 
150 {
151 public:
153 
154  int nextStep();
156 };
157 
158 
159 }
160 
161 #endif
od_int64 nrIterations() const
Definition: vishorthreadworks.h:49
#define mExpClass(module)
Definition: commondefs.h:160
int nrthreads_
Definition: vishorthreadworks.h:69
int nrthreadsfinishedwithres_
Definition: vishorthreadworks.h:96
char resolution_
Definition: vishorthreadworks.h:136
Definition: vishorizonsection.h:51
ObjectSet< HorizonSectionTile > hrtiles_
Definition: vishorthreadworks.h:65
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: vishorthreadworks.h:84
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
char resolution_
Definition: vishorthreadworks.h:94
HorizonSectionTile * tile_
Definition: vishorthreadworks.h:108
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: vishorthreadworks.h:124
ObjectSet< HorizonSectionTile > hrtiles_
Definition: vishorthreadworks.h:137
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
#define od_int64
Definition: plftypes.h:36
od_int64 totalNr() const
Definition: vishorthreadworks.h:82
Definition: uistring.h:89
GeometryType
Definition: vishorizonsectiondef.h:31
Threads::Barrier barrier_
Definition: vishorthreadworks.h:97
HorizonSectionTile ** hrsectiontiles_
Definition: vishorthreadworks.h:90
HorizonSectionTile * tile_
Definition: vishorthreadworks.h:155
Generalization of a task that can be run in parallel.
Definition: paralleltask.h:66
od_int64 nrIterations() const
Definition: vishorthreadworks.h:81
HorizonSection & hrsection_
Definition: vishorthreadworks.h:91
Set of pointers to objects.
Definition: commontypes.h:32
int nrcrdspertileside_
Definition: vishorthreadworks.h:135
char res_
Definition: vishorthreadworks.h:109
ZAxisTransform * zaxistransform_
Definition: vishorthreadworks.h:141
The generalization of something (e.g. a computation) where the steps must be done in sequence...
Definition: task.h:124
const osg::CullStack * tkzs_
Definition: vishorthreadworks.h:98
Definition: vishorthreadworks.h:149
Threads::Lock lock_
Definition: vishorthreadworks.h:143
uiString uiMessage() const
will be message() again in 7.x
Definition: vishorthreadworks.h:50
int nrcoltiles_
Definition: vishorthreadworks.h:93
~HorizonTileRenderPreparer()
Definition: vishorthreadworks.h:78
StepInterval< int > rrg_
Definition: vishorthreadworks.h:140
uiString uiMessage() const
will be message() again in 7.x
Definition: vishorthreadworks.h:123
int nrtiles_
Definition: vishorthreadworks.h:92
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: vishorthreadworks.h:52
int nrtiles_
Definition: vishorthreadworks.h:67
Definition: vishorizonsectiontile.h:51
Waits for a number of threads to reach a certain point (i.e. the call to Barrier::waitForAll). Once everyone has arrived, everyone is released.
Definition: thread.h:240
const HorizonSection * horsection_
Definition: vishorthreadworks.h:66
const Geometry::BinIDSurface * geo_
Definition: vishorthreadworks.h:139
Definition: visannot.h:43
bool doglue_
Definition: vishorthreadworks.h:110
od_int64 * permutation_
Definition: vishorthreadworks.h:89
uiString uiMessage() const
will be message() again in 7.x
Definition: vishorthreadworks.h:83
Definition: binidsurface.h:27
HorizonTileResolutionTesselator class is an independent usage for tesselating coordinates, normals and primitive set of horizon tiles. it is specifically for exporting horizon to Pdf3D in which the exported horizon has no relation with the existing displayed horizon in coordinates, normals and primitive set. thus we can export horizon into different resolution without influence current displayed horizon in the secne. note: the class doesn&#39;t do anything with texture.
Definition: vishorthreadworks.h:44
int nrthreads_
Definition: vishorthreadworks.h:95
HorizonSection * horsection_
Definition: vishorthreadworks.h:142
Open Scene Graph.
Definition: visannot.h:29
char resolution_
Definition: vishorthreadworks.h:68
TypeSet< RowCol > & hortiles_
Definition: vishorthreadworks.h:144
Definition: vishorthreadworks.h:102
Definition: vishorthreadworks.h:72
Base class for z-axis transforms.
Definition: zaxistransform.h:37
Definition: vishorthreadworks.h:114
Definition: arraytesselator.h:21
TypeSet< RowCol > & indexes_
Definition: vishorthreadworks.h:145

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