OpendTect-6_4  6.4
polyposprovider.h
Go to the documentation of this file.
1 #ifndef polyposprovider_h
2 #define polyposprovider_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Feb 2008
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "geometrymod.h"
17 #include "posprovider.h"
18 #include "multiid.h"
19 class TrcKeySampling;
20 template <class T> class ODPolygon;
21 
22 namespace Pos
23 {
24 
28 {
29 public:
30 
33  ~PolyProvider3D();
34  PolyProvider3D& operator =(const PolyProvider3D&);
35  const char* type() const;
36  const char* factoryKeyword() const { return type(); }
37  Provider* clone() const { return new PolyProvider3D(*this); }
38 
39  virtual bool initialize(TaskRunner* tr=0);
40  virtual void reset() { initialize(); }
41 
42  virtual bool toNextPos();
43  virtual bool toNextZ();
44 
45  virtual BinID curBinID() const { return curbid_; }
46  virtual float curZ() const { return curz_; }
47  virtual bool includes(const BinID&,float) const;
48  virtual void usePar(const IOPar&);
49  virtual void fillPar(IOPar&) const;
50  virtual void getSummary(BufferString&) const;
51 
52  virtual void getExtent(BinID&,BinID&) const;
53  virtual void getZRange(Interval<float>&) const;
54  virtual od_int64 estNrPos() const;
55  virtual int estNrZPerPos() const { return zrg_.nrSteps()+1; }
56 
57  const MultiID& getMultiID() const { return mid_; }
58  void setMultiID(const MultiID& mid) { mid_ = mid; }
59 
60  ODPolygon<float>& polygon() { return poly_; }
61  const ODPolygon<float>& polygon() const { return poly_; }
62  StepInterval<float>& zRange() { return zrg_; }
63  const StepInterval<float>& zRange() const { return zrg_; }
64  TrcKeySampling& horSampling() { return hs_; }
65  const TrcKeySampling& horSampling() const { return hs_; }
66 
67  static ODPolygon<float>* polyFromPar(const IOPar&,int nr=0);
68 
69  virtual bool includes( const Coord& c, float z ) const
70  { return Provider3D::includes(c,z); }
71 
72  void setUseAreaInside(bool);
73  bool usesAreaInside() const;
74 
75  static const char* sInside() { return "Inside"; }
76  static const char* sBoundingBox() { return "Bounding Box"; }
77 
78 protected:
79 
84 
86  float curz_;
87 
88 public:
89 
90  static void initClass();
91  static Provider3D* create() { return new PolyProvider3D; }
92 
93 };
94 
95 
96 } // namespace
97 
98 #endif
#define mExpClass(module)
Definition: commondefs.h:160
virtual bool includes(const Coord &c, float z) const
Definition: polyposprovider.h:69
Provides a series of positions; can also be used for subselection.
Definition: posprovider.h:33
const StepInterval< float > & zRange() const
Definition: polyposprovider.h:63
ODPolygon< float > & poly_
Definition: polyposprovider.h:80
ODPolygon< float > & polygon()
Definition: polyposprovider.h:60
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
#define od_int64
Definition: plftypes.h:36
(Closed) sequence of connected 2-D coordinates.
Definition: polygon.h:27
const MultiID & getMultiID() const
Definition: polyposprovider.h:57
Provides a subselection for 3D surveys.
Definition: posprovider.h:60
virtual bool includes(const BinID &, float z=mUdf(float)) const =0
static const char * sInside()
Definition: polyposprovider.h:75
static const char * sBoundingBox()
Definition: polyposprovider.h:76
A cartesian coordinate in 2D space.
Definition: coord.h:25
const ODPolygon< float > & polygon() const
Definition: polyposprovider.h:61
TrcKeySampling & hs_
Definition: polyposprovider.h:82
virtual BinID curBinID() const
Definition: polyposprovider.h:45
static Provider3D * create()
Definition: polyposprovider.h:91
StepInterval< float > zrg_
Definition: polyposprovider.h:81
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Volume/Area provider based on Polygon.
Definition: polyposprovider.h:27
Class that can execute a task.
Definition: task.h:169
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:27
TrcKeySampling & horSampling()
Definition: polyposprovider.h:64
BinID curbid_
Definition: polyposprovider.h:85
const TrcKeySampling & horSampling() const
Definition: polyposprovider.h:65
Position.
Definition: commontypes.h:42
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
StepInterval< float > & zRange()
Definition: polyposprovider.h:62
virtual int estNrZPerPos() const
Definition: polyposprovider.h:55
const char * factoryKeyword() const
Definition: polyposprovider.h:36
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
void setMultiID(const MultiID &mid)
Definition: polyposprovider.h:58
virtual float curZ() const
Definition: polyposprovider.h:46
float curz_
Definition: polyposprovider.h:86
virtual void reset()
Definition: polyposprovider.h:40
MultiID mid_
Definition: polyposprovider.h:83
Definition: arraytesselator.h:21
Provider * clone() const
Definition: polyposprovider.h:37
Compound key consisting of ints.
Definition: multiid.h:25
static void initClass()

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