VTK  9.3.0
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
33 #ifndef vtkPointPicker_h
34 #define vtkPointPicker_h
35 
36 #include "vtkPicker.h"
37 #include "vtkRenderingCoreModule.h" // For export macro
38 
39 VTK_ABI_NAMESPACE_BEGIN
40 class vtkDataSet;
41 
42 class VTKRENDERINGCORE_EXPORT vtkPointPicker : public vtkPicker
43 {
44 public:
46 
49  static vtkPointPicker* New();
50  vtkTypeMacro(vtkPointPicker, vtkPicker);
51  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55 
58  vtkGetMacro(PointId, vtkIdType);
60 
62 
66  vtkSetMacro(UseCells, vtkTypeBool);
67  vtkGetMacro(UseCells, vtkTypeBool);
68  vtkBooleanMacro(UseCells, vtkTypeBool);
70 
71 protected:
73  ~vtkPointPicker() override = default;
74 
75  vtkIdType PointId; // picked point
76  vtkTypeBool UseCells; // Use cell points vs. points directly
77 
78  double IntersectWithLine(const double p1[3], const double p2[3], double tol,
79  vtkAssemblyPath* path, vtkProp3D* p, vtkAbstractMapper3D* m) override;
80  void Initialize() override;
81 
82  vtkIdType IntersectDataSetWithLine(const double p1[3], double ray[3], double rayFactor,
83  double tol, vtkDataSet* dataSet, double& tMin, double minXYZ[3]);
84 
85 private:
86  vtkPointPicker(const vtkPointPicker&) = delete;
87  void operator=(const vtkPointPicker&) = delete;
88 };
89 
90 VTK_ABI_NAMESPACE_END
91 #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:62
a simple class to control print indentation
Definition: vtkIndent.h:38
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:48
int vtkTypeBool
Definition: vtkABI.h:64
int vtkIdType
Definition: vtkType.h:315