VTK  9.1.0
vtkPropPicker.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPropPicker.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
109 #ifndef vtkPropPicker_h
110 #define vtkPropPicker_h
111 
112 #include "vtkAbstractPropPicker.h"
113 #include "vtkRenderingCoreModule.h" // For export macro
114 
115 class vtkProp;
116 class vtkWorldPointPicker;
117 
118 class VTKRENDERINGCORE_EXPORT vtkPropPicker : public vtkAbstractPropPicker
119 {
120 public:
121  static vtkPropPicker* New();
122 
124  void PrintSelf(ostream& os, vtkIndent indent) override;
125 
132  int PickProp(double selectionX, double selectionY, vtkRenderer* renderer);
133 
138  int PickProp(
139  double selectionX, double selectionY, vtkRenderer* renderer, vtkPropCollection* pickfrom);
140 
144  int Pick(double selectionX, double selectionY, double selectionZ, vtkRenderer* renderer) override;
145  int Pick(double selectionPt[3], vtkRenderer* renderer)
146  {
147  return this->Pick(selectionPt[0], selectionPt[1], selectionPt[2], renderer);
148  }
149 
155  int Pick3DPoint(double selectionPt[3], vtkRenderer* ren) override;
156 
163  int PickProp3DPoint(double pos[3], vtkRenderer* renderer);
164 
169  int PickProp3DPoint(double pos[3], vtkRenderer* renderer, vtkPropCollection* pickfrom);
170 
174  virtual int PickProp3DRay(double selectionPt[3], double eventWorldOrientation[4],
175  vtkRenderer* renderer, vtkPropCollection* pickfrom);
176 
182  int Pick3DRay(double selectionPt[3], double orient[4], vtkRenderer* ren) override;
183 
184 protected:
186  ~vtkPropPicker() override;
187 
188  void Initialize() override;
189 
191 
192  // Used to get x-y-z pick position
194 
195 private:
196  vtkPropPicker(const vtkPropPicker&) = delete;
197  void operator=(const vtkPropPicker&) = delete;
198 };
199 
200 #endif
virtual int Pick(double selectionX, double selectionY, double selectionZ, vtkRenderer *renderer)=0
Perform pick operation with selection point provided.
abstract API for pickers that can pick an instance of vtkProp
a simple class to control print indentation
Definition: vtkIndent.h:113
an ordered list of Props
pick an actor/prop using graphics hardware
void Initialize() override
int PickProp(double selectionX, double selectionY, vtkRenderer *renderer)
Perform the pick and set the PickedProp ivar.
~vtkPropPicker() override
int PickProp3DPoint(double pos[3], vtkRenderer *renderer)
Perform the pick and set the PickedProp ivar.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkPropPicker * New()
virtual int PickProp3DRay(double selectionPt[3], double eventWorldOrientation[4], vtkRenderer *renderer, vtkPropCollection *pickfrom)
Perform a pick from the user-provided list of vtkProps.
int Pick3DRay(double selectionPt[3], double orient[4], vtkRenderer *ren) override
Perform pick operation with selection point provided.
vtkWorldPointPicker * WorldPointPicker
int PickProp(double selectionX, double selectionY, vtkRenderer *renderer, vtkPropCollection *pickfrom)
Perform a pick from the user-provided list of vtkProps and not from the list of vtkProps that the ren...
vtkPropCollection * PickFromProps
int Pick(double selectionX, double selectionY, double selectionZ, vtkRenderer *renderer) override
override superclasses' Pick() method.
int Pick(double selectionPt[3], vtkRenderer *renderer)
int PickProp3DPoint(double pos[3], vtkRenderer *renderer, vtkPropCollection *pickfrom)
Perform a pick from the user-provided list of vtkProps and not from the list of vtkProps that the ren...
int Pick3DPoint(double selectionPt[3], vtkRenderer *ren) override
Perform pick operation with selection point provided.
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:67
abstract specification for renderers
Definition: vtkRenderer.h:173
find world x,y,z corresponding to display x,y,z