OpendTect-6_4  6.4
parametricsurface.h
Go to the documentation of this file.
1 #ifndef parametricsurface_h
2 #define parametricsurface_h
3 
4 /*+
5 ________________________________________________________________________
6 (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7 Author: K. Tingdahl
8 RCS: $Id$
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "geometrymod.h"
14 #include "rowcol.h"
15 #include "rowcolsurface.h"
16 
17 
18 namespace Geometry
19 {
20 
21 class ParametricCurve;
22 
25 public:
26  ParametricSurface(const RowCol& origin=RowCol(0,0),
27  const RowCol& step=RowCol(1,1) );
29  ParametricSurface* clone() const = 0;
30 
31  virtual Coord3 computePosition(const Coord&) const;
32  virtual Coord3 computeNormal(const Coord&) const;
33 
34  virtual bool insertRow(int row,int nrnew=1) = 0;
35  virtual bool insertCol(int col,int nrnew=1) = 0;
36  virtual bool removeRow(int startrow,int stoprow) { return false; }
37  virtual bool removeCol(int startcol,int stoprcol) { return false; }
38 
39  virtual StepInterval<int> rowRange() const;
40  virtual StepInterval<int> rowRange(int col) const;
41  virtual StepInterval<int> colRange(int row) const;
42  virtual StepInterval<int> colRange() const;
43 
44  virtual ParametricCurve*
45  createRowCurve( float row,
46  const Interval<int>* colrange=0 ) const;
47  virtual ParametricCurve*
48  createColCurve( float col,
49  const Interval<int>* rowrange=0 ) const;
50 
51  virtual bool circularRows() const { return false; }
52  virtual bool circularCols() const { return false; }
53 
54  virtual bool setKnot(const RowCol&,const Coord3&);
55  virtual bool unsetKnot(const RowCol&);
56  virtual Coord3 getKnot(const RowCol&) const;
57  virtual Coord3 getKnot(const RowCol&,bool interpifudf) const = 0;
58  virtual bool isKnotDefined(const RowCol&) const;
59  bool hasSupport(const RowCol&) const;
60 
61  int nrKnots() const;
62  RowCol getKnotRowCol( int idx ) const;
63 
64  Coord3 getPosition( GeomPosID pid ) const;
65  bool setPosition( GeomPosID pid, const Coord3&);
66  bool isDefined( GeomPosID pid ) const;
67 
68  bool isAtEdge(const RowCol&) const;
69 
70  bool checkSupport(bool yn);
72  bool checksSupport() const;
74  bool checkSelfIntersection(bool yn);
76  bool checksSelfIntersection() const;
79  void trimUndefParts();
80 
81  int getKnotIndex(const RowCol& rc) const;
82 protected:
83 
84  virtual void _setKnot( int idx, const Coord3& ) = 0;
85  virtual bool checkSelfIntersection( const RowCol& ) const;
86 
87  int rowIndex(int row) const
88  {
89  return (row - origin_.row()) / step_.row();
90  }
91  int colIndex(int col) const
92  {
93  return (col - origin_.col()) / step_.col();
94  }
95  static int rowDim() { return 0; }
96  static int colDim() { return 1; }
97  virtual int nrRows() const = 0;
98  virtual int nrCols() const = 0;
99  bool isAtSameEdge(const RowCol&,const RowCol&,
100  TypeSet<RowCol>* =0) const;
101 
104 
107 };
108 
109 };
110 
111 #endif
IdxType & row()
Definition: posidxpair.h:45
#define mExpClass(module)
Definition: commondefs.h:160
A curve that is defined by regularly sampled positions.
Definition: parametriccurve.h:32
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Definition: parametricsurface.h:23
static int colDim()
Definition: parametricsurface.h:96
RowCol step_
Definition: parametricsurface.h:106
RowCol step_
Definition: horizontracker.h:141
A cartesian coordinate in 2D space.
Definition: coord.h:25
od_int64 GeomPosID
Definition: geomelement.h:21
bool checksupport_
Definition: parametricsurface.h:102
int rowIndex(int row) const
Definition: parametricsurface.h:87
Definition: rowcolsurface.h:26
int colIndex(int col) const
Definition: parametricsurface.h:91
A cartesian coordinate in 3D space.
Definition: coord.h:72
IdxPair used for its row() and col().
Definition: rowcol.h:25
virtual bool removeRow(int startrow, int stoprow)
Definition: parametricsurface.h:36
IdxType & col()
Definition: posidxpair.h:50
static int rowDim()
Definition: parametricsurface.h:95
virtual bool circularCols() const
Definition: parametricsurface.h:52
virtual bool removeCol(int startcol, int stoprcol)
Definition: parametricsurface.h:37
virtual bool circularRows() const
Definition: parametricsurface.h:51
RowCol origin_
Definition: parametricsurface.h:105
bool checkselfintersection_
Definition: parametricsurface.h:103
Definition: arraytesselator.h:21

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