OpendTect  6.3
faultstickset.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: J.C. Glas
7 Date: November 2008
8 ________________________________________________________________________
9 
10 -*/
11 
12 /*
13 Info:
14  sticknr: row nr corresponding to rowrange, can be negative
15  stickidx: row index, starting from 0
16 */
17 
18 #include "geometrymod.h"
19 #include "refcount.h"
20 #include "rowcolsurface.h"
21 
22 namespace Geometry
23 {
24 
26 {
27 public:
28  FaultStickSet();
29  ~FaultStickSet();
30  bool isEmpty() const { return !sticks_.size(); }
31  Element* clone() const;
32 
33  virtual bool insertStick(const Coord3& firstpos,
34  const Coord3& editnormal,int stick=0,
35  int firstcol=0);
36  bool removeStick(int sticknr);
37 
38  bool insertKnot(const RowCol&,const Coord3&);
39  bool removeKnot(const RowCol&);
40 
41  int nrSticks() const;
42  int nrKnots(int sticknr) const;
43  const TypeSet<Coord3>* getStick(int stickidx) const;
44 
45  StepInterval<int> rowRange() const;
46  virtual StepInterval<int> colRange() const
47  { return RowColSurface::colRange(); }
48  StepInterval<int> colRange(int stick) const;
49 
50  bool setKnot(const RowCol&,const Coord3&);
51  Coord3 getKnot(const RowCol&) const;
52  bool isKnotDefined(const RowCol&) const;
53 
54  Coord3 getEditPlaneNormal(int sticknr) const;
55  enum ChangeTag { StickChange=__mUndefIntVal+1, StickInsert,
56  StickRemove, StickHide };
57 
58  // To be used by surface reader only
59  void addUdfRow(int stickidx,int firstknotnr,int nrknots);
60  void addEditPlaneNormal(const Coord3&);
61 
62  // Use zscale=0 to measure in xy-direction only and
63  // zscale=MAXDOUBLE to measure in z-direction only.
64  void geometricStickOrder(TypeSet<int>& sticknrs,
65  double zscale,bool orderall=true) const;
66 
67  bool isTwisted(int sticknr1,int sticknr2,
68  double zscale) const;
69 
70  enum StickStatus { NoStatus=0, Selected=1, Preferred=2,
71  HiddenLowestBit=4 };
72 
73  void selectStick(int sticknr,bool yn);
74  bool isStickSelected(int sticknr) const;
75  void preferStick(int sticknr);
76  int preferredStickNr() const;
77  void hideStick(int sticknr,bool yn,int sceneidx=-1);
78  bool isStickHidden(int sticknr,int sceneidx=-1) const;
79  void hideKnot(const RowCol&,bool yn,int sceneidx=-1);
80  bool isKnotHidden(const RowCol&,int sceneidx=-1) const;
81 
82 protected:
83  double interStickDist(int sticknr1,int sticknr2,
84  double zscale) const;
85 
86  int firstrow_;
87 
90 
93 
95 };
96 
97 } // namespace Geometry
#define mExpClass(module)
Definition: commondefs.h:157
ObjectSet< TypeSet< unsigned int > > knotstatus_
Definition: faultstickset.h:94
int firstrow_
Definition: faultstickset.h:86
TypeSet< int > firstcols_
Definition: faultstickset.h:89
ChangeTag
Definition: faultstickset.h:55
StickStatus
Definition: faultstickset.h:70
virtual StepInterval< int > colRange() const
ObjectSet< TypeSet< Coord3 > > sticks_
Definition: faultstickset.h:88
bool isEmpty() const
Definition: faultstickset.h:30
Set of pointers to objects.
Definition: commontypes.h:28
#define __mUndefIntVal
Almost MAXINT so unlikely, but not MAXINT to avoid that.
Definition: undefval.h:23
3D point or vector
Definition: commontypes.h:57
Set of (small) copyable elements.
Definition: commontypes.h:26
Definition: rowcolsurface.h:24
TypeSet< Coord3 > editplanenormals_
Definition: faultstickset.h:91
virtual StepInterval< int > colRange() const
Definition: faultstickset.h:46
Definition: geomelement.h:35
IdxPair used for its row() and col().
Definition: rowcol.h:23
Definition: faultstickset.h:55
Definition: faultstickset.h:56
Definition: faultstickset.h:25
TypeSet< unsigned int > stickstatus_
Definition: faultstickset.h:92
Definition: arraytesselator.h:19

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