Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Graphics/vtkDelaunay3D.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkDelaunay3D.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 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; //help locate points faster 00220 00221 vtkTetraArray *TetraArray; //used to keep track of circumspheres/neighbors 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; //keep track of bad data 00229 int NumberOfDegeneracies; 00230 00231 // Keep track of number of references to points to avoid new/delete calls 00232 int *References; 00233 00234 vtkIdType FindEnclosingFaces(float x[3], vtkUnstructuredGrid *Mesh, 00235 vtkIdList *tetras, vtkIdList *faces, 00236 vtkPointLocator *Locator); 00237 00238 private: //members added for performance 00239 vtkIdList *Tetras; //used in InsertPoint 00240 vtkIdList *Faces; //used in InsertPoint 00241 vtkIdList *BoundaryPts; //used by InsertPoint 00242 vtkIdList *CheckedTetras; //used by InsertPoint 00243 vtkIdList *NeiTetras; //used by InsertPoint 00244 00245 private: 00246 vtkDelaunay3D(const vtkDelaunay3D&); // Not implemented. 00247 void operator=(const vtkDelaunay3D&); // Not implemented. 00248 }; 00249 00250 #endif 00251 00252