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=========================================================================*/
32#ifndef vtkPointSet_h
33#define vtkPointSet_h
34
35#include "vtkCommonDataModelModule.h" // For export macro
36#include "vtkDataSet.h"
37
38#include "vtkPoints.h" // Needed for inline methods
39
40class vtkPointLocator;
41
42class VTKCOMMONDATAMODEL_EXPORT vtkPointSet : public vtkDataSet
43{
44public:
45 vtkTypeMacro(vtkPointSet,vtkDataSet);
46 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
47
51 void Initialize() VTK_OVERRIDE;
52
56 void CopyStructure(vtkDataSet *pd) VTK_OVERRIDE;
57
59
62 vtkIdType GetNumberOfPoints() VTK_OVERRIDE;
63 void GetPoint(vtkIdType ptId, double x[3]) VTK_OVERRIDE
64 {this->Points->GetPoint(ptId,x);};
65 vtkIdType FindPoint(double x[3]) VTK_OVERRIDE;
66 vtkIdType FindPoint(double x, double y, double z) {
67 return this->vtkDataSet::FindPoint(x, y, z);};
68 vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId,
69 double tol2, int& subId, double pcoords[3],
70 double *weights) VTK_OVERRIDE;
71 vtkIdType FindCell(double x[3], vtkCell *cell,
72 vtkGenericCell *gencell, vtkIdType cellId,
73 double tol2, int& subId, double pcoords[3],
74 double *weights) VTK_OVERRIDE;
76
83 double *GetPoint(vtkIdType ptId) VTK_OVERRIDE
84 {return this->Points->GetPoint(ptId);};
85
90
94 vtkMTimeType GetMTime() VTK_OVERRIDE;
95
99 void ComputeBounds() VTK_OVERRIDE;
100
104 void Squeeze() VTK_OVERRIDE;
105
107
110 virtual void SetPoints(vtkPoints*);
111 vtkGetObjectMacro(Points,vtkPoints);
113
122 unsigned long GetActualMemorySize() VTK_OVERRIDE;
123
125
128 void ShallowCopy(vtkDataObject *src) VTK_OVERRIDE;
129 void DeepCopy(vtkDataObject *src) VTK_OVERRIDE;
131
133
136 void Register(vtkObjectBase* o) VTK_OVERRIDE;
137 void UnRegister(vtkObjectBase* o) VTK_OVERRIDE;
139
141
144 static vtkPointSet* GetData(vtkInformation* info);
145 static vtkPointSet* GetData(vtkInformationVector* v, int i=0);
147
148protected:
150 ~vtkPointSet() VTK_OVERRIDE;
151
152 vtkPoints *Points;
154
155 void ReportReferences(vtkGarbageCollector*) VTK_OVERRIDE;
156private:
157
158 void Cleanup();
159
160 vtkPointSet(const vtkPointSet&) VTK_DELETE_FUNCTION;
161 void operator=(const vtkPointSet&) VTK_DELETE_FUNCTION;
162};
163
164inline vtkIdType vtkPointSet::GetNumberOfPoints()
165{
166 if (this->Points)
167 {
168 return this->Points->GetNumberOfPoints();
169 }
170 else
171 {
172 return 0;
173 }
174}
175
176
177#endif
178
179
void GetPoint(const int i, const int j, const int k, double pnt[3])
Efficient cell iterator for vtkDataSet topologies.
abstract class to specify cell behavior
Definition: vtkCell.h:60
general representation of visualization data
Definition: vtkDataObject.h:65
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
vtkIdType FindPoint(double x, double y, double z)
Locate the closest point to the global coordinate x.
Definition: vtkDataSet.h:192
Detect and break reference loops.
provides thread-safe access to cells
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition: vtkObjectBase.h:66
quickly locate points in 3-space
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:43
void Initialize() override
Reset to an empty state and free any memory.
vtkIdType FindPoint(double x, double y, double z)
Definition: vtkPointSet.h:66
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCellIterator * NewCellIterator() override
Return an iterator that traverses the cells in this data set.
vtkIdType FindPoint(double x[3]) override
vtkIdType FindCell(double x[3], vtkCell *cell, vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
This is a version of the above method that can be used with multithreaded applications.
vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Locate cell based on global coordinate x and tolerance squared.
vtkIdType GetNumberOfPoints() override
See vtkDataSet for additional information.
Definition: vtkPointSet.h:164
double * GetPoint(vtkIdType ptId) override
See vtkDataSet for additional information.
Definition: vtkPointSet.h:83
represent and manipulate 3D points
Definition: vtkPoints.h:40
@ info
Definition: vtkX3D.h:376
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248