OpendTect  6.3
polyposprovider.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: Bert
8  Date: Feb 2008
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "geometrymod.h"
15 #include "posprovider.h"
16 #include "dbkey.h"
17 class TrcKeySampling;
18 template <class T> class ODPolygon;
19 
20 namespace Pos
21 {
22 
26 {
27 public:
28 
31  ~PolyProvider3D();
32  PolyProvider3D& operator =(const PolyProvider3D&);
33  const char* type() const;
34  const char* factoryKeyword() const { return type(); }
35  Provider* clone() const { return new PolyProvider3D(*this); }
36 
37  virtual bool initialize(TaskRunner* tskr=0);
38  virtual void reset() { initialize(); }
39 
40  virtual bool toNextPos();
41  virtual bool toNextZ();
42 
43  virtual BinID curBinID() const { return curbid_; }
44  virtual float curZ() const { return curz_; }
45  virtual bool includes(const BinID&,float) const;
46  virtual void usePar(const IOPar&);
47  virtual void fillPar(IOPar&) const;
48  virtual void getSummary(BufferString&) const;
49 
50  virtual void getExtent(BinID&,BinID&) const;
51  virtual void getZRange(Interval<float>&) const;
52  virtual od_int64 estNrPos() const;
53  virtual int estNrZPerPos() const { return zrg_.nrSteps()+1; }
54 
55  const DBKey& getDBKey() const { return mid_; }
56  void setDBKey(const DBKey& mid) { mid_ = mid; }
57 
58  ODPolygon<float>& polygon() { return poly_; }
59  const ODPolygon<float>& polygon() const { return poly_; }
60  StepInterval<float>& zRange() { return zrg_; }
61  const StepInterval<float>& zRange() const { return zrg_; }
62  TrcKeySampling& horSampling() { return hs_; }
63  const TrcKeySampling& horSampling() const { return hs_; }
64 
65  static ODPolygon<float>* polyFromPar(const IOPar&,int nr=0);
66 
67  virtual bool includes( const Coord& c, float z ) const
68  { return Provider3D::includes(c,z); }
69 
70 protected:
71 
76 
78  float curz_;
79 
80 public:
81 
82  static void initClass();
83  static Provider3D* create() { return new PolyProvider3D; }
84 
85 };
86 
87 
88 } // namespace
#define mExpClass(module)
Definition: commondefs.h:157
virtual bool includes(const Coord &c, float z) const
Definition: polyposprovider.h:67
Provides a series of positions; can also be used for subselection.
Definition: posprovider.h:31
const StepInterval< float > & zRange() const
Definition: polyposprovider.h:61
ODPolygon< float > & poly_
Definition: polyposprovider.h:72
ODPolygon< float > & polygon()
Definition: polyposprovider.h:58
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:200
#define od_int64
Definition: plftypes.h:34
void setDBKey(const DBKey &mid)
Definition: polyposprovider.h:56
(Closed) sequence of connected 2-D coordinates.
Definition: polygon.h:25
Provides a subselection for 3D surveys.
Definition: posprovider.h:58
virtual bool includes(const BinID &, float z=mUdf(float)) const =0
const ODPolygon< float > & polygon() const
Definition: polyposprovider.h:59
TrcKeySampling & hs_
Definition: polyposprovider.h:74
virtual BinID curBinID() const
Definition: polyposprovider.h:43
static Provider3D * create()
Definition: polyposprovider.h:83
DBKey mid_
Definition: polyposprovider.h:75
StepInterval< float > zrg_
Definition: polyposprovider.h:73
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
Volume/Area provider based on Polygon.
Definition: polyposprovider.h:25
Class that can execute a task.
Definition: task.h:193
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:25
TrcKeySampling & horSampling()
Definition: polyposprovider.h:62
BinID curbid_
Definition: polyposprovider.h:77
const TrcKeySampling & horSampling() const
Definition: polyposprovider.h:63
Position.
Definition: commontypes.h:38
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
StepInterval< float > & zRange()
Definition: polyposprovider.h:60
virtual int estNrZPerPos() const
Definition: polyposprovider.h:53
const char * factoryKeyword() const
Definition: polyposprovider.h:34
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:28
Full key to any object in the OpendTect data store.
Definition: dbkey.h:36
virtual float curZ() const
Definition: polyposprovider.h:44
float curz_
Definition: polyposprovider.h:78
virtual void reset()
Definition: polyposprovider.h:38
2D point or vector class.
Definition: commontypes.h:58
Definition: arraytesselator.h:19
Provider * clone() const
Definition: polyposprovider.h:35
const DBKey & getDBKey() const
Definition: polyposprovider.h:55
static void initClass()

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