OpendTect  6.6
arraytesselator.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
6 Author: Yuancheng Liu
7 Date: April 2011
8 RCS: $Id$
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "geometrymod.h"
14 #include "arraynd.h"
15 #include "ranges.h"
16 
17 
18 template <class T> class Array2D;
19 
20 namespace Geometry
21 {
22 
28 public:
29  ArrayTesselator(const float* data,
30  int datarowsize,int datacolsize,
31  const StepInterval<int>& rrg,
32  const StepInterval<int>& crg);
33 
35  const StepInterval<int>& rrg,
36  const StepInterval<int>& crg);
37 
39  { return (rowrange_.nrSteps()+1) *
40  (colrange_.nrSteps()+1); }
41 
42  virtual int getCoordIndex(int row,int col) { return 0; }
43  const char* message() const { return "Tesselating geometry"; }
44 
45  /*<s= 0 for points, 1 for lines, 2 for triangles.*/
46  const TypeSet<int>& arrayIndexes(char s=2) const;
47 
49 
50 protected:
51 
52  bool doWork(od_int64 start,od_int64 stop,int);
53 
54  int maxNrThreads() const { return 1; }
55 
56  const float* data_;
61 
65 
66 
67 public:
68  /*<s= 0 for points, 1 for lines, 2 for triangles.*/
69  mDeprecated("Use arrayIndexes")
70  TypeSet<int> getIndices(char s=2) const
71  { return s==2 ? stripcis_ : (s ? linecis_ : pointcis_);}
72 };
73 
74 } // namespace Geometry
Geometry::ArrayTesselator::getCoordIndex
virtual int getCoordIndex(int row, int col)
Definition: arraytesselator.h:42
Geometry::ArrayTesselator::datacolsize_
int datacolsize_
Definition: arraytesselator.h:58
Geometry
Definition: arraytesselator.h:21
od_int64
#define od_int64
Definition: plftypes.h:35
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Geometry::ArrayTesselator::nrIterations
od_int64 nrIterations() const
Definition: arraytesselator.h:38
Geometry::ArrayTesselator::ArrayTesselator
mODTextTranslationClass(ArrayTesselator) public ArrayTesselator(const Array2D< float > &data, const StepInterval< int > &rrg, const StepInterval< int > &crg)
Geometry::ArrayTesselator::uiNrDoneText
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Geometry::ArrayTesselator::pointcis_
TypeSet< int > pointcis_
Definition: arraytesselator.h:62
mODTextTranslationClass
#define mODTextTranslationClass(clss)
Definition: uistring.h:40
arraynd.h
StepInterval< int >
mDeprecated
#define mDeprecated(msg)
Definition: plfdefs.h:215
Geometry::ArrayTesselator::arrayIndexes
const TypeSet< int > & arrayIndexes(char s=2) const
Geometry::ArrayTesselator::linecis_
TypeSet< int > linecis_
Definition: arraytesselator.h:63
Geometry::ArrayTesselator::maxNrThreads
int maxNrThreads() const
Definition: arraytesselator.h:54
Geometry::ArrayTesselator::message
const char * message() const
Definition: arraytesselator.h:43
ParallelTask
Generalization of a task that can be run in parallel.
Definition: paralleltask.h:66
Geometry::ArrayTesselator
Definition: arraytesselator.h:27
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
Geometry::ArrayTesselator::data_
const float * data_
Definition: arraytesselator.h:56
Geometry::ArrayTesselator::datarowsize_
int datarowsize_
Definition: arraytesselator.h:57
Geometry::ArrayTesselator::doWork
bool doWork(od_int64 start, od_int64 stop, int)
Geometry::ArrayTesselator::rowrange_
const StepInterval< int > & rowrange_
Definition: arraytesselator.h:59
ranges.h
Array2D
Array2D ( Subclass of ArrayND ) is a two dimensional array.
Definition: arraynd.h:140
TypeSet< int >
Geometry::ArrayTesselator::stripcis_
TypeSet< int > stripcis_
Definition: arraytesselator.h:64
Geometry::ArrayTesselator::colrange_
const StepInterval< int > & colrange_
Definition: arraytesselator.h:60

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