OpendTect-6_4  6.4
explicitmarchingcubes.h
Go to the documentation of this file.
1 #ifndef explicitmarchingcubes_h
2 #define explicitmarchingcubes_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: K. Tingdahl
9  Date: March 2006
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "geometrymod.h"
16 #include "indexedshape.h"
17 #include "multidimstorage.h"
18 #include "thread.h"
19 
21 template <class T> class SamplingData;
22 class TaskRunner;
23 
28  public Geometry::IndexedShape
29 {
30 public:
33 
34  void setSurface(MarchingCubesSurface*);
35  MarchingCubesSurface* getSurface() { return surface_; }
36  const MarchingCubesSurface* getSurface() const { return surface_; }
37  void removeAll(bool deep);
38 
39  bool update(bool forceall,TaskRunner* = 0);
40  bool needsUpdate() const;
41 
42  bool createsNormals() const { return true; }
43 
44 protected:
45 
46  friend class ExplicitMarchingCubesSurfaceUpdater;
47  void surfaceChange(CallBacker*);
48 
49  bool allBucketsHaveChanged() const;
50 
51  bool update(const Interval<int>& xrg,
52  const Interval<int>& yrg,
53  const Interval<int>& zrg,TaskRunner* = 0);
54  void removeBuckets(const Interval<int>& xrg,
55  const Interval<int>& yrg,
56  const Interval<int>& zrg);
57  bool updateIndices(const int* pos);
58  bool getCoordIndices(const int* pos,int* res);
59  bool updateCoordinates(const int* pos);
60  bool updateCoordinate(const int* pos,const int* idxs,
61  int*res);
62  int getBucketPos(int pos) const;
63 
65 
66  Interval<int>* changedbucketranges_[3];
68 
71 
73 };
74 
99 {
100 public:
105 };
106 
107 
112 {
113 public:
114  MarchingCubeLookupTable();
115  ~MarchingCubeLookupTable();
116  MarchingCubeTriangleTable triangles_[256];
117 
118  static const MarchingCubeLookupTable& get();
119 };
120 
121 #endif
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
ObjectSet< char > indices_
Definition: explicitmarchingcubes.h:101
MarchingCubesSurface * getSurface()
Definition: explicitmarchingcubes.h:35
Definition: explicitmarchingcubes.h:98
int lastversionupdate_
Definition: explicitmarchingcubes.h:67
Definition: marchingcubes.h:82
void removeAll()
Class that can execute a task.
Definition: task.h:169
MarchingCubesSurface * surface_
Definition: explicitmarchingcubes.h:64
Definition: explicitmarchingcubes.h:27
MultiDimStorage< int > coordindices_
Definition: explicitmarchingcubes.h:69
Definition: explicitmarchingcubes.h:111
Threads::Lock coordindiceslock_
Definition: explicitmarchingcubes.h:70
TypeSet< unsigned char > nrindices_
Definition: explicitmarchingcubes.h:102
MultiDimStorage< Geometry::IndexedGeometry * > ibuckets_
Definition: explicitmarchingcubes.h:72
bool createsNormals() const
Definition: explicitmarchingcubes.h:42
Holds the fundamental sampling info: start and interval.
Definition: samplingdata.h:22
const MarchingCubesSurface * getSurface() const
Definition: explicitmarchingcubes.h:36
Definition: arraytesselator.h:21

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