VTK  9.3.20240416
vtkPointPicker.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
63 #ifndef vtkPointPicker_h
64 #define vtkPointPicker_h
65 
66 #include "vtkPicker.h"
67 #include "vtkRenderingCoreModule.h" // For export macro
68 
69 VTK_ABI_NAMESPACE_BEGIN
70 class vtkDataSet;
71 
72 class VTKRENDERINGCORE_EXPORT vtkPointPicker : public vtkPicker
73 {
74 public:
76 
79  static vtkPointPicker* New();
80  vtkTypeMacro(vtkPointPicker, vtkPicker);
81  void PrintSelf(ostream& os, vtkIndent indent) override;
83 
85 
88  vtkGetMacro(PointId, vtkIdType);
90 
92 
96  vtkSetMacro(UseCells, vtkTypeBool);
97  vtkGetMacro(UseCells, vtkTypeBool);
98  vtkBooleanMacro(UseCells, vtkTypeBool);
100 
101 protected:
103  ~vtkPointPicker() override = default;
104 
105  vtkIdType PointId; // picked point
106  vtkTypeBool UseCells; // Use cell points vs. points directly
107 
108  double IntersectWithLine(const double p1[3], const double p2[3], double tol,
109  vtkAssemblyPath* path, vtkProp3D* p, vtkAbstractMapper3D* m) override;
110  void Initialize() override;
111 
112  vtkIdType IntersectDataSetWithLine(const double p1[3], double ray[3], double rayFactor,
113  double tol, vtkDataSet* dataSet, double& tMin, double minXYZ[3]);
114 
115 private:
116  vtkPointPicker(const vtkPointPicker&) = delete;
117  void operator=(const vtkPointPicker&) = delete;
118 };
119 
120 VTK_ABI_NAMESPACE_END
121 #endif
abstract class specifies interface to map 3D data
a list of nodes that form an assembly path
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
a simple class to control print indentation
Definition: vtkIndent.h:108
superclass for 3D geometric pickers (uses ray cast)
Definition: vtkPicker.h:51
select a point by shooting a ray into a graphics window
double IntersectWithLine(const double p1[3], const double p2[3], double tol, vtkAssemblyPath *path, vtkProp3D *p, vtkAbstractMapper3D *m) override
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
static vtkPointPicker * New()
Standard methods for instantiation, type information, and printing.
vtkTypeBool UseCells
vtkIdType PointId
~vtkPointPicker() override=default
vtkIdType IntersectDataSetWithLine(const double p1[3], double ray[3], double rayFactor, double tol, vtkDataSet *dataSet, double &tMin, double minXYZ[3])
void Initialize() override
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:89
int vtkTypeBool
Definition: vtkABI.h:64
int vtkIdType
Definition: vtkType.h:315