VTK: Common/DataModel/vtkAbstractPointLocator.h Source File

| VTK 9.3.1

vtkAbstractPointLocator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
21 #ifndef vtkAbstractPointLocator_h
22 #define vtkAbstractPointLocator_h
23
24 #include "vtkCommonDataModelModule.h" // For export macro
25 #include "vtkLocator.h"
26
27 VTK_ABI_NAMESPACE_BEGIN
28 class vtkIdList;
29
30 class VTKCOMMONDATAMODEL_EXPORT vtkAbstractPointLocator : public vtkLocator
31 {
32 public:
34
37 vtkTypeMacro(vtkAbstractPointLocator, vtkLocator);
38 void PrintSelf(ostream& os, vtkIndent indent) override;
40
42
48 virtual vtkIdType FindClosestPoint(const double x[3]) = 0;
49 vtkIdType FindClosestPoint(double x, double y, double z);
51
57 virtual vtkIdType FindClosestPointWithinRadius(
58 double radius, const double x[3], double& dist2) = 0;
59
61
69 virtual void FindClosestNPoints(int N, const double x[3], vtkIdList* result) = 0;
70 void FindClosestNPoints(int N, double x, double y, double z, vtkIdList* result);
72
74
80 virtual void FindPointsWithinRadius(double R, const double x[3], vtkIdList* result) = 0;
81 void FindPointsWithinRadius(double R, double x, double y, double z, vtkIdList* result);
83
85
88 virtual double* GetBounds() { return this->Bounds; }
89 virtual void GetBounds(double*);
91
93
97 vtkGetMacro(NumberOfBuckets, vtkIdType);
99
100 protected:
101 vtkAbstractPointLocator();
102 ~vtkAbstractPointLocator() override;
103
104 double Bounds[6]; // bounds of points
105 vtkIdType NumberOfBuckets; // total size of locator
106
107 private:
108 vtkAbstractPointLocator(const vtkAbstractPointLocator&) = delete;
109 void operator=(const vtkAbstractPointLocator&) = delete;
110 };
111
112 VTK_ABI_NAMESPACE_END
113 #endif
vtkAbstractPointLocator
abstract class to quickly locate points in 3-space
Definition: vtkAbstractPointLocator.h:31
vtkAbstractPointLocator::~vtkAbstractPointLocator
~vtkAbstractPointLocator() override
vtkAbstractPointLocator::GetBounds
virtual void GetBounds(double *)
Provide an accessor to the bounds.
vtkAbstractPointLocator::FindPointsWithinRadius
virtual void FindPointsWithinRadius(double R, const double x[3], vtkIdList *result)=0
Find all points within a specified radius R of position x.
vtkAbstractPointLocator::FindClosestPoint
virtual vtkIdType FindClosestPoint(const double x[3])=0
Given a position x, return the id of the point closest to it.
vtkAbstractPointLocator::vtkAbstractPointLocator
vtkAbstractPointLocator()
vtkAbstractPointLocator::GetBounds
virtual double * GetBounds()
Provide an accessor to the bounds.
Definition: vtkAbstractPointLocator.h:88
vtkAbstractPointLocator::FindClosestPoint
vtkIdType FindClosestPoint(double x, double y, double z)
Given a position x, return the id of the point closest to it.
vtkAbstractPointLocator::FindClosestNPoints
virtual void FindClosestNPoints(int N, const double x[3], vtkIdList *result)=0
Find the closest N points to a position.
vtkAbstractPointLocator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard type and print methods.
vtkAbstractPointLocator::NumberOfBuckets
vtkIdType NumberOfBuckets
Definition: vtkAbstractPointLocator.h:105
vtkAbstractPointLocator::FindPointsWithinRadius
void FindPointsWithinRadius(double R, double x, double y, double z, vtkIdList *result)
Find all points within a specified radius R of position x.
vtkAbstractPointLocator::FindClosestNPoints
void FindClosestNPoints(int N, double x, double y, double z, vtkIdList *result)
Find the closest N points to a position.
vtkAbstractPointLocator::FindClosestPointWithinRadius
virtual vtkIdType FindClosestPointWithinRadius(double radius, const double x[3], double &dist2)=0
Given a position x and a radius r, return the id of the point closest to the point in that radius.
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:32
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkLocator
abstract base class for objects that accelerate spatial searches
Definition: vtkLocator.h:68
vtkX3D::radius
@ radius
Definition: vtkX3D.h:252
vtkLocator.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315