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

vtkDelaunay3D.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDelaunay3D.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00096 #ifndef __vtkDelaunay3D_h
00097 #define __vtkDelaunay3D_h
00098 
00099 #include "vtkUnstructuredGridAlgorithm.h"
00100 
00101 class vtkIdList;
00102 class vtkPointLocator;
00103 class vtkPointSet;
00104 class vtkPoints;
00105 class vtkTetraArray;
00106 
00107 class VTK_GRAPHICS_EXPORT vtkDelaunay3D : public vtkUnstructuredGridAlgorithm
00108 {
00109 public:
00110   vtkTypeRevisionMacro(vtkDelaunay3D,vtkUnstructuredGridAlgorithm);
00111   void PrintSelf(ostream& os, vtkIndent indent);
00112 
00115   static vtkDelaunay3D *New();
00116 
00118 
00122   vtkSetClampMacro(Alpha,double,0.0,VTK_DOUBLE_MAX);
00123   vtkGetMacro(Alpha,double);
00125 
00127 
00130   vtkSetClampMacro(Tolerance,double,0.0,1.0);
00131   vtkGetMacro(Tolerance,double);
00133 
00135 
00137   vtkSetClampMacro(Offset,double,2.5,VTK_DOUBLE_MAX);
00138   vtkGetMacro(Offset,double);
00140 
00142 
00146   vtkSetMacro(BoundingTriangulation,int);
00147   vtkGetMacro(BoundingTriangulation,int);
00148   vtkBooleanMacro(BoundingTriangulation,int);
00150 
00152 
00154   void SetLocator(vtkPointLocator *locator);
00155   vtkGetObjectMacro(Locator,vtkPointLocator);
00157 
00160   void CreateDefaultLocator();
00161 
00163 
00173   vtkUnstructuredGrid *InitPointInsertion(double center[3], double length, 
00174                                           vtkIdType numPts, vtkPoints* &pts);
00176 
00178 
00187   void InsertPoint(vtkUnstructuredGrid *Mesh, vtkPoints *points,
00188                    vtkIdType id, double x[3], vtkIdList *holeTetras);
00190 
00195   void EndPointInsertion();
00196 
00198   unsigned long GetMTime();
00199 
00200 protected:
00201   vtkDelaunay3D();
00202   ~vtkDelaunay3D();
00203 
00204   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00205 
00206   double Alpha;
00207   double Tolerance;
00208   int BoundingTriangulation;
00209   double Offset;
00210 
00211   vtkPointLocator *Locator;  //help locate points faster
00212   
00213   vtkTetraArray *TetraArray; //used to keep track of circumspheres/neighbors
00214   int FindTetra(vtkUnstructuredGrid *Mesh, double x[3], vtkIdType tetId,
00215                 int depth);
00216   int InSphere(double x[3], vtkIdType tetraId);
00217   void InsertTetra(vtkUnstructuredGrid *Mesh, vtkPoints *pts,
00218                    vtkIdType tetraId);
00219 
00220   int NumberOfDuplicatePoints; //keep track of bad data
00221   int NumberOfDegeneracies;
00222 
00223   // Keep track of number of references to points to avoid new/delete calls
00224   int *References;
00225 
00226   vtkIdType FindEnclosingFaces(double x[3], vtkUnstructuredGrid *Mesh,
00227                                vtkIdList *tetras, vtkIdList *faces, 
00228                                vtkPointLocator *Locator);
00229 
00230   virtual int FillInputPortInformation(int, vtkInformation*);
00231 private: //members added for performance
00232   vtkIdList *Tetras; //used in InsertPoint
00233   vtkIdList *Faces;  //used in InsertPoint
00234   vtkIdList *BoundaryPts; //used by InsertPoint
00235   vtkIdList *CheckedTetras; //used by InsertPoint
00236   vtkIdList *NeiTetras; //used by InsertPoint
00237 
00238 private:
00239   vtkDelaunay3D(const vtkDelaunay3D&);  // Not implemented.
00240   void operator=(const vtkDelaunay3D&);  // Not implemented.
00241 };
00242 
00243 #endif
00244 
00245 

Generated on Mon Jan 21 23:07:24 2008 for VTK by  doxygen 1.4.3-20050530