VTK
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 "vtkDataSet.h"
35 
36 #include "vtkPoints.h" // Needed for inline methods
37 
38 class vtkPointLocator;
39 
41 {
42 public:
43  vtkTypeMacro(vtkPointSet,vtkDataSet);
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47  void Initialize();
48 
50  void CopyStructure(vtkDataSet *pd);
51 
53 
55  double *GetPoint(vtkIdType ptId) {return this->Points->GetPoint(ptId);};
56  void GetPoint(vtkIdType ptId, double x[3]) {this->Points->GetPoint(ptId,x);};
57  virtual vtkIdType FindPoint(double x[3]);
58  vtkIdType FindPoint(double x, double y, double z) {
59  return this->vtkDataSet::FindPoint(x, y, z);};
60  virtual vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId,
61  double tol2, int& subId, double pcoords[3],
62  double *weights);
63  virtual vtkIdType FindCell(double x[3], vtkCell *cell,
64  vtkGenericCell *gencell, vtkIdType cellId,
65  double tol2, int& subId, double pcoords[3],
66  double *weights);
68 
70  unsigned long GetMTime();
71 
73  void ComputeBounds();
74 
76  void Squeeze();
77 
79 
80  virtual void SetPoints(vtkPoints*);
81  vtkGetObjectMacro(Points,vtkPoints);
83 
89  unsigned long GetActualMemorySize();
90 
92 
93  void ShallowCopy(vtkDataObject *src);
94  void DeepCopy(vtkDataObject *src);
96 
97  //BTX
99 
100  static vtkPointSet* GetData(vtkInformation* info);
101  static vtkPointSet* GetData(vtkInformationVector* v, int i=0);
102  //ETX
104 
105 protected:
106  vtkPointSet();
107  ~vtkPointSet();
108 
110  vtkPointLocator *Locator;
111 
112  virtual void ReportReferences(vtkGarbageCollector*);
113 private:
114 
115  void Cleanup();
116 
117  vtkPointSet(const vtkPointSet&); // Not implemented.
118  void operator=(const vtkPointSet&); // Not implemented.
119 };
120 
122 {
123  if (this->Points)
124  {
125  return this->Points->GetNumberOfPoints();
126  }
127  else
128  {
129  return 0;
130  }
131 }
132 
133 
134 #endif
135 
136 
void GetPoint(vtkIdType ptId, double x[3])
Definition: vtkPointSet.h:56
unsigned long GetActualMemorySize()
virtual vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)=0
vtkPointLocator * Locator
Definition: vtkPointSet.h:110
vtkIdType GetNumberOfPoints()
Definition: vtkPoints.h:113
Store vtkAlgorithm input/output information.
#define VTK_FILTERING_EXPORT
vtkIdType GetNumberOfPoints()
Definition: vtkPointSet.h:121
virtual vtkIdType GetNumberOfPoints()=0
abstract class to specify dataset behavior
Definition: vtkDataSet.h:58
virtual void ComputeBounds()
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:40
int vtkIdType
Definition: vtkType.h:255
virtual void Squeeze()
vtkIdType FindPoint(double x, double y, double z)
Definition: vtkPointSet.h:58
static vtkDataSet * GetData(vtkInformation *info)
Detect and break reference loops.
provides thread-safe access to cells
unsigned long int GetMTime()
void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
vtkPoints * Points
Definition: vtkPointSet.h:109
void DeepCopy(vtkDataObject *src)
void Initialize()
virtual void CopyStructure(vtkDataSet *ds)=0
Store zero or more vtkInformation instances.
helper class to get VTK data object types as string and instantiate them
vtkIdType FindPoint(double x, double y, double z)
Definition: vtkDataSet.h:148
represent and manipulate 3D points
Definition: vtkPoints.h:38
void ShallowCopy(vtkDataObject *src)
double * GetPoint(vtkIdType ptId)
Definition: vtkPointSet.h:55