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

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