VTK  9.3.20240418
vtkAbstractPropPicker.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
52 #ifndef vtkAbstractPropPicker_h
53 #define vtkAbstractPropPicker_h
54 
55 #include "vtkAbstractPicker.h"
56 #include "vtkRenderingCoreModule.h" // For export macro
57 
58 VTK_ABI_NAMESPACE_BEGIN
59 class vtkProp;
60 class vtkPropAssembly;
61 class vtkAssembly;
62 class vtkActor;
63 class vtkVolume;
64 class vtkProp3D;
65 class vtkAssemblyPath;
66 class vtkActor2D;
67 
68 class VTKRENDERINGCORE_EXPORT vtkAbstractPropPicker : public vtkAbstractPicker
69 {
70 public:
72  void PrintSelf(ostream& os, vtkIndent indent) override;
73 
75 
83  virtual void SetPath(vtkAssemblyPath*);
84  vtkGetObjectMacro(Path, vtkAssemblyPath);
86 
87  // The following are convenience methods to maintain API with older
88  // versions of VTK, and to allow query for the return type of a pick. Note:
89  // the functionality of these methods can also be obtained by using the
90  // returned vtkAssemblyPath and using the IsA() to determine type.
91 
96  virtual vtkProp* GetViewProp();
97 
101  virtual vtkProp3D* GetProp3D();
102 
106  virtual vtkActor* GetActor();
107 
112  virtual vtkActor2D* GetActor2D();
113 
117  virtual vtkVolume* GetVolume();
118 
126 
135 
136 protected:
139 
140  void Initialize() override;
141 
142  vtkAssemblyPath* Path; // this is what is picked, and includes the prop
143 private:
145  void operator=(const vtkAbstractPropPicker&) = delete;
146 };
147 
148 VTK_ABI_NAMESPACE_END
149 #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:145
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:151
a list of nodes that form an assembly path
create hierarchies of vtkProp3Ds (transformable props)
Definition: vtkAssembly.h:91
a simple class to control print indentation
Definition: vtkIndent.h:108
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:89
create hierarchies of props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:66
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:120