OpendTect  6.3
emfault3dpainter.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  CopyRight: (C) dGB Beheer B.V.
7  Author: Umesh Sinha
8  Date: Feb 2010
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "earthmodelmod.h"
14 #include "callback.h"
15 #include "trckeyzsampling.h"
16 #include "draw.h"
17 #include "emposid.h"
18 #include "flatview.h"
19 
20 namespace FlatView { class Viewer; }
21 namespace Geometry { class FaultStickSurface; class ExplPlaneIntersection;
22  class PrimitiveSet;}
23 
24 class FlatPosData;
25 
26 namespace EM
27 {
28 
29 class Fault3D;
30 
35 mExpClass(EarthModel) Fault3DPainter : public CallBacker
36 {
37 public:
39  ~Fault3DPainter();
40 
41  void setTrcKeyZSampling(const TrcKeyZSampling&,bool);
42  const TrcKeyZSampling& getTrcKeyZSampling() const { return tkzs_; }
43 
44  void setPath(const TrcKeyPath&);
45  void setRandomLineID(int rdlid) { rdlid_ = rdlid; }
46  void setFlatPosData(const FlatPosData*);
47 
48  void enableLine(bool);
49  void enableKnots(bool);
50 
51  void setActiveStick(EM::PosID&);
52  int getActiveStickId() const { return activestickid_; }
53  void setMarkerLineStyle(const OD::LineStyle&);
54  bool hasDiffActiveStick(const EM::PosID*) const;
55  FlatView::AuxData* getAuxData(const EM::PosID*) const;
56 
57  mStruct(EarthModel) StkMarkerInfo
58  {
59  FlatView::AuxData* marker_;
60  int stickid_;
61  };
62 
63  EM::ObjectID& getFaultID() { return emid_; }
64  void getDisplayedSticks(ObjectSet<StkMarkerInfo>&);
65 
68 
69  void paint();
70  void enablePaint(bool paintenable)
71  { paintenable_=paintenable; }
72 protected:
73  bool addPolyLine();
74 
75  mStruct(EarthModel) Fault3DMarker
76  {
77  Fault3DMarker(){}
78  ~Fault3DMarker()
79  {
80  deepErase(stickmarker_);
81  deepErase(intsecmarker_);
82  }
83  ObjectSet<StkMarkerInfo> stickmarker_;
84  ObjectSet<FlatView::AuxData> intsecmarker_;
85  };
86 
87  bool paintSticks(EM::Fault3D&,const EM::SectionID&,
88  Fault3DMarker*);
89  bool paintStickOnPlane(const Geometry::FaultStickSurface&,
90  RowCol&,const StepInterval<int>&,
91  const Coord3&, FlatView::AuxData&);
92  bool paintStickOnRLine(const Geometry::FaultStickSurface&,
93  RowCol&,const StepInterval<int>&,
94  const Coord3&, FlatView::AuxData&);
95  bool paintIntersection(EM::Fault3D&,const EM::SectionID&,
96  Fault3DMarker*);
97  bool paintPlaneIntxn(EM::Fault3D&,Fault3DMarker*,
100  void genIntersectionAuxData(EM::Fault3D&,Fault3DMarker*,
101  const Geometry::PrimitiveSet* coordps,
102  TypeSet<Coord3>& intxnposs);
103  void removePolyLine();
104  void repaintFault3D();
105 
106  Coord getNormalInRandLine( int idx ) const;
107  FlatView::Point getFVAuxPoint(const Coord3&) const;
108 
109  virtual void fault3DChangedCB(CallBacker*);
110 
113  int rdlid_;
116 
118 
121 
124 
129 };
130 
131 } //namespace EM
bool knotenabled_
Definition: emfault3dpainter.h:127
od_int16 SectionID
Definition: emposid.h:23
#define mExpClass(module)
Definition: commondefs.h:157
od_int32 ObjectID
Definition: emposid.h:22
Class that represents non-bitmap data to be displayed in a flatviewer, such as markers, lines and more.
Definition: flatview.h:32
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
Definition: indexedshape.h:27
const FlatPosData * flatposdata_
Definition: emfault3dpainter.h:114
Positioning of flat &#39;bulk&#39; data. Only the &#39;x1&#39; axis can be irregular.
Definition: flatposdata.h:24
#define mStruct(module)
Definition: commondefs.h:162
Is an identifier for each position in the earthmodel.
Definition: emposid.h:35
OD::LineStyle markerlinestyle_
Definition: emfault3dpainter.h:119
Definition: draw.h:119
TrcKeyZSampling tkzs_
Definition: emfault3dpainter.h:111
ObjectSet< Fault3DMarker > f3dmarkers_
Definition: emfault3dpainter.h:123
Definition: faultsticksurface.h:18
FlatView::Viewer & viewer_
Definition: emfault3dpainter.h:117
void setRandomLineID(int rdlid)
Definition: emfault3dpainter.h:45
Definition: explplaneintersection.h:26
Flat Viewer using FlatView::Data and FlatView::Appearance.
Definition: flatview.h:330
void enablePaint(bool paintenable)
Definition: emfault3dpainter.h:70
Class to help setup a callback handling.
Definition: notify.h:121
Set of pointers to objects.
Definition: commontypes.h:28
3D point or vector
Definition: commontypes.h:57
TypeSet< int > bendpts_
Definition: emfault3dpainter.h:115
Definition: draw.h:63
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:32
EM::ObjectID emid_
Definition: emfault3dpainter.h:122
const TrcKeyPath * path_
Definition: emfault3dpainter.h:112
int rdlid_
Definition: emfault3dpainter.h:113
Notifier< Fault3DPainter > repaintdone_
Definition: emfault3dpainter.h:67
OD::MarkerStyle2D markerstyle_
Definition: emfault3dpainter.h:120
int getActiveStickId() const
Definition: emfault3dpainter.h:52
IdxPair used for its row() and col().
Definition: rowcol.h:23
bool linenabled_
Definition: emfault3dpainter.h:126
int activestickid_
Definition: emfault3dpainter.h:125
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:23
3D Fault
Definition: emfault3d.h:76
2D point or vector class.
Definition: commontypes.h:58
Definition: bitmap2rgb.h:15
Notifier< Fault3DPainter > abouttorepaint_
Definition: emfault3dpainter.h:66
Definition: arraytesselator.h:19
3D fault painter.
Definition: emfault3dpainter.h:35
EM::ObjectID & getFaultID()
Definition: emfault3dpainter.h:63
const TrcKeyZSampling & getTrcKeyZSampling() const
Definition: emfault3dpainter.h:42
bool paintenable_
Definition: emfault3dpainter.h:128
void deepErase(ObjectSet< T > &os)
empty the ObjectSet deleting all objects pointed to.
Definition: objectset.h:122

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