00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00098
#ifndef __vtkDelaunay3D_h
00099
#define __vtkDelaunay3D_h
00100
00101
#include "vtkUnstructuredGridSource.h"
00102
00103
class vtkIdList;
00104
class vtkPointLocator;
00105
class vtkPointSet;
00106
class vtkPoints;
00107
class vtkTetraArray;
00108
00109 class VTK_GRAPHICS_EXPORT vtkDelaunay3D :
public vtkUnstructuredGridSource
00110 {
00111
public:
00112 vtkTypeRevisionMacro(vtkDelaunay3D,
vtkUnstructuredGridSource);
00113
void PrintSelf(ostream& os,
vtkIndent indent);
00114
00117
static vtkDelaunay3D *
New();
00118
00120
00124 vtkSetClampMacro(Alpha,
float,0.0,VTK_LARGE_FLOAT);
00125 vtkGetMacro(Alpha,
float);
00127
00129
00132 vtkSetClampMacro(Tolerance,
float,0.0,1.0);
00133 vtkGetMacro(Tolerance,
float);
00135
00137
00139 vtkSetClampMacro(Offset,
float,2.5,VTK_LARGE_FLOAT);
00140 vtkGetMacro(Offset,
float);
00142
00144
00148 vtkSetMacro(BoundingTriangulation,
int);
00149 vtkGetMacro(BoundingTriangulation,
int);
00150 vtkBooleanMacro(BoundingTriangulation,
int);
00152
00154
00156
void SetLocator(
vtkPointLocator *locator);
00157 vtkGetObjectMacro(Locator,
vtkPointLocator);
00159
00162
void CreateDefaultLocator();
00163
00165
00175
vtkUnstructuredGrid *InitPointInsertion(
float center[3],
float length,
00176
vtkIdType numPts,
vtkPoints* &pts);
00178
00180
00189
void InsertPoint(
vtkUnstructuredGrid *Mesh,
vtkPoints *points,
00190
vtkIdType id,
float x[3],
vtkIdList *holeTetras);
00192
00197
void EndPointInsertion();
00198
00200
unsigned long GetMTime();
00201
00203
00204
virtual void SetInput(
vtkPointSet *input);
00205
vtkPointSet *GetInput();
00207
00208
protected:
00209 vtkDelaunay3D();
00210 ~vtkDelaunay3D();
00211
00212
void Execute();
00213
00214 float Alpha;
00215 float Tolerance;
00216 int BoundingTriangulation;
00217 float Offset;
00218
00219 vtkPointLocator *Locator;
00220
00221 vtkTetraArray *TetraArray;
00222
int FindTetra(
vtkUnstructuredGrid *Mesh,
double x[3],
vtkIdType tetId,
00223
int depth);
00224
int InSphere(
double x[3],
vtkIdType tetraId);
00225
void InsertTetra(
vtkUnstructuredGrid *Mesh,
vtkPoints *pts,
00226
vtkIdType tetraId);
00227
00228 int NumberOfDuplicatePoints;
00229 int NumberOfDegeneracies;
00230
00231
00232 int *References;
00233
00234
vtkIdType FindEnclosingFaces(
float x[3],
vtkUnstructuredGrid *Mesh,
00235
vtkIdList *tetras,
vtkIdList *faces,
00236
vtkPointLocator *Locator);
00237
00238
private:
00239
vtkIdList *Tetras;
00240
vtkIdList *Faces;
00241
vtkIdList *BoundaryPts;
00242
vtkIdList *CheckedTetras;
00243
vtkIdList *NeiTetras;
00244
00245
private:
00246 vtkDelaunay3D(
const vtkDelaunay3D&);
00247
void operator=(
const vtkDelaunay3D&);
00248 };
00249
00250
#endif
00251
00252