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

vtkPointSet.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPointSet.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 =========================================================================*/
00038 #ifndef __vtkPointSet_h
00039 #define __vtkPointSet_h
00040 
00041 #include "vtkDataSet.h"
00042 
00043 #include "vtkPoints.h" // Needed for inline methods
00044 
00045 class vtkPointLocator;
00046 
00047 class VTK_FILTERING_EXPORT vtkPointSet : public vtkDataSet
00048 {
00049 public:
00050   vtkTypeRevisionMacro(vtkPointSet,vtkDataSet);
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054   void Initialize();
00055 
00057   void CopyStructure(vtkDataSet *pd);
00058 
00060 
00061   vtkIdType GetNumberOfPoints();
00062   double *GetPoint(vtkIdType ptId) {return this->Points->GetPoint(ptId);};
00063   void GetPoint(vtkIdType ptId, double x[3]) {this->Points->GetPoint(ptId,x);};
00064   vtkIdType FindPoint(double x[3]);
00065   vtkIdType FindPoint(double x, double y, double z) { return this->vtkDataSet::FindPoint(x, y, z);};
00066   vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2,
00067                int& subId, double pcoords[3], double *weights);
00068   vtkIdType FindCell(double x[3], vtkCell *cell, vtkGenericCell *gencell,
00069                vtkIdType cellId, double tol2, int& subId, 
00070                double pcoords[3], double *weights);
00072 
00074   unsigned long GetMTime();
00075 
00077   void ComputeBounds();
00078   
00080   void Squeeze();
00081 
00083 
00084   virtual void SetPoints(vtkPoints*);
00085   vtkGetObjectMacro(Points,vtkPoints);
00087 
00093   unsigned long GetActualMemorySize();
00094 
00096 
00097   void ShallowCopy(vtkDataObject *src);  
00098   void DeepCopy(vtkDataObject *src);
00100 
00101 protected:
00102   vtkPointSet();
00103   ~vtkPointSet();
00104 
00105   vtkPoints *Points;
00106   vtkPointLocator *Locator;
00107 
00108   virtual void ReportReferences(vtkGarbageCollector*);
00109   virtual void RemoveReferences();
00110 private:
00111   vtkPointSet(const vtkPointSet&);  // Not implemented.
00112   void operator=(const vtkPointSet&);  // Not implemented.
00113 };
00114 
00115 inline vtkIdType vtkPointSet::GetNumberOfPoints()
00116 {
00117   if (this->Points)
00118     {
00119     return this->Points->GetNumberOfPoints();
00120     }
00121   else
00122     {
00123     return 0;
00124     }
00125 }
00126 
00127 
00128 #endif
00129 
00130