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