VTK  9.0.3
vtkAbstractPropPicker.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAbstractPropPicker.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 =========================================================================*/
64 #ifndef vtkAbstractPropPicker_h
65 #define vtkAbstractPropPicker_h
66 
67 #include "vtkAbstractPicker.h"
68 #include "vtkRenderingCoreModule.h" // For export macro
69 
70 class vtkProp;
71 class vtkPropAssembly;
72 class vtkAssembly;
73 class vtkActor;
74 class vtkVolume;
75 class vtkProp3D;
76 class vtkAssemblyPath;
77 class vtkActor2D;
78 
79 class VTKRENDERINGCORE_EXPORT vtkAbstractPropPicker : public vtkAbstractPicker
80 {
81 public:
83  void PrintSelf(ostream& os, vtkIndent indent) override;
84 
86 
94  virtual void SetPath(vtkAssemblyPath*);
95  vtkGetObjectMacro(Path, vtkAssemblyPath);
97 
98  // The following are convenience methods to maintain API with older
99  // versions of VTK, and to allow query for the return type of a pick. Note:
100  // the functionality of these methods can also be obtained by using the
101  // returned vtkAssemblyPath and using the IsA() to determine type.
102 
107  virtual vtkProp* GetViewProp();
108 
112  virtual vtkProp3D* GetProp3D();
113 
117  virtual vtkActor* GetActor();
118 
123  virtual vtkActor2D* GetActor2D();
124 
128  virtual vtkVolume* GetVolume();
129 
137 
146 
147 protected:
150 
151  void Initialize() override;
152 
153  vtkAssemblyPath* Path; // this is what is picked, and includes the prop
154 private:
156  void operator=(const vtkAbstractPropPicker&) = delete;
157 };
158 
159 #endif
define API for picking subclasses
abstract API for pickers that can pick an instance of vtkProp
virtual vtkProp3D * GetProp3D()
Return the vtkProp that has been picked.
virtual vtkPropAssembly * GetPropAssembly()
Return the vtkPropAssembly that has been picked.
virtual void SetPath(vtkAssemblyPath *)
Return the vtkAssemblyPath that has been picked.
virtual vtkActor * GetActor()
Return the vtkActor that has been picked.
virtual vtkAssembly * GetAssembly()
Return the vtkAssembly that has been picked.
void Initialize() override
virtual vtkVolume * GetVolume()
Return the vtkVolume that has been picked.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkAbstractPropPicker() override
virtual vtkProp * GetViewProp()
Return the vtkProp that has been picked.
virtual vtkActor2D * GetActor2D()
Return the vtkActor2D that has been picked.
a actor that draws 2D data
Definition: vtkActor2D.h:40
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:46
a list of nodes that form an assembly path
create hierarchies of vtkProp3Ds (transformable props)
Definition: vtkAssembly.h:70
a simple class to control print indentation
Definition: vtkIndent.h:34
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:44
create hierarchies of props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:45