VTK  9.1.0
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=========================================================================*/
103#ifndef vtkDelaunay3D_h
104#define vtkDelaunay3D_h
105
106#include "vtkFiltersCoreModule.h" // For export macro
108
109class vtkIdList;
110class vtkPointLocator;
111class vtkPointSet;
112class vtkPoints;
113class vtkTetraArray;
115
116class VTKFILTERSCORE_EXPORT vtkDelaunay3D : public vtkUnstructuredGridAlgorithm
117{
118public:
120 void PrintSelf(ostream& os, vtkIndent indent) override;
121
127
129
138 vtkSetClampMacro(Alpha, double, 0.0, VTK_DOUBLE_MAX);
139 vtkGetMacro(Alpha, double);
141
143
146 vtkSetMacro(AlphaTets, vtkTypeBool);
147 vtkGetMacro(AlphaTets, vtkTypeBool);
148 vtkBooleanMacro(AlphaTets, vtkTypeBool);
150
152
155 vtkSetMacro(AlphaTris, vtkTypeBool);
156 vtkGetMacro(AlphaTris, vtkTypeBool);
157 vtkBooleanMacro(AlphaTris, vtkTypeBool);
159
161
164 vtkSetMacro(AlphaLines, vtkTypeBool);
165 vtkGetMacro(AlphaLines, vtkTypeBool);
166 vtkBooleanMacro(AlphaLines, vtkTypeBool);
168
170
173 vtkSetMacro(AlphaVerts, vtkTypeBool);
174 vtkGetMacro(AlphaVerts, vtkTypeBool);
175 vtkBooleanMacro(AlphaVerts, vtkTypeBool);
177
179
184 vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
185 vtkGetMacro(Tolerance, double);
187
189
193 vtkSetClampMacro(Offset, double, 2.5, VTK_DOUBLE_MAX);
194 vtkGetMacro(Offset, double);
196
198
204 vtkSetMacro(BoundingTriangulation, vtkTypeBool);
205 vtkGetMacro(BoundingTriangulation, vtkTypeBool);
206 vtkBooleanMacro(BoundingTriangulation, vtkTypeBool);
208
210
215 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
217
223
237 double center[3], double length, vtkIdType numPts, vtkPoints*& points);
238
250 vtkUnstructuredGrid* Mesh, vtkPoints* points, vtkIdType id, double x[3], vtkIdList* holeTetras);
251
259
264
266
271 vtkSetMacro(OutputPointsPrecision, int);
272 vtkGetMacro(OutputPointsPrecision, int);
274
275protected:
277 ~vtkDelaunay3D() override;
278
280
281 double Alpha;
286 double Tolerance;
288 double Offset;
290
291 vtkIncrementalPointLocator* Locator; // help locate points faster
292
293 vtkTetraArray* TetraArray; // used to keep track of circumspheres/neighbors
294 int FindTetra(vtkUnstructuredGrid* Mesh, double x[3], vtkIdType tetraId, int depth);
295 int InSphere(double x[3], vtkIdType tetraId);
297
298 int NumberOfDuplicatePoints; // keep track of bad data
300
301 // Keep track of number of references to points to avoid new/delete calls
303
305 vtkIdList* faces, vtkIncrementalPointLocator* Locator);
306
308
309private: // members added for performance
310 vtkIdList* Tetras; // used in InsertPoint
311 vtkIdList* Faces; // used in InsertPoint
312 vtkIdList* CheckedTetras; // used by InsertPoint
313
314private:
315 vtkDelaunay3D(const vtkDelaunay3D&) = delete;
316 void operator=(const vtkDelaunay3D&) = delete;
317};
318
319#endif
create 3D Delaunay triangulation of input points
void CreateDefaultLocator()
Create default locator.
vtkUnstructuredGrid * InitPointInsertion(double center[3], double length, vtkIdType numPts, vtkPoints *&points)
This is a helper method used with InsertPoint() to create tetrahedronalizations of points.
~vtkDelaunay3D() override
int InSphere(double x[3], vtkIdType tetraId)
vtkMTimeType GetMTime() override
Return the MTime also considering the locator.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkDelaunay3D * New()
Construct object with Alpha = 0.0; Tolerance = 0.001; Offset = 2.5; BoundingTriangulation turned off.
vtkIdType FindEnclosingFaces(double x[3], vtkUnstructuredGrid *Mesh, vtkIdList *tetras, vtkIdList *faces, vtkIncrementalPointLocator *Locator)
vtkTetraArray * TetraArray
void InsertTetra(vtkUnstructuredGrid *Mesh, vtkPoints *points, vtkIdType tetraId)
void EndPointInsertion()
Invoke this method after all points have been inserted.
int NumberOfDegeneracies
int OutputPointsPrecision
vtkTypeBool AlphaTets
int NumberOfDuplicatePoints
vtkIncrementalPointLocator * Locator
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void SetLocator(vtkIncrementalPointLocator *locator)
Set / get a spatial locator for merging points.
vtkTypeBool BoundingTriangulation
vtkTypeBool AlphaTris
void InsertPoint(vtkUnstructuredGrid *Mesh, vtkPoints *points, vtkIdType id, double x[3], vtkIdList *holeTetras)
This is a helper method used with InitPointInsertion() to create tetrahedronalizations of points.
vtkTypeBool AlphaLines
vtkTypeBool AlphaVerts
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int FindTetra(vtkUnstructuredGrid *Mesh, double x[3], vtkIdType tetraId, int depth)
list of point or cell ids
Definition: vtkIdList.h:40
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:43
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
quickly locate points in 3-space
concrete class for storing a set of points
Definition: vtkPointSet.h:76
represent and manipulate 3D points
Definition: vtkPoints.h:43
Superclass for algorithms that produce only unstructured grid as output.
dataset represents arbitrary combinations of all possible cell types
@ points
Definition: vtkX3D.h:452
@ length
Definition: vtkX3D.h:399
@ center
Definition: vtkX3D.h:236
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165