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 =========================================================================*/
34 #ifndef vtkPointSet_h
35 #define vtkPointSet_h
36 
37 #include "vtkCommonDataModelModule.h" // For export macro
38 #include "vtkDataSet.h"
39 
40 #include "vtkPoints.h" // Needed for inline methods
41 
42 class vtkPointLocator;
43 
45 {
46 public:
47  vtkTypeMacro(vtkPointSet,vtkDataSet);
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
51  void Initialize();
52 
54  void CopyStructure(vtkDataSet *pd);
55 
57 
59  double *GetPoint(vtkIdType ptId) {return this->Points->GetPoint(ptId);};
60  void GetPoint(vtkIdType ptId, double x[3]) {this->Points->GetPoint(ptId,x);};
61  virtual vtkIdType FindPoint(double x[3]);
62  vtkIdType FindPoint(double x, double y, double z) {
63  return this->vtkDataSet::FindPoint(x, y, z);};
64  virtual vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId,
65  double tol2, int& subId, double pcoords[3],
66  double *weights);
67  virtual vtkIdType FindCell(double x[3], vtkCell *cell,
68  vtkGenericCell *gencell, vtkIdType cellId,
69  double tol2, int& subId, double pcoords[3],
70  double *weights);
72 
75 
77  unsigned long GetMTime();
78 
80  void ComputeBounds();
81 
83  void Squeeze();
84 
86 
87  virtual void SetPoints(vtkPoints*);
88  vtkGetObjectMacro(Points,vtkPoints);
90 
96  unsigned long GetActualMemorySize();
97 
99 
100  void ShallowCopy(vtkDataObject *src);
101  void DeepCopy(vtkDataObject *src);
103 
105 
106  virtual void Register(vtkObjectBase* o);
107  virtual void UnRegister(vtkObjectBase* o);
109 
110  //BTX
112 
114  static vtkPointSet* GetData(vtkInformationVector* v, int i=0);
115  //ETX
117 
118 protected:
119  vtkPointSet();
120  ~vtkPointSet();
121 
124 
125  virtual void ReportReferences(vtkGarbageCollector*);
126 private:
127 
128  void Cleanup();
129 
130  vtkPointSet(const vtkPointSet&); // Not implemented.
131  void operator=(const vtkPointSet&); // Not implemented.
132 };
133 
135 {
136  if (this->Points)
137  {
138  return this->Points->GetNumberOfPoints();
139  }
140  else
141  {
142  return 0;
143  }
144 }
145 
146 
147 #endif
148 
149 
void GetPoint(vtkIdType ptId, double x[3])
Definition: vtkPointSet.h:60
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:123
vtkIdType GetNumberOfPoints()
Definition: vtkPoints.h:113
quickly locate points in 3-space
Store vtkAlgorithm input/output information.
vtkIdType GetNumberOfPoints()
Definition: vtkPointSet.h:134
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:44
int vtkIdType
Definition: vtkType.h:275
virtual void Squeeze()
vtkIdType FindPoint(double x, double y, double z)
Definition: vtkPointSet.h:62
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:61
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:122
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:59