OpendTect  6.3
explicitmarchingcubes.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: K. Tingdahl
8  Date: March 2006
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "geometrymod.h"
14 #include "indexedshape.h"
15 #include "multidimstorage.h"
16 #include "thread.h"
17 
19 template <class T> class SamplingData;
20 class TaskRunner;
21 
26  public Geometry::IndexedShape
27 {
28 public:
31 
32  void setSurface(MarchingCubesSurface*);
33  MarchingCubesSurface* getSurface() { return surface_; }
34  const MarchingCubesSurface* getSurface() const { return surface_; }
35  void removeAll(bool deep);
36 
37  bool update(bool forceall,TaskRunner* = 0);
38  bool needsUpdate() const;
39 
40  bool createsNormals() const { return true; }
41 
42 protected:
43 
44  friend class ExplicitMarchingCubesSurfaceUpdater;
45  void surfaceChange(CallBacker*);
46 
47  bool allBucketsHaveChanged() const;
48 
49  bool update(const Interval<int>& xrg,
50  const Interval<int>& yrg,
51  const Interval<int>& zrg,TaskRunner* = 0);
52  void removeBuckets(const Interval<int>& xrg,
53  const Interval<int>& yrg,
54  const Interval<int>& zrg);
55  bool updateIndices(const int* pos);
56  bool getCoordIndices(const int* pos,int* res);
57  bool updateCoordinates(const int* pos);
58  bool updateCoordinate(const int* pos,const int* idxs,
59  int*res);
60  int getBucketPos(int pos) const;
61 
63 
64  Interval<int>* changedbucketranges_[3];
66 
69 
71 };
72 
97 {
98 public:
103 };
104 
105 
110 {
111 public:
112  MarchingCubeLookupTable();
113  ~MarchingCubeLookupTable();
114  MarchingCubeTriangleTable triangles_[256];
115 
116  static const MarchingCubeLookupTable& get();
117 };
#define mExpClass(module)
Definition: commondefs.h:157
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:51
ObjectSet< char > indices_
Definition: explicitmarchingcubes.h:99
MarchingCubesSurface * getSurface()
Definition: explicitmarchingcubes.h:33
Definition: explicitmarchingcubes.h:96
int lastversionupdate_
Definition: explicitmarchingcubes.h:65
Definition: marchingcubes.h:80
void removeAll()
Class that can execute a task.
Definition: task.h:193
MarchingCubesSurface * surface_
Definition: explicitmarchingcubes.h:62
Definition: explicitmarchingcubes.h:25
MultiDimStorage< int > coordindices_
Definition: explicitmarchingcubes.h:67
Definition: explicitmarchingcubes.h:109
Threads::Lock coordindiceslock_
Definition: explicitmarchingcubes.h:68
TypeSet< unsigned char > nrindices_
Definition: explicitmarchingcubes.h:100
MultiDimStorage< Geometry::IndexedGeometry * > ibuckets_
Definition: explicitmarchingcubes.h:70
bool createsNormals() const
Definition: explicitmarchingcubes.h:40
Holds the fundamental sampling info: start and interval.
Definition: samplingdata.h:20
const MarchingCubesSurface * getSurface() const
Definition: explicitmarchingcubes.h:34
Definition: arraytesselator.h:19

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