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 "vtkCommonDataModelModule.h" // For export macro
35 #include "vtkDataSet.h"
36 
37 #include "vtkPoints.h" // Needed for inline methods
38 
39 class vtkPointLocator;
40 
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 
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 
72 
74  unsigned long GetMTime();
75 
77  void ComputeBounds();
78 
80  void Squeeze();
81 
83 
84  virtual void SetPoints(vtkPoints*);
85  vtkGetObjectMacro(Points,vtkPoints);
87 
93  unsigned long GetActualMemorySize();
94 
96 
97  void ShallowCopy(vtkDataObject *src);
98  void DeepCopy(vtkDataObject *src);
100 
102 
103  virtual void Register(vtkObjectBase* o);
104  virtual void UnRegister(vtkObjectBase* o);
106 
107  //BTX
109 
111  static vtkPointSet* GetData(vtkInformationVector* v, int i=0);
112  //ETX
114 
115 protected:
116  vtkPointSet();
117  ~vtkPointSet();
118 
121 
122  virtual void ReportReferences(vtkGarbageCollector*);
123 private:
124 
125  void Cleanup();
126 
127  vtkPointSet(const vtkPointSet&); // Not implemented.
128  void operator=(const vtkPointSet&); // Not implemented.
129 };
130 
132 {
133  if (this->Points)
134  {
135  return this->Points->GetNumberOfPoints();
136  }
137  else
138  {
139  return 0;
140  }
141 }
142 
143 
144 #endif
145 
146 
void GetPoint(vtkIdType ptId, double x[3])
Definition: vtkPointSet.h:57
unsigned long GetActualMemorySize()
virtual void Register(vtkObjectBase *o)
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:120
vtkIdType GetNumberOfPoints()
Definition: vtkPoints.h:113
quickly locate points in 3-space
Store vtkAlgorithm input/output information.
vtkIdType GetNumberOfPoints()
Definition: vtkPointSet.h:131
virtual vtkIdType GetNumberOfPoints()=0
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
virtual void ComputeBounds()
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:41
int vtkIdType
Definition: vtkType.h:247
virtual void Squeeze()
vtkIdType FindPoint(double x, double y, double z)
Definition: vtkPointSet.h:59
static vtkDataSet * GetData(vtkInformation *info)
Detect and break reference loops.
provides thread-safe access to cells
unsigned long int GetMTime()
abstract class to specify cell behavior
Definition: vtkCell.h:58
void PrintSelf(ostream &os, vtkIndent indent)
virtual void UnRegister(vtkObjectBase *o)
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void ReportReferences(vtkGarbageCollector *)
virtual vtkCellIterator * NewCellIterator()
vtkPoints * Points
Definition: vtkPointSet.h:119
abstract base class for most VTK objects
Definition: vtkObjectBase.h:59
void DeepCopy(vtkDataObject *src)
void Initialize()
virtual void CopyStructure(vtkDataSet *ds)=0
Store zero or more vtkInformation instances.
Efficient cell iterator for vtkDataSet topologies.
general representation of visualization data
Definition: vtkDataObject.h:64
vtkIdType FindPoint(double x, double y, double z)
Definition: vtkDataSet.h:154
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38
void ShallowCopy(vtkDataObject *src)
double * GetPoint(vtkIdType ptId)
Definition: vtkPointSet.h:56