Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 =========================================================================*/
00028 #ifndef __vtkPointSet_h
00029 #define __vtkPointSet_h
00030 
00031 #include "vtkDataSet.h"
00032 
00033 #include "vtkPoints.h" // Needed for inline methods
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   //BTX
00093 
00094   static vtkPointSet* GetData(vtkInformation* info);
00095   static vtkPointSet* GetData(vtkInformationVector* v, int i=0);
00096   //ETX
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&);  // Not implemented.
00109   void operator=(const vtkPointSet&);  // Not implemented.
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 

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