OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "geometrymod.h"
15 #include "indexedshape.h"
16 #include "coord.h"
17 
18 class DAGTetrahedraTree;
19 
20 namespace Geometry
21 {
22 
23 class PolygonSurface;
24 
29  , public CallBacker
30 {
31 public:
33  float zscale=1);
35 
36  void display(bool polygons,bool body);
38  const PolygonSurface* getPolygonSurface() const { return surface_; }
39 
40  void setZScale(float);
41 
42  bool arePolygonsDisplayed() const { return displaypolygons_;}
43  bool isBodyDisplayed() const { return displaybody_; }
44 
45  bool needsUpdate() const { return needsupdate_; }
46  DAGTetrahedraTree* getTetrahedraTree() const { return tetrahedratree_; }
47 
48  TypeSet<Coord3> getSurfaceSamples() const { return samples_; }
49  TypeSet<int> getSampleIndices() const { return sampleindices_; }
50  /*<The indices are corresponding to the samples_. */
51 
53  /*<Create body tetrahedras based on surface polygons.*/
54  char positionToBody(const Coord3 point);
55  /*<Check point is inside, on, or outside a triangulated
56  body surface, ret 1, 0, -1 respectively. */
57 
58  bool createsNormals() const { return true; }
59 
60  bool update(bool forceall,TaskRunner*);
61 
62 protected:
63 
66  void removeAll(bool);
70  int,int,int);
71  void calcNormals(int nrtriangles,int idx1,int idx2,int idx3);
72 
73 
74 
79 
86 };
87 
88 };
89 
Coord3
A cartesian coordinate in 3D space.
Definition: coord.h:72
Geometry::ExplPolygonSurface::updateBodyDisplay
bool updateBodyDisplay()
Geometry::ExplPolygonSurface::update
bool update(bool forceall, TaskRunner *)
Geometry::ExplPolygonSurface::prepareBodyDAGTree
bool prepareBodyDAGTree()
Geometry
Definition: arraytesselator.h:21
Geometry::IndexedGeometry
Definition: indexedshape.h:126
Geometry::IndexedShape
Definition: indexedshape.h:182
Geometry::ExplPolygonSurface::positionToBody
char positionToBody(const Coord3 point)
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
DAGTetrahedraTree
Delaunay triangulation for 3D points. Should make sure all the points are defined.
Definition: delaunay3d.h:25
Geometry::PolygonSurface
Definition: polygonsurface.h:26
Geometry::ExplPolygonSurface::addToGeometries
void addToGeometries(IndexedGeometry *)
Geometry::ExplPolygonSurface::setZScale
void setZScale(float)
Geometry::ExplPolygonSurface::needsUpdate
bool needsUpdate() const
Definition: explpolygonsurface.h:45
Geometry::ExplPolygonSurface::ExplPolygonSurface
ExplPolygonSurface(const PolygonSurface *, float zscale=1)
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
Geometry::ExplPolygonSurface::displaypolygons_
bool displaypolygons_
Definition: explpolygonsurface.h:75
Geometry::PrimitiveSet
Definition: indexedshape.h:29
Geometry::ExplPolygonSurface::isBodyDisplayed
bool isBodyDisplayed() const
Definition: explpolygonsurface.h:43
Geometry::ExplPolygonSurface
Definition: explpolygonsurface.h:30
Geometry::ExplPolygonSurface::needsupdate_
bool needsupdate_
Definition: explpolygonsurface.h:77
Geometry::ExplPolygonSurface::getPolygonSurface
const PolygonSurface * getPolygonSurface() const
Definition: explpolygonsurface.h:38
Geometry::ExplPolygonSurface::surface_
const PolygonSurface * surface_
Definition: explpolygonsurface.h:83
Geometry::ExplPolygonSurface::updateGeometries
void updateGeometries()
Geometry::ExplPolygonSurface::display
void display(bool polygons, bool body)
indexedshape.h
Geometry::ExplPolygonSurface::createsNormals
bool createsNormals() const
Definition: explpolygonsurface.h:58
TaskRunner
Class that can execute a task.
Definition: task.h:170
Geometry::ExplPolygonSurface::displaybody_
bool displaybody_
Definition: explpolygonsurface.h:76
Geometry::ExplPolygonSurface::setPolygonSurface
void setPolygonSurface(const PolygonSurface *)
Geometry::ExplPolygonSurface::~ExplPolygonSurface
~ExplPolygonSurface()
Geometry::ExplPolygonSurface::removeFromGeometries
void removeFromGeometries(const IndexedGeometry *)
Geometry::ExplPolygonSurface::addToTrianglePrimitiveSet
void addToTrianglePrimitiveSet(Geometry::PrimitiveSet *, int, int, int)
Geometry::ExplPolygonSurface::getSurfaceSamples
TypeSet< Coord3 > getSurfaceSamples() const
Definition: explpolygonsurface.h:48
Geometry::ExplPolygonSurface::polygondisplay_
IndexedGeometry * polygondisplay_
Definition: explpolygonsurface.h:85
Geometry::ExplPolygonSurface::arePolygonsDisplayed
bool arePolygonsDisplayed() const
Definition: explpolygonsurface.h:42
Geometry::ExplPolygonSurface::calcNormals
void calcNormals(int nrtriangles, int idx1, int idx2, int idx3)
Geometry::ExplPolygonSurface::bodytriangle_
IndexedGeometry * bodytriangle_
Definition: explpolygonsurface.h:84
Geometry::ExplPolygonSurface::scalefacs_
Coord3 scalefacs_
Definition: explpolygonsurface.h:78
Geometry::ExplPolygonSurface::sampleindices_
TypeSet< int > sampleindices_
Definition: explpolygonsurface.h:82
Geometry::ExplPolygonSurface::removeAll
void removeAll(bool)
Geometry::ExplPolygonSurface::samples_
TypeSet< Coord3 > samples_
Definition: explpolygonsurface.h:81
Geometry::ExplPolygonSurface::getSampleIndices
TypeSet< int > getSampleIndices() const
Definition: explpolygonsurface.h:49
Geometry::ExplPolygonSurface::getTetrahedraTree
DAGTetrahedraTree * getTetrahedraTree() const
Definition: explpolygonsurface.h:46
Geometry::ExplPolygonSurface::tetrahedratree_
DAGTetrahedraTree * tetrahedratree_
Definition: explpolygonsurface.h:80
TypeSet< Coord3 >
coord.h

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