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

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