VTK
vtkDelaunay3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDelaunay3D.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
99 #ifndef vtkDelaunay3D_h
100 #define vtkDelaunay3D_h
101 
102 #include "vtkFiltersCoreModule.h" // For export macro
104 
105 class vtkIdList;
106 class vtkPointLocator;
107 class vtkPointSet;
108 class vtkPoints;
109 class vtkTetraArray;
111 
113 {
114 public:
116  void PrintSelf(ostream& os, vtkIndent indent);
117 
120  static vtkDelaunay3D *New();
121 
123 
131  vtkSetClampMacro(Alpha,double,0.0,VTK_DOUBLE_MAX);
132  vtkGetMacro(Alpha,double);
134 
136 
138  vtkSetMacro(AlphaTets,int);
139  vtkGetMacro(AlphaTets,int);
140  vtkBooleanMacro(AlphaTets,int);
142 
144 
146  vtkSetMacro(AlphaTris,int);
147  vtkGetMacro(AlphaTris,int);
148  vtkBooleanMacro(AlphaTris,int);
150 
152 
153  vtkSetMacro(AlphaLines,int);
154  vtkGetMacro(AlphaLines,int);
155  vtkBooleanMacro(AlphaLines,int);
157 
159 
161  vtkSetMacro(AlphaVerts,int);
162  vtkGetMacro(AlphaVerts,int);
163  vtkBooleanMacro(AlphaVerts,int);
165 
167 
170  vtkSetClampMacro(Tolerance,double,0.0,1.0);
171  vtkGetMacro(Tolerance,double);
173 
175 
177  vtkSetClampMacro(Offset,double,2.5,VTK_DOUBLE_MAX);
178  vtkGetMacro(Offset,double);
180 
182 
186  vtkSetMacro(BoundingTriangulation,int);
187  vtkGetMacro(BoundingTriangulation,int);
188  vtkBooleanMacro(BoundingTriangulation,int);
190 
192 
197 
201 
203 
214  vtkIdType numPts, vtkPoints* &pts);
216 
218 
228  vtkIdType id, double x[3], vtkIdList *holeTetras);
230 
236 
238  unsigned long GetMTime();
239 
241 
244  vtkSetMacro(OutputPointsPrecision,int);
245  vtkGetMacro(OutputPointsPrecision,int);
247 
248 protected:
251 
253 
254  double Alpha;
259  double Tolerance;
261  double Offset;
263 
264  vtkIncrementalPointLocator *Locator; //help locate points faster
265 
266  vtkTetraArray *TetraArray; //used to keep track of circumspheres/neighbors
267  int FindTetra(vtkUnstructuredGrid *Mesh, double x[3], vtkIdType tetId,
268  int depth);
269  int InSphere(double x[3], vtkIdType tetraId);
271  vtkIdType tetraId);
272 
273  int NumberOfDuplicatePoints; //keep track of bad data
275 
276  // Keep track of number of references to points to avoid new/delete calls
278 
280  vtkIdList *tetras, vtkIdList *faces,
281  vtkIncrementalPointLocator *Locator);
282 
284 private: //members added for performance
285  vtkIdList *Tetras; //used in InsertPoint
286  vtkIdList *Faces; //used in InsertPoint
287  vtkIdList *BoundaryPts; //used by InsertPoint
288  vtkIdList *CheckedTetras; //used by InsertPoint
289  vtkIdList *NeiTetras; //used by InsertPoint
290 
291 private:
292  vtkDelaunay3D(const vtkDelaunay3D&); // Not implemented.
293  void operator=(const vtkDelaunay3D&); // Not implemented.
294 };
295 
296 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkDelaunay3D::Tolerance
double Tolerance
Definition: vtkDelaunay3D.h:259
vtkDelaunay3D::EndPointInsertion
void EndPointInsertion()
vtkDelaunay3D::Alpha
double Alpha
Definition: vtkDelaunay3D.h:254
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkPointLocator
quickly locate points in 3-space
Definition: vtkPointLocator.h:53
vtkDelaunay3D::TetraArray
vtkTetraArray * TetraArray
Definition: vtkDelaunay3D.h:266
vtkDelaunay3D::FindTetra
int FindTetra(vtkUnstructuredGrid *Mesh, double x[3], vtkIdType tetId, int depth)
vtkDelaunay3D::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkDelaunay3D::FindEnclosingFaces
vtkIdType FindEnclosingFaces(double x[3], vtkUnstructuredGrid *Mesh, vtkIdList *tetras, vtkIdList *faces, vtkIncrementalPointLocator *Locator)
vtkDelaunay3D::InSphere
int InSphere(double x[3], vtkIdType tetraId)
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkX3D::center
@ center
Definition: vtkX3D.h:230
vtkDelaunay3D::vtkDelaunay3D
vtkDelaunay3D()
vtkDelaunay3D::~vtkDelaunay3D
~vtkDelaunay3D()
vtkgl::length
GLuint GLsizei GLsizei * length
Definition: vtkgl.h:11992
vtkgl::points
GLsizei const GLfloat * points
Definition: vtkgl.h:14786
vtkDelaunay3D::AlphaTets
int AlphaTets
Definition: vtkDelaunay3D.h:255
vtkFiltersCoreModule.h
vtkDelaunay3D::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkDelaunay3D.h:262
vtkgl::depth
GLint GLint GLsizei GLsizei GLsizei depth
Definition: vtkgl.h:11316
vtkDelaunay3D::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkDelaunay3D.h:264
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkDelaunay3D::AlphaVerts
int AlphaVerts
Definition: vtkDelaunay3D.h:258
VTKFILTERSCORE_EXPORT
#define VTKFILTERSCORE_EXPORT
Definition: vtkFiltersCoreModule.h:15
vtkDelaunay3D::NumberOfDuplicatePoints
int NumberOfDuplicatePoints
Definition: vtkDelaunay3D.h:273
vtkDelaunay3D::New
static vtkDelaunay3D * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkDelaunay3D::CreateDefaultLocator
void CreateDefaultLocator()
vtkDelaunay3D::AlphaLines
int AlphaLines
Definition: vtkDelaunay3D.h:257
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:54
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkDelaunay3D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkDelaunay3D::GetMTime
unsigned long GetMTime()
vtkDelaunay3D::BoundingTriangulation
int BoundingTriangulation
Definition: vtkDelaunay3D.h:260
vtkDelaunay3D::AlphaTris
int AlphaTris
Definition: vtkDelaunay3D.h:256
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkDelaunay3D::InsertTetra
void InsertTetra(vtkUnstructuredGrid *Mesh, vtkPoints *pts, vtkIdType tetraId)
vtkDelaunay3D::InsertPoint
void InsertPoint(vtkUnstructuredGrid *Mesh, vtkPoints *points, vtkIdType id, double x[3], vtkIdList *holeTetras)
vtkPointSet
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:45
vtkDelaunay3D::References
int * References
Definition: vtkDelaunay3D.h:277
vtkDelaunay3D::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
vtkDelaunay3D
create 3D Delaunay triangulation of input points
Definition: vtkDelaunay3D.h:113
vtkUnstructuredGridAlgorithm.h
vtkDelaunay3D::FillInputPortInformation
virtual int FillInputPortInformation(int, vtkInformation *)
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:40
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:82
vtkDelaunay3D::Offset
double Offset
Definition: vtkDelaunay3D.h:261
vtkDelaunay3D::InitPointInsertion
vtkUnstructuredGrid * InitPointInsertion(double center[3], double length, vtkIdType numPts, vtkPoints *&pts)
vtkDelaunay3D::NumberOfDegeneracies
int NumberOfDegeneracies
Definition: vtkDelaunay3D.h:274
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:142