VTK  9.3.1
vtkPropPicker.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 vtkPropPicker_h
25 #define vtkPropPicker_h
26 
27 #include "vtkAbstractPropPicker.h"
28 #include "vtkRenderingCoreModule.h" // For export macro
29 
30 VTK_ABI_NAMESPACE_BEGIN
31 class vtkProp;
33 
34 class VTKRENDERINGCORE_EXPORT vtkPropPicker : public vtkAbstractPropPicker
35 {
36 public:
37  static vtkPropPicker* New();
38 
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
48  int PickProp(double selectionX, double selectionY, vtkRenderer* renderer);
49 
54  int PickProp(
55  double selectionX, double selectionY, vtkRenderer* renderer, vtkPropCollection* pickfrom);
56 
60  int Pick(double selectionX, double selectionY, double selectionZ, vtkRenderer* renderer) override;
61  int Pick(double selectionPt[3], vtkRenderer* renderer)
62  {
63  return this->Pick(selectionPt[0], selectionPt[1], selectionPt[2], renderer);
64  }
65 
71  int Pick3DPoint(double selectionPt[3], vtkRenderer* ren) override;
72 
79  int PickProp3DPoint(double pos[3], vtkRenderer* renderer);
80 
85  int PickProp3DPoint(double pos[3], vtkRenderer* renderer, vtkPropCollection* pickfrom);
86 
90  virtual int PickProp3DRay(double selectionPt[3], double eventWorldOrientation[4],
91  vtkRenderer* renderer, vtkPropCollection* pickfrom);
92 
98  int Pick3DRay(double selectionPt[3], double orient[4], vtkRenderer* ren) override;
99 
100 protected:
101  vtkPropPicker();
102  ~vtkPropPicker() override;
103 
104  void Initialize() override;
105 
107 
108  // Used to get x-y-z pick position
110 
111 private:
112  vtkPropPicker(const vtkPropPicker&) = delete;
113  void operator=(const vtkPropPicker&) = delete;
114 };
115 
116 VTK_ABI_NAMESPACE_END
117 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:45
pick an actor/prop using graphics hardware
Definition: vtkPropPicker.h:34
abstract specification for renderers
Definition: vtkRenderer.h:61
virtual int Pick3DPoint(double[3], vtkRenderer *)
Perform pick operation with selection point provided.
void Initialize() override
an ordered list of Props
vtkPropCollection * PickFromProps
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int Pick(double selectionPt[3], vtkRenderer *renderer)
Definition: vtkPropPicker.h:61
abstract API for pickers that can pick an instance of vtkProp
virtual int Pick(double selectionX, double selectionY, double selectionZ, vtkRenderer *renderer)=0
Perform pick operation with selection point provided.
virtual int Pick3DRay(double[3], double[4], vtkRenderer *)
Perform pick operation with selection point and orientation provided.
vtkWorldPointPicker * WorldPointPicker
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
find world x,y,z corresponding to display x,y,z