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 =========================================================================*/
163 #ifndef vtkDelaunay3D_h
164 #define vtkDelaunay3D_h
165 
166 #include "vtkFiltersCoreModule.h" // For export macro
168 
169 class vtkIdList;
170 class vtkPointLocator;
171 class vtkPointSet;
172 class vtkPoints;
173 class vtkTetraArray;
175 
176 class VTKFILTERSCORE_EXPORT vtkDelaunay3D : public vtkUnstructuredGridAlgorithm
177 {
178 public:
180  void PrintSelf(ostream& os, vtkIndent indent) override;
181 
186  static vtkDelaunay3D* New();
187 
189 
198  vtkSetClampMacro(Alpha, double, 0.0, VTK_DOUBLE_MAX);
199  vtkGetMacro(Alpha, double);
201 
203 
206  vtkSetMacro(AlphaTets, vtkTypeBool);
207  vtkGetMacro(AlphaTets, vtkTypeBool);
208  vtkBooleanMacro(AlphaTets, vtkTypeBool);
210 
212 
215  vtkSetMacro(AlphaTris, vtkTypeBool);
216  vtkGetMacro(AlphaTris, vtkTypeBool);
217  vtkBooleanMacro(AlphaTris, vtkTypeBool);
219 
221 
224  vtkSetMacro(AlphaLines, vtkTypeBool);
225  vtkGetMacro(AlphaLines, vtkTypeBool);
226  vtkBooleanMacro(AlphaLines, vtkTypeBool);
228 
230 
233  vtkSetMacro(AlphaVerts, vtkTypeBool);
234  vtkGetMacro(AlphaVerts, vtkTypeBool);
235  vtkBooleanMacro(AlphaVerts, vtkTypeBool);
237 
239 
244  vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
245  vtkGetMacro(Tolerance, double);
247 
249 
253  vtkSetClampMacro(Offset, double, 2.5, VTK_DOUBLE_MAX);
254  vtkGetMacro(Offset, double);
256 
258 
264  vtkSetMacro(BoundingTriangulation, vtkTypeBool);
265  vtkGetMacro(BoundingTriangulation, vtkTypeBool);
266  vtkBooleanMacro(BoundingTriangulation, vtkTypeBool);
268 
270 
275  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
277 
283 
297  double center[3], double length, vtkIdType numPts, vtkPoints*& points);
298 
310  vtkUnstructuredGrid* Mesh, vtkPoints* points, vtkIdType id, double x[3], vtkIdList* holeTetras);
311 
319 
323  vtkMTimeType GetMTime() override;
324 
326 
331  vtkSetMacro(OutputPointsPrecision, int);
332  vtkGetMacro(OutputPointsPrecision, int);
334 
335 protected:
337  ~vtkDelaunay3D() override;
338 
340 
341  double Alpha;
346  double Tolerance;
348  double Offset;
350 
351  vtkIncrementalPointLocator* Locator; // help locate points faster
352 
353  vtkTetraArray* TetraArray; // used to keep track of circumspheres/neighbors
354  int FindTetra(vtkUnstructuredGrid* Mesh, double x[3], vtkIdType tetraId, int depth);
355  int InSphere(double x[3], vtkIdType tetraId);
357 
358  int NumberOfDuplicatePoints; // keep track of bad data
360 
361  // Keep track of number of references to points to avoid new/delete calls
363 
365  vtkIdList* faces, vtkIncrementalPointLocator* Locator);
366 
368 
369 private: // members added for performance
370  vtkIdList* Tetras; // used in InsertPoint
371  vtkIdList* Faces; // used in InsertPoint
372  vtkIdList* CheckedTetras; // used by InsertPoint
373 
374 private:
375  vtkDelaunay3D(const vtkDelaunay3D&) = delete;
376  void operator=(const vtkDelaunay3D&) = delete;
377 };
378 
379 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:143
vtkDelaunay3D::AlphaLines
vtkTypeBool AlphaLines
Definition: vtkDelaunay3D.h:344
vtkDelaunay3D::AlphaTets
vtkTypeBool AlphaTets
Definition: vtkDelaunay3D.h:342
vtkDelaunay3D::Tolerance
double Tolerance
Definition: vtkDelaunay3D.h:346
vtkDelaunay3D::EndPointInsertion
void EndPointInsertion()
Invoke this method after all points have been inserted.
vtkDelaunay3D::FindTetra
int FindTetra(vtkUnstructuredGrid *Mesh, double x[3], vtkIdType tetraId, int depth)
vtkDelaunay3D::Alpha
double Alpha
Definition: vtkDelaunay3D.h:341
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkPointLocator
quickly locate points in 3-space
Definition: vtkPointLocator.h:100
vtkDelaunay3D::TetraArray
vtkTetraArray * TetraArray
Definition: vtkDelaunay3D.h:353
vtkDelaunay3D::InsertTetra
void InsertTetra(vtkUnstructuredGrid *Mesh, vtkPoints *points, vtkIdType tetraId)
vtkDelaunay3D::FindEnclosingFaces
vtkIdType FindEnclosingFaces(double x[3], vtkUnstructuredGrid *Mesh, vtkIdList *tetras, vtkIdList *faces, vtkIncrementalPointLocator *Locator)
vtkDelaunay3D::InSphere
int InSphere(double x[3], vtkIdType tetraId)
vtkX3D::length
@ length
Definition: vtkX3D.h:399
vtkX3D::center
@ center
Definition: vtkX3D.h:236
vtkDelaunay3D::AlphaTris
vtkTypeBool AlphaTris
Definition: vtkDelaunay3D.h:343
vtkDelaunay3D::vtkDelaunay3D
vtkDelaunay3D()
vtkDelaunay3D::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkDelaunay3D::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkDelaunay3D.h:349
vtkDelaunay3D::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkDelaunay3D.h:351
vtkX3D::points
@ points
Definition: vtkX3D.h:452
vtkDelaunay3D::NumberOfDuplicatePoints
int NumberOfDuplicatePoints
Definition: vtkDelaunay3D.h:358
vtkDelaunay3D::New
static vtkDelaunay3D * New()
Construct object with Alpha = 0.0; Tolerance = 0.001; Offset = 2.5; BoundingTriangulation turned off.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkDelaunay3D::CreateDefaultLocator
void CreateDefaultLocator()
Create default locator.
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:52
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:140
vtkDelaunay3D::~vtkDelaunay3D
~vtkDelaunay3D() override
vtkDelaunay3D::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkDelaunay3D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkDelaunay3D::InitPointInsertion
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::InsertPoint
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.
vtkPointSet
concrete class for storing a set of points
Definition: vtkPointSet.h:106
vtkDelaunay3D::References
int * References
Definition: vtkDelaunay3D.h:362
vtkDelaunay3D::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
Set / get a spatial locator for merging points.
vtkDelaunay3D
create 3D Delaunay triangulation of input points
Definition: vtkDelaunay3D.h:177
vtkUnstructuredGridAlgorithm.h
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:41
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:204
vtkDelaunay3D::Offset
double Offset
Definition: vtkDelaunay3D.h:348
vtkDelaunay3D::GetMTime
vtkMTimeType GetMTime() override
Return the MTime also considering the locator.
vtkDelaunay3D::NumberOfDegeneracies
int NumberOfDegeneracies
Definition: vtkDelaunay3D.h:359
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
vtkDelaunay3D::AlphaVerts
vtkTypeBool AlphaVerts
Definition: vtkDelaunay3D.h:345
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
vtkDelaunay3D::BoundingTriangulation
vtkTypeBool BoundingTriangulation
Definition: vtkDelaunay3D.h:347