VTK  9.3.1
vtkProp3DButtonRepresentation.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
31 #ifndef vtkProp3DButtonRepresentation_h
32 #define vtkProp3DButtonRepresentation_h
33 
35 #include "vtkInteractionWidgetsModule.h" // For export macro
36 
37 VTK_ABI_NAMESPACE_BEGIN
38 class vtkPropPicker;
39 class vtkProp3D;
40 class vtkProp3DFollower;
41 class vtkPropArray; // PIMPLd
42 
43 class VTKINTERACTIONWIDGETS_EXPORT vtkProp3DButtonRepresentation : public vtkButtonRepresentation
44 {
45 public:
50 
52 
56  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
60 
64  void SetButtonProp(int i, vtkProp3D* prop);
65  vtkProp3D* GetButtonProp(int i);
67 
69 
73  vtkSetMacro(FollowCamera, vtkTypeBool);
74  vtkGetMacro(FollowCamera, vtkTypeBool);
75  vtkBooleanMacro(FollowCamera, vtkTypeBool);
77 
81  void SetState(int state) override;
82 
84 
87  int ComputeInteractionState(int X, int Y, int modify = 0) override;
88  void BuildRepresentation() override;
90 
95  void PlaceWidget(double bounds[6]) override;
96 
98 
101  void ShallowCopy(vtkProp* prop) override;
102  double* GetBounds() override;
103  void GetActors(vtkPropCollection* pc) override;
104  void ReleaseGraphicsResources(vtkWindow*) override;
105  int RenderOpaqueGeometry(vtkViewport*) override;
106  int RenderVolumetricGeometry(vtkViewport*) override;
110 
111  /*
112  * Register internal Pickers within PickingManager
113  */
114  void RegisterPickers() override;
115 
116 protected:
118  ~vtkProp3DButtonRepresentation() override;
119 
120  // The current vtkProp3D used to represent the button
122 
123  // Follow the camera if requested
126 
127  // Keep track of the props associated with the N
128  // states of the button. This is a PIMPLd stl map.
129  vtkPropArray* PropArray;
130 
131  // For picking the button
133 
134 private:
136  void operator=(const vtkProp3DButtonRepresentation&) = delete;
137 };
138 
139 VTK_ABI_NAMESPACE_END
140 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:45
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
virtual void PlaceWidget(double vtkNotUsed(bounds)[6])
The following is a suggested API for widget representations.
virtual void SetState(int state)
Manipulate the state.
virtual int ComputeInteractionState(int X, int Y, int modify=0)
pick an actor/prop using graphics hardware
Definition: vtkPropPicker.h:34
abstract specification for Viewports
Definition: vtkViewport.h:44
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:38
defines a representation for a vtkButtonWidget
void ShallowCopy(vtkProp *prop) override
Satisfy some of vtkProp's API.
virtual void BuildRepresentation()=0
Subclasses of vtkWidgetRepresentation must implement these methods.
double * GetBounds() override
Methods to make this class behave as a vtkProp.
an ordered list of Props
int vtkTypeBool
Definition: vtkABI.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport)) override
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual void RegisterPickers()
Register internal Pickers in the Picking Manager.
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
a vtkProp3D that always faces the camera
int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport)) override
abstract class defines the representation for a vtkButtonWidget
vtkTypeBool HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
void GetActors(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
int RenderVolumetricGeometry(vtkViewport *vtkNotUsed(viewport)) override