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:
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
51  void Initialize();
52 
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*);
90 
96  unsigned long GetActualMemorySize();
97 
99 
103 
105 
106  virtual void Register(vtkObjectBase* o);
107  virtual void UnRegister(vtkObjectBase* o);
109 
110  //BTX
112 
115  //ETX
117 
118 protected:
121 
124 
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 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkgl::z
GLdouble GLdouble z
Definition: vtkgl.h:11754
vtkDataSet::GetNumberOfPoints
virtual vtkIdType GetNumberOfPoints()=0
vtkPointSet::GetPoint
void GetPoint(vtkIdType ptId, double x[3])
Definition: vtkPointSet.h:60
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkPointSet::GetMTime
unsigned long GetMTime()
vtkPointSet::ComputeBounds
void ComputeBounds()
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkPointSet::Locator
vtkPointLocator * Locator
Definition: vtkPointSet.h:123
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkPointLocator
quickly locate points in 3-space
Definition: vtkPointLocator.h:53
vtkPointSet::GetNumberOfPoints
vtkIdType GetNumberOfPoints()
Definition: vtkPointSet.h:134
vtkPointSet::CopyStructure
void CopyStructure(vtkDataSet *pd)
vtkPoints.h
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkPointSet::SetPoints
virtual void SetPoints(vtkPoints *)
vtkgl::v
const GLdouble * v
Definition: vtkgl.h:11595
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkPointSet::FindPoint
vtkIdType FindPoint(double x, double y, double z)
Definition: vtkPointSet.h:62
vtkPointSet::GetData
static vtkPointSet * GetData(vtkInformation *info)
vtkPointSet::Initialize
void Initialize()
vtkPointSet::GetActualMemorySize
unsigned long GetActualMemorySize()
vtkPointSet::Squeeze
void Squeeze()
vtkPointSet::UnRegister
virtual void UnRegister(vtkObjectBase *o)
vtkPoints::GetNumberOfPoints
vtkIdType GetNumberOfPoints()
Definition: vtkPoints.h:113
vtkPointSet::Register
virtual void Register(vtkObjectBase *o)
vtkDataSet::FindPoint
vtkIdType FindPoint(double x, double y, double z)
Definition: vtkDataSet.h:154
vtkPointSet::FindCell
virtual vtkIdType FindCell(double x[3], vtkCell *cell, vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)
vtkObjectBase
abstract base class for most VTK objects
Definition: vtkObjectBase.h:60
vtkgl::src
GLenum src
Definition: vtkgl.h:12525
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkPointSet::vtkPointSet
vtkPointSet()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPointSet::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkPointSet::Points
vtkPoints * Points
Definition: vtkPointSet.h:122
vtkPointSet::NewCellIterator
vtkCellIterator * NewCellIterator()
vtkGarbageCollector
Detect and break reference loops.
Definition: vtkGarbageCollector.h:99
vtkDataSet.h
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkPointSet::~vtkPointSet
~vtkPointSet()
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkgl::y
GLint GLint GLint GLint GLint GLint y
Definition: vtkgl.h:11318
vtkPointSet
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:45
vtkPointSet::DeepCopy
void DeepCopy(vtkDataObject *src)
vtkPointSet::FindCell
virtual vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:42
vtkPointSet::FindPoint
virtual vtkIdType FindPoint(double x[3])
vtkPointSet::ReportReferences
virtual void ReportReferences(vtkGarbageCollector *)
vtkPointSet::ShallowCopy
void ShallowCopy(vtkDataObject *src)
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkCellIterator
Efficient cell iterator for vtkDataSet topologies.
Definition: vtkCellIterator.h:79
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkPointSet::GetPoint
double * GetPoint(vtkIdType ptId)
Definition: vtkPointSet.h:59
vtkPointSet::GetData
static vtkPointSet * GetData(vtkInformationVector *v, int i=0)