Graphics/vtkDelaunay3D.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00094 #ifndef __vtkDelaunay3D_h
00095 #define __vtkDelaunay3D_h
00096
00097 #include "vtkUnstructuredGridSource.h"
00098
00099 class vtkIdList;
00100 class vtkPointLocator;
00101 class vtkPointSet;
00102 class vtkPoints;
00103 class vtkTetraArray;
00104
00105 class VTK_GRAPHICS_EXPORT vtkDelaunay3D : public vtkUnstructuredGridSource
00106 {
00107 public:
00108 vtkTypeRevisionMacro(vtkDelaunay3D,vtkUnstructuredGridSource);
00109 void PrintSelf(ostream& os, vtkIndent indent);
00110
00113 static vtkDelaunay3D *New();
00114
00116
00120 vtkSetClampMacro(Alpha,double,0.0,VTK_DOUBLE_MAX);
00121 vtkGetMacro(Alpha,double);
00123
00125
00128 vtkSetClampMacro(Tolerance,double,0.0,1.0);
00129 vtkGetMacro(Tolerance,double);
00131
00133
00135 vtkSetClampMacro(Offset,double,2.5,VTK_DOUBLE_MAX);
00136 vtkGetMacro(Offset,double);
00138
00140
00144 vtkSetMacro(BoundingTriangulation,int);
00145 vtkGetMacro(BoundingTriangulation,int);
00146 vtkBooleanMacro(BoundingTriangulation,int);
00148
00150
00152 void SetLocator(vtkPointLocator *locator);
00153 vtkGetObjectMacro(Locator,vtkPointLocator);
00155
00158 void CreateDefaultLocator();
00159
00161
00171 vtkUnstructuredGrid *InitPointInsertion(double center[3], double length,
00172 vtkIdType numPts, vtkPoints* &pts);
00174
00176
00185 void InsertPoint(vtkUnstructuredGrid *Mesh, vtkPoints *points,
00186 vtkIdType id, double x[3], vtkIdList *holeTetras);
00188
00193 void EndPointInsertion();
00194
00196 unsigned long GetMTime();
00197
00199
00200 virtual void SetInput(vtkPointSet *input);
00201 vtkPointSet *GetInput();
00203
00204 protected:
00205 vtkDelaunay3D();
00206 ~vtkDelaunay3D();
00207
00208 void Execute();
00209
00210 double Alpha;
00211 double Tolerance;
00212 int BoundingTriangulation;
00213 double Offset;
00214
00215 vtkPointLocator *Locator;
00216
00217 vtkTetraArray *TetraArray;
00218 int FindTetra(vtkUnstructuredGrid *Mesh, double x[3], vtkIdType tetId,
00219 int depth);
00220 int InSphere(double x[3], vtkIdType tetraId);
00221 void InsertTetra(vtkUnstructuredGrid *Mesh, vtkPoints *pts,
00222 vtkIdType tetraId);
00223
00224 int NumberOfDuplicatePoints;
00225 int NumberOfDegeneracies;
00226
00227
00228 int *References;
00229
00230 vtkIdType FindEnclosingFaces(double x[3], vtkUnstructuredGrid *Mesh,
00231 vtkIdList *tetras, vtkIdList *faces,
00232 vtkPointLocator *Locator);
00233
00234 private:
00235 vtkIdList *Tetras;
00236 vtkIdList *Faces;
00237 vtkIdList *BoundaryPts;
00238 vtkIdList *CheckedTetras;
00239 vtkIdList *NeiTetras;
00240
00241 private:
00242 vtkDelaunay3D(const vtkDelaunay3D&);
00243 void operator=(const vtkDelaunay3D&);
00244 };
00245
00246 #endif
00247
00248