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 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00032 #ifndef __vtkPointSet_h 00033 #define __vtkPointSet_h 00034 00035 #include "vtkDataSet.h" 00036 00037 #include "vtkPoints.h" // Needed for inline methods 00038 00039 class vtkPointLocator; 00040 00041 class VTK_COMMON_EXPORT vtkPointSet : public vtkDataSet 00042 { 00043 public: 00044 vtkTypeRevisionMacro(vtkPointSet,vtkDataSet); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 void Initialize(); 00049 00051 void CopyStructure(vtkDataSet *pd); 00052 00054 00055 vtkIdType GetNumberOfPoints(); 00056 float *GetPoint(vtkIdType ptId) {return this->Points->GetPoint(ptId);}; 00057 void GetPoint(vtkIdType ptId, float x[3]) {this->Points->GetPoint(ptId,x);}; 00058 vtkIdType FindPoint(float x[3]); 00059 vtkIdType FindPoint(float x, float y, float z) { return this->vtkDataSet::FindPoint(x, y, z);}; 00060 vtkIdType FindCell(float x[3], vtkCell *cell, vtkIdType cellId, float tol2, 00061 int& subId, float pcoords[3], float *weights); 00062 vtkIdType FindCell(float x[3], vtkCell *cell, vtkGenericCell *gencell, 00063 vtkIdType cellId, float tol2, int& subId, 00064 float pcoords[3], float *weights); 00066 00068 unsigned long GetMTime(); 00069 00071 void ComputeBounds(); 00072 00074 void Squeeze(); 00075 00077 00078 virtual void SetPoints(vtkPoints*); 00079 vtkGetObjectMacro(Points,vtkPoints); 00081 00083 virtual void UnRegister(vtkObjectBase *o); 00084 00088 virtual int GetNetReferenceCount(); 00089 00095 unsigned long GetActualMemorySize(); 00096 00098 00099 void ShallowCopy(vtkDataObject *src); 00100 void DeepCopy(vtkDataObject *src); 00102 00103 protected: 00104 vtkPointSet(); 00105 ~vtkPointSet(); 00106 00107 vtkPoints *Points; 00108 vtkPointLocator *Locator; 00109 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