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

dox/Common/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_COMMON_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 00079 virtual void UnRegister(vtkObjectBase *o); 00080 00084 virtual int GetNetReferenceCount(); 00085 00091 unsigned long GetActualMemorySize(); 00092 00094 00095 void ShallowCopy(vtkDataObject *src); 00096 void DeepCopy(vtkDataObject *src); 00098 00099 protected: 00100 vtkPointSet(); 00101 ~vtkPointSet(); 00102 00103 vtkPoints *Points; 00104 vtkPointLocator *Locator; 00105 00106 private: 00107 vtkPointSet(const vtkPointSet&); // Not implemented. 00108 void operator=(const vtkPointSet&); // Not implemented. 00109 }; 00110 00111 inline vtkIdType vtkPointSet::GetNumberOfPoints() 00112 { 00113 if (this->Points) 00114 { 00115 return this->Points->GetNumberOfPoints(); 00116 } 00117 else 00118 { 00119 return 0; 00120 } 00121 } 00122 00123 00124 #endif 00125 00126