VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkPointSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPointSet.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef __vtkPointSet_h
32 #define __vtkPointSet_h
33 
34 #include "vtkCommonDataModelModule.h" // For export macro
35 #include "vtkDataSet.h"
36 
37 #include "vtkPoints.h" // Needed for inline methods
38 
39 class vtkPointLocator;
40 
41 class VTKCOMMONDATAMODEL_EXPORT vtkPointSet : public vtkDataSet
42 {
43 public:
44  vtkTypeMacro(vtkPointSet,vtkDataSet);
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48  void Initialize();
49 
51  void CopyStructure(vtkDataSet *pd);
52 
54 
55  vtkIdType GetNumberOfPoints();
56  double *GetPoint(vtkIdType ptId) {return this->Points->GetPoint(ptId);};
57  void GetPoint(vtkIdType ptId, double x[3]) {this->Points->GetPoint(ptId,x);};
58  virtual vtkIdType FindPoint(double x[3]);
59  vtkIdType FindPoint(double x, double y, double z) {
60  return this->vtkDataSet::FindPoint(x, y, z);};
61  virtual vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId,
62  double tol2, int& subId, double pcoords[3],
63  double *weights);
64  virtual vtkIdType FindCell(double x[3], vtkCell *cell,
65  vtkGenericCell *gencell, vtkIdType cellId,
66  double tol2, int& subId, double pcoords[3],
67  double *weights);
69 
71  unsigned long GetMTime();
72 
74  void ComputeBounds();
75 
77  void Squeeze();
78 
80 
81  virtual void SetPoints(vtkPoints*);
82  vtkGetObjectMacro(Points,vtkPoints);
84 
90  unsigned long GetActualMemorySize();
91 
93 
94  void ShallowCopy(vtkDataObject *src);
95  void DeepCopy(vtkDataObject *src);
97 
99 
100  virtual void Register(vtkObjectBase* o);
101  virtual void UnRegister(vtkObjectBase* o);
103 
104  //BTX
106 
107  static vtkPointSet* GetData(vtkInformation* info);
108  static vtkPointSet* GetData(vtkInformationVector* v, int i=0);
109  //ETX
111 
112 protected:
113  vtkPointSet();
114  ~vtkPointSet();
115 
117  vtkPointLocator *Locator;
118 
119  virtual void ReportReferences(vtkGarbageCollector*);
120 private:
121 
122  void Cleanup();
123 
124  vtkPointSet(const vtkPointSet&); // Not implemented.
125  void operator=(const vtkPointSet&); // Not implemented.
126 };
127 
129 {
130  if (this->Points)
131  {
132  return this->Points->GetNumberOfPoints();
133  }
134  else
135  {
136  return 0;
137  }
138 }
139 
140 
141 #endif
142 
143 
void GetPoint(vtkIdType ptId, double x[3])
Definition: vtkPointSet.h:57
vtkPointLocator * Locator
Definition: vtkPointSet.h:117
vtkIdType GetNumberOfPoints()
Definition: vtkPoints.h:114
Store vtkAlgorithm input/output information.
vtkIdType GetNumberOfPoints()
Definition: vtkPointSet.h:128
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:41
int vtkIdType
Definition: vtkType.h:268
vtkIdType FindPoint(double x, double y, double z)
Definition: vtkPointSet.h:59
Detect and break reference loops.
provides thread-safe access to cells
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkPoints * Points
Definition: vtkPointSet.h:116
abstract base class for most VTK objects
Definition: vtkObjectBase.h:57
Store zero or more vtkInformation instances.
helper class to get VTK data object types as string and instantiate them
represent and manipulate 3D points
Definition: vtkPoints.h:39
double * GetPoint(vtkIdType ptId)
Definition: vtkPointSet.h:56