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 =========================================================================*/
96 #ifndef __vtkDelaunay3D_h
97 #define __vtkDelaunay3D_h
98 
99 #include "vtkFiltersCoreModule.h" // For export macro
101 
102 class vtkIdList;
103 class vtkPointLocator;
104 class vtkPointSet;
105 class vtkPoints;
106 class vtkTetraArray;
108 
110 {
111 public:
113  void PrintSelf(ostream& os, vtkIndent indent);
114 
117  static vtkDelaunay3D *New();
118 
120 
124  vtkSetClampMacro(Alpha,double,0.0,VTK_DOUBLE_MAX);
125  vtkGetMacro(Alpha,double);
127 
129 
132  vtkSetClampMacro(Tolerance,double,0.0,1.0);
133  vtkGetMacro(Tolerance,double);
135 
137 
139  vtkSetClampMacro(Offset,double,2.5,VTK_DOUBLE_MAX);
140  vtkGetMacro(Offset,double);
142 
144 
148  vtkSetMacro(BoundingTriangulation,int);
149  vtkGetMacro(BoundingTriangulation,int);
150  vtkBooleanMacro(BoundingTriangulation,int);
152 
154 
156  void SetLocator(vtkIncrementalPointLocator *locator);
159 
162  void CreateDefaultLocator();
163 
165 
175  vtkUnstructuredGrid *InitPointInsertion(double center[3], double length,
176  vtkIdType numPts, vtkPoints* &pts);
178 
180 
189  void InsertPoint(vtkUnstructuredGrid *Mesh, vtkPoints *points,
190  vtkIdType id, double x[3], vtkIdList *holeTetras);
192 
197  void EndPointInsertion();
198 
200  unsigned long GetMTime();
201 
203 
206  vtkSetMacro(OutputPointsPrecision,int);
207  vtkGetMacro(OutputPointsPrecision,int);
209 
210 protected:
211  vtkDelaunay3D();
212  ~vtkDelaunay3D();
213 
215 
216  double Alpha;
217  double Tolerance;
219  double Offset;
221 
222  vtkIncrementalPointLocator *Locator; //help locate points faster
223 
224  vtkTetraArray *TetraArray; //used to keep track of circumspheres/neighbors
225  int FindTetra(vtkUnstructuredGrid *Mesh, double x[3], vtkIdType tetId,
226  int depth);
227  int InSphere(double x[3], vtkIdType tetraId);
228  void InsertTetra(vtkUnstructuredGrid *Mesh, vtkPoints *pts,
229  vtkIdType tetraId);
230 
231  int NumberOfDuplicatePoints; //keep track of bad data
233 
234  // Keep track of number of references to points to avoid new/delete calls
236 
237  vtkIdType FindEnclosingFaces(double x[3], vtkUnstructuredGrid *Mesh,
238  vtkIdList *tetras, vtkIdList *faces,
239  vtkIncrementalPointLocator *Locator);
240 
241  virtual int FillInputPortInformation(int, vtkInformation*);
242 private: //members added for performance
243  vtkIdList *Tetras; //used in InsertPoint
244  vtkIdList *Faces; //used in InsertPoint
245  vtkIdList *BoundaryPts; //used by InsertPoint
246  vtkIdList *CheckedTetras; //used by InsertPoint
247  vtkIdList *NeiTetras; //used by InsertPoint
248 
249 private:
250  vtkDelaunay3D(const vtkDelaunay3D&); // Not implemented.
251  void operator=(const vtkDelaunay3D&); // Not implemented.
252 };
253 
254 #endif
255 
256 
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_DOUBLE_MAX
Definition: vtkType.h:141
quickly locate points in 3-space
Store vtkAlgorithm input/output information.
#define VTKFILTERSCORE_EXPORT
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
int NumberOfDuplicatePoints
int NumberOfDegeneracies
int OutputPointsPrecision
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:41
GLuint GLsizei GLsizei * length
Definition: vtkgl.h:11992
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:133
virtual int FillInputPortInformation(int port, vtkInformation *info)
create 3D Delaunay triangulation of input points
int vtkIdType
Definition: vtkType.h:268
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
GLint GLint GLsizei GLsizei GLsizei depth
Definition: vtkgl.h:11316
vtkIncrementalPointLocator * Locator
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
dataset represents arbitrary combinations of all possible cell types
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only unstructured grid as output.
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
vtkTetraArray * TetraArray
GLsizei const GLfloat * points
Definition: vtkgl.h:14786
Store zero or more vtkInformation instances.
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:234
int BoundingTriangulation
represent and manipulate 3D points
Definition: vtkPoints.h:39
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69