OpendTect  6.3
empolygonbody.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: Yuancheng Liu
8  Date: July 2008
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 
15 #include "earthmodelmod.h"
16 #include "embody.h"
17 #include "emsurface.h"
18 #include "emsurfacegeometry.h"
19 #include "polygonsurface.h"
20 #include "tableascio.h"
21 
22 namespace Table { class FormatDesc; }
23 template <class T> class SortedList;
24 
25 namespace EM
26 {
27 class PolygonBody;
28 
35 public:
38 
39  int nrPolygons(const SectionID&) const;
40  int nrKnots(const SectionID&,int polygonnr) const;
41  bool insertPolygon(const SectionID&,int polygonnr,
42  int firstknot,const Coord3& pos,
43  const Coord3& editnormal,
44  bool addtohistory);
45  bool removePolygon(const SectionID&,int polygonnr,
46  bool addtohistory);
47  bool insertKnot(const SectionID&,const SubID&,
48  const Coord3& pos,bool addtohistory);
49  bool removeKnot(const SectionID&,const SubID&,
50  bool addtohistory);
51  Coord3 getPolygonNormal(const SectionID&,int polygon) const;
52 
54  sectionGeometry(const SectionID&);
56  sectionGeometry(const SectionID&) const;
57 
58  EMObjectIterator* createIterator(const SectionID&,
59  const TrcKeyZSampling* =0) const;
60 
61  Executor* loader(const SurfaceIODataSelection* s=0);
62  Executor* saver(const SurfaceIODataSelection* s=0,
63  const DBKey* key=0);
64 
65  void fillPar(IOPar&) const;
66  bool usePar(const IOPar&);
67 
68 protected:
69  Geometry::PolygonSurface* createSectionGeometry() const;
70 };
71 
72 
77 mExpClass(EarthModel) PolygonBody : public Surface, public Body
80 public:
81  PolygonBodyGeometry& geometry();
82  const PolygonBodyGeometry& geometry() const;
83 
84  const char* type() const { return typeStr(); }
85  virtual Executor* loader();
86  virtual Executor* saver();
87  virtual Executor* saver(IOObj*);
88 
89  ImplicitBody* createImplicitBody(TaskRunner*,bool) const;
90  bool getBodyRange(TrcKeyZSampling&);
91 
92  DBKey storageID() const;
93  BufferString storageName() const;
94 
95  void refBody();
96  void unRefBody();
97 
98  bool useBodyPar(const IOPar&);
99  void fillBodyPar(IOPar&) const;
100 
102  { return tr("Polygon Body"); }
103 
104 protected:
105  const IOObjContext& getIOObjContext() const;
106 
107 
108  friend class EMManager;
109  friend class EMObject;
111 };
112 
113 } // namespace EM
od_int16 SectionID
Definition: emposid.h:23
#define mExpClass(module)
Definition: commondefs.h:157
Definition: ioobj.h:57
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:200
Definition: uistring.h:88
const char * type() const
Definition: empolygonbody.h:84
od_int64 SubID
Definition: emposid.h:24
PolygonBodyGeometry geometry_
Definition: empolygonbody.h:110
Iterator that iterates a number of positions (normally all) on an EMObject. The object is created by ...
Definition: emobject.h:81
#define mDefineEMObjFuncs(clss)
Definition: emobject.h:344
3D point or vector
Definition: commontypes.h:57
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
Definition: geom2dascio.h:18
uiString getUserTypeStr() const
Definition: empolygonbody.h:101
Class that can execute a task.
Definition: task.h:193
A Surface polygon Body.
Definition: empolygonbody.h:77
Manages the loaded/half loaded EM objects in OpendTect.
Definition: emmanager.h:42
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:32
Surface geometry.
Definition: emsurfacegeometry.h:39
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
A body that can deliver an implicit body.
Definition: embody.h:48
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
Base class for all EarthModel objects.
Definition: emobject.h:117
A SortedList is a list where all objects are stored in ascending order. The objects should be capable...
Definition: sortedlist.h:27
Base class for surfaces like horizons and faults. A surface is made up of one or more segments or pat...
Definition: emsurface.h:31
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:23
Implicit representation of a body.
Definition: embody.h:30
Full key to any object in the OpendTect data store.
Definition: dbkey.h:36
Definition: polygonsurface.h:24
Surface I/O data selection.
Definition: emsurfaceiodata.h:60
IOObjContext * getIOObjContext(Seis::GeomType, bool forread)
PolygonBody SurfaceGeometry.
Definition: empolygonbody.h:33
Specification to enable chunkwise execution of a process.
Definition: executor.h:38
Holds the context for selecting and/or creating IOObjs.
Definition: ioobjctxt.h:59

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