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

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