OpendTect-6_4  6.4
explpolygonsurface.h
Go to the documentation of this file.
1 #ifndef explpolygonsurface_h
2 #define explpolygonsurface_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Yuancheng Liu
9  Date: July 2008
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "geometrymod.h"
16 #include "indexedshape.h"
17 #include "coord.h"
18 
19 class DAGTetrahedraTree;
20 
21 namespace Geometry
22 {
23 
24 class PolygonSurface;
25 
30  , public CallBacker
31 {
32 public:
34  float zscale=1);
36 
37  void display(bool polygons,bool body);
38  void setPolygonSurface(const PolygonSurface*);
39  const PolygonSurface* getPolygonSurface() const { return surface_; }
40 
41  void setZScale(float);
42 
43  bool arePolygonsDisplayed() const { return displaypolygons_;}
44  bool isBodyDisplayed() const { return displaybody_; }
45 
46  bool needsUpdate() const { return needsupdate_; }
47  DAGTetrahedraTree* getTetrahedraTree() const { return tetrahedratree_; }
48 
49  TypeSet<Coord3> getSurfaceSamples() const { return samples_; }
50  TypeSet<int> getSampleIndices() const { return sampleindices_; }
51  /*<The indices are corresponding to the samples_. */
52 
53  bool prepareBodyDAGTree();
54  /*<Create body tetrahedras based on surface polygons.*/
55  char positionToBody(const Coord3 point);
56  /*<Check point is inside, on, or outside a triangulated
57  body surface, ret 1, 0, -1 respectively. */
58 
59  bool createsNormals() const { return true; }
60 
61  bool update(bool forceall,TaskRunner*);
62 
63 protected:
64 
65  void updateGeometries();
66  bool updateBodyDisplay();
67  void removeAll(bool);
68  void addToGeometries(IndexedGeometry*);
69  void removeFromGeometries(const IndexedGeometry*);
70  void addToTrianglePrimitiveSet(Geometry::PrimitiveSet*,
71  int,int,int);
72  void calcNormals(int nrtriangles,int idx1,int idx2,int idx3);
73 
74 
75 
80 
87 };
88 
89 };
90 
91 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Definition: indexedshape.h:182
TypeSet< Coord3 > samples_
Definition: explpolygonsurface.h:82
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
bool isBodyDisplayed() const
Definition: explpolygonsurface.h:44
Definition: indexedshape.h:29
bool displaypolygons_
Definition: explpolygonsurface.h:76
Definition: indexedshape.h:126
bool needsupdate_
Definition: explpolygonsurface.h:78
Delaunay triangulation for 3D points. Should make sure all the points are defined.
Definition: delaunay3d.h:25
bool createsNormals() const
Definition: explpolygonsurface.h:59
TypeSet< Coord3 > getSurfaceSamples() const
Definition: explpolygonsurface.h:49
void removeAll()
Definition: explpolygonsurface.h:29
Class that can execute a task.
Definition: task.h:169
IndexedGeometry * bodytriangle_
Definition: explpolygonsurface.h:85
bool arePolygonsDisplayed() const
Definition: explpolygonsurface.h:43
const PolygonSurface * surface_
Definition: explpolygonsurface.h:84
A cartesian coordinate in 3D space.
Definition: coord.h:72
DAGTetrahedraTree * getTetrahedraTree() const
Definition: explpolygonsurface.h:47
TypeSet< int > getSampleIndices() const
Definition: explpolygonsurface.h:50
bool needsUpdate() const
Definition: explpolygonsurface.h:46
bool displaybody_
Definition: explpolygonsurface.h:77
IndexedGeometry * polygondisplay_
Definition: explpolygonsurface.h:86
DAGTetrahedraTree * tetrahedratree_
Definition: explpolygonsurface.h:81
const PolygonSurface * getPolygonSurface() const
Definition: explpolygonsurface.h:39
Definition: polygonsurface.h:26
Definition: arraytesselator.h:21
Coord3 scalefacs_
Definition: explpolygonsurface.h:79
TypeSet< int > sampleindices_
Definition: explpolygonsurface.h:83

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