VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
30 
31 VTK_ABI_NAMESPACE_BEGIN
32 class vtkProp;
34 
35 class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkPropPicker : public vtkAbstractPropPicker
36 {
37 public:
38  static vtkPropPicker* New();
39 
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
49  int PickProp(double selectionX, double selectionY, vtkRenderer* renderer);
50 
55  int PickProp(
56  double selectionX, double selectionY, vtkRenderer* renderer, vtkPropCollection* pickfrom);
57 
61  int Pick(double selectionX, double selectionY, double selectionZ, vtkRenderer* renderer) override;
62  int Pick(VTK_FUTURE_CONST double selectionPt[3], vtkRenderer* renderer)
63  {
64  return this->Pick(selectionPt[0], selectionPt[1], selectionPt[2], renderer);
65  }
66 
72  int Pick3DPoint(VTK_FUTURE_CONST double selectionPt[3], vtkRenderer* ren) override;
73 
80  int PickProp3DPoint(VTK_FUTURE_CONST double pos[3], vtkRenderer* renderer);
81 
86  int PickProp3DPoint(
87  VTK_FUTURE_CONST double pos[3], vtkRenderer* renderer, vtkPropCollection* pickfrom);
88 
92  virtual int PickProp3DRay(VTK_FUTURE_CONST double selectionPt[3],
93  VTK_FUTURE_CONST double eventWorldOrientation[4], vtkRenderer* renderer,
94  vtkPropCollection* pickfrom);
95 
101  int Pick3DRay(VTK_FUTURE_CONST double selectionPt[3], VTK_FUTURE_CONST double orient[4],
102  vtkRenderer* ren) override;
103 
104 protected:
105  vtkPropPicker();
106  ~vtkPropPicker() override;
107 
108  void Initialize() override;
109 
111 
112  // Used to get x-y-z pick position
114 
115 private:
116  vtkPropPicker(const vtkPropPicker&) = delete;
117  void operator=(const vtkPropPicker&) = delete;
118 };
119 
120 VTK_ABI_NAMESPACE_END
121 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
pick an actor/prop using graphics hardware
Definition: vtkPropPicker.h:35
abstract specification for renderers
Definition: vtkRenderer.h:63
virtual int Pick3DRay(VTK_FUTURE_CONST double[3], VTK_FUTURE_CONST double[4], vtkRenderer *)
Perform pick operation with selection point and orientation 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.
virtual int Pick3DPoint(VTK_FUTURE_CONST double[3], vtkRenderer *)
Perform pick operation with selection point provided.
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.
int Pick(VTK_FUTURE_CONST double selectionPt[3], vtkRenderer *renderer)
Definition: vtkPropPicker.h:62
#define VTK_MARSHALAUTO
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