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