vtkDelaunay3D.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00105 #ifndef __vtkDelaunay3D_h
00106 #define __vtkDelaunay3D_h
00107
00108 #include "vtkUnstructuredGridSource.h"
00109
00110 class vtkIdList;
00111 class vtkPointLocator;
00112 class vtkPointSet;
00113 class vtkPoints;
00114 class vtkTetraArray;
00115
00116 class VTK_GRAPHICS_EXPORT vtkDelaunay3D : public vtkUnstructuredGridSource
00117 {
00118 public:
00119 vtkTypeRevisionMacro(vtkDelaunay3D,vtkUnstructuredGridSource);
00120 void PrintSelf(ostream& os, vtkIndent indent);
00121
00124 static vtkDelaunay3D *New();
00125
00127
00131 vtkSetClampMacro(Alpha,double,0.0,VTK_DOUBLE_MAX);
00132 vtkGetMacro(Alpha,double);
00134
00136
00139 vtkSetClampMacro(Tolerance,double,0.0,1.0);
00140 vtkGetMacro(Tolerance,double);
00142
00144
00146 vtkSetClampMacro(Offset,double,2.5,VTK_DOUBLE_MAX);
00147 vtkGetMacro(Offset,double);
00149
00151
00155 vtkSetMacro(BoundingTriangulation,int);
00156 vtkGetMacro(BoundingTriangulation,int);
00157 vtkBooleanMacro(BoundingTriangulation,int);
00159
00161
00163 void SetLocator(vtkPointLocator *locator);
00164 vtkGetObjectMacro(Locator,vtkPointLocator);
00166
00169 void CreateDefaultLocator();
00170
00172
00182 vtkUnstructuredGrid *InitPointInsertion(double center[3], double length,
00183 vtkIdType numPts, vtkPoints* &pts);
00185
00187
00196 void InsertPoint(vtkUnstructuredGrid *Mesh, vtkPoints *points,
00197 vtkIdType id, double x[3], vtkIdList *holeTetras);
00199
00204 void EndPointInsertion();
00205
00207 unsigned long GetMTime();
00208
00210
00211 virtual void SetInput(vtkPointSet *input);
00212 vtkPointSet *GetInput();
00214
00215 protected:
00216 vtkDelaunay3D();
00217 ~vtkDelaunay3D();
00218
00219 void Execute();
00220
00221 double Alpha;
00222 double Tolerance;
00223 int BoundingTriangulation;
00224 double Offset;
00225
00226 vtkPointLocator *Locator;
00227
00228 vtkTetraArray *TetraArray;
00229 int FindTetra(vtkUnstructuredGrid *Mesh, double x[3], vtkIdType tetId,
00230 int depth);
00231 int InSphere(double x[3], vtkIdType tetraId);
00232 void InsertTetra(vtkUnstructuredGrid *Mesh, vtkPoints *pts,
00233 vtkIdType tetraId);
00234
00235 int NumberOfDuplicatePoints;
00236 int NumberOfDegeneracies;
00237
00238
00239 int *References;
00240
00241 vtkIdType FindEnclosingFaces(double x[3], vtkUnstructuredGrid *Mesh,
00242 vtkIdList *tetras, vtkIdList *faces,
00243 vtkPointLocator *Locator);
00244
00245 virtual int FillInputPortInformation(int, vtkInformation*);
00246 private:
00247 vtkIdList *Tetras;
00248 vtkIdList *Faces;
00249 vtkIdList *BoundaryPts;
00250 vtkIdList *CheckedTetras;
00251 vtkIdList *NeiTetras;
00252
00253 private:
00254 vtkDelaunay3D(const vtkDelaunay3D&);
00255 void operator=(const vtkDelaunay3D&);
00256 };
00257
00258 #endif
00259
00260