forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkPropPicker3D.h
86 lines (69 loc) · 2.74 KB
/
vtkPropPicker3D.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*=========================================================================
Program: Visualization Toolkit
Module: vtkPropPicker3D.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkPropPicker3D
* @brief pick an actor/prop given XYZ coordinates
*
* vtkPropPicker3D is used to pick an actor/prop given a selection
* point in world coordinates.
* This class determines the actor/prop and pick position in world
* coordinates; point and cell ids are not determined.
* This is useful for VRE devices that provide 3D positions
* directly via the vtkRenderWindowInteractor3D. It is the default
* picker for the vtkInteractorStyle3D
*
* @sa
* vtkPicker vtkRenderWindowInteractor3D vtkInteractorStyle3D
*/
#ifndef vtkPropPicker3D_h
#define vtkPropPicker3D_h
#include "vtkRenderingCoreModule.h" // For export macro
#include "vtkAbstractPropPicker.h"
class vtkProp;
class VTKRENDERINGCORE_EXPORT vtkPropPicker3D : public vtkAbstractPropPicker
{
public:
static vtkPropPicker3D *New();
vtkTypeMacro(vtkPropPicker3D, vtkAbstractPropPicker);
void PrintSelf(ostream& os, vtkIndent indent);
/**
* Perform the pick and set the PickedProp ivar. If something is picked, a
* 1 is returned, otherwise 0 is returned. Use the GetViewProp() method
* to get the instance of vtkProp that was picked. Props are picked from
* the renderers list of pickable Props.
*/
int PickProp(double selectionX, double selectionY,
double selectionZ, vtkRenderer *renderer);
/**
* Perform a pick from the user-provided list of vtkProps and not from the
* list of vtkProps that the render maintains.
*/
int PickProp(double selectionX, double selectionY,
double selectionZ, vtkRenderer *renderer,
vtkPropCollection* pickfrom);
/**
* Overide superclasses' Pick() method.
*/
int Pick(double selectionX, double selectionY, double selectionZ,
vtkRenderer *renderer);
int Pick(double selectionPt[3], vtkRenderer *renderer)
{ return this->Pick( selectionPt[0],
selectionPt[1], selectionPt[2], renderer); }
protected:
vtkPropPicker3D();
~vtkPropPicker3D();
void Initialize();
vtkPropCollection* PickFromProps;
private:
vtkPropPicker3D(const vtkPropPicker3D&) VTK_DELETE_FUNCTION; // Not implemented.
void operator=(const vtkPropPicker3D&) VTK_DELETE_FUNCTION; // Not implemented.
};
#endif