00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00028 #ifndef __vtkPointSet_h
00029 #define __vtkPointSet_h
00030 
00031 #include "vtkDataSet.h"
00032 
00033 #include "vtkPoints.h" 
00034 
00035 class vtkPointLocator;
00036 
00037 class VTK_FILTERING_EXPORT vtkPointSet : public vtkDataSet
00038 {
00039 public:
00040   vtkTypeRevisionMacro(vtkPointSet,vtkDataSet);
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00044   void Initialize();
00045 
00047   void CopyStructure(vtkDataSet *pd);
00048 
00050 
00051   vtkIdType GetNumberOfPoints();
00052   double *GetPoint(vtkIdType ptId) {return this->Points->GetPoint(ptId);};
00053   void GetPoint(vtkIdType ptId, double x[3]) {this->Points->GetPoint(ptId,x);};
00054   vtkIdType FindPoint(double x[3]);
00055   vtkIdType FindPoint(double x, double y, double z) { return this->vtkDataSet::FindPoint(x, y, z);};
00056   vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2,
00057                int& subId, double pcoords[3], double *weights);
00058   vtkIdType FindCell(double x[3], vtkCell *cell, vtkGenericCell *gencell,
00059                vtkIdType cellId, double tol2, int& subId, 
00060                double pcoords[3], double *weights);
00062 
00064   unsigned long GetMTime();
00065 
00067   void ComputeBounds();
00068   
00070   void Squeeze();
00071 
00073 
00074   virtual void SetPoints(vtkPoints*);
00075   vtkGetObjectMacro(Points,vtkPoints);
00077 
00083   unsigned long GetActualMemorySize();
00084 
00086 
00087   void ShallowCopy(vtkDataObject *src);  
00088   void DeepCopy(vtkDataObject *src);
00090 
00091   
00093 
00094   static vtkPointSet* GetData(vtkInformation* info);
00095   static vtkPointSet* GetData(vtkInformationVector* v, int i=0);
00096   
00098 
00099 protected:
00100   vtkPointSet();
00101   ~vtkPointSet();
00102 
00103   vtkPoints *Points;
00104   vtkPointLocator *Locator;
00105 
00106   virtual void ReportReferences(vtkGarbageCollector*);
00107 private:
00108   vtkPointSet(const vtkPointSet&);  
00109   void operator=(const vtkPointSet&);  
00110 };
00111 
00112 inline vtkIdType vtkPointSet::GetNumberOfPoints()
00113 {
00114   if (this->Points)
00115     {
00116     return this->Points->GetNumberOfPoints();
00117     }
00118   else
00119     {
00120     return 0;
00121     }
00122 }
00123 
00124 
00125 #endif
00126 
00127