VTK  9.7.1
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
27 #ifndef vtkPointPicker_h
28 #define vtkPointPicker_h
29 
30 #include "vtkPicker.h"
31 #include "vtkRenderingCoreModule.h" // For export macro
32 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
33 
34 VTK_ABI_NAMESPACE_BEGIN
35 class vtkDataSet;
36 
37 class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkPointPicker : public vtkPicker
38 {
39 public:
41 
44  static vtkPointPicker* New();
45  vtkTypeMacro(vtkPointPicker, vtkPicker);
46  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
53  vtkGetMacro(PointId, vtkIdType);
55 
57 
61  vtkSetMacro(UseCells, vtkTypeBool);
62  vtkGetMacro(UseCells, vtkTypeBool);
63  vtkBooleanMacro(UseCells, vtkTypeBool);
65 
66 protected:
68  ~vtkPointPicker() override = default;
69 
70  vtkIdType PointId; // picked point
71  vtkTypeBool UseCells; // Use cell points vs. points directly
72 
73  double IntersectWithLine(const double p1[3], const double p2[3], double tol,
74  vtkAssemblyPath* path, vtkProp3D* p, vtkAbstractMapper3D* m) override;
75  void Initialize() override;
76 
77  vtkIdType IntersectDataSetWithLine(const double p1[3], double ray[3], double rayFactor,
78  double tol, vtkDataSet* dataSet, double& tMin, double minXYZ[3]);
79 
80 private:
81  vtkPointPicker(const vtkPointPicker&) = delete;
82  void operator=(const vtkPointPicker&) = delete;
83 };
84 
85 VTK_ABI_NAMESPACE_END
86 #endif
vtkTypeBool UseCells
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
virtual double IntersectWithLine(const double p1[3], const double p2[3], double tol, vtkAssemblyPath *path, vtkProp3D *p, vtkAbstractMapper3D *m)
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:39
int vtkIdType
Definition: vtkType.h:363
vtkIdType PointId
superclass for 3D geometric pickers (uses ray cast)
Definition: vtkPicker.h:52
int vtkTypeBool
Definition: vtkABI.h:64
a list of nodes that form an assembly path
a simple class to control print indentation
Definition: vtkIndent.h:28
static vtkPicker * New()
abstract class specifies interface to map 3D data
void Initialize() override
select a point by shooting a ray into a graphics window
#define VTK_MARSHALAUTO