VTK  9.3.0
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
40 #ifndef vtkProp3DButtonRepresentation_h
41 #define vtkProp3DButtonRepresentation_h
42 
44 #include "vtkInteractionWidgetsModule.h" // For export macro
45 
46 VTK_ABI_NAMESPACE_BEGIN
47 class vtkPropPicker;
48 class vtkProp3D;
49 class vtkProp3DFollower;
50 class vtkPropArray; // PIMPLd
51 
52 class VTKINTERACTIONWIDGETS_EXPORT vtkProp3DButtonRepresentation : public vtkButtonRepresentation
53 {
54 public:
59 
61 
65  void PrintSelf(ostream& os, vtkIndent indent) override;
67 
69 
73  void SetButtonProp(int i, vtkProp3D* prop);
76 
78 
82  vtkSetMacro(FollowCamera, vtkTypeBool);
83  vtkGetMacro(FollowCamera, vtkTypeBool);
84  vtkBooleanMacro(FollowCamera, vtkTypeBool);
86 
90  void SetState(int state) override;
91 
93 
96  int ComputeInteractionState(int X, int Y, int modify = 0) override;
97  void BuildRepresentation() override;
99 
104  void PlaceWidget(double bounds[6]) override;
105 
107 
110  void ShallowCopy(vtkProp* prop) override;
111  double* GetBounds() override;
112  void GetActors(vtkPropCollection* pc) override;
119 
120  /*
121  * Register internal Pickers within PickingManager
122  */
123  void RegisterPickers() override;
124 
125 protected:
128 
129  // The current vtkProp3D used to represent the button
131 
132  // Follow the camera if requested
135 
136  // Keep track of the props associated with the N
137  // states of the button. This is a PIMPLd stl map.
138  vtkPropArray* PropArray;
139 
140  // For picking the button
142 
143 private:
145  void operator=(const vtkProp3DButtonRepresentation&) = delete;
146 };
147 
148 VTK_ABI_NAMESPACE_END
149 #endif
abstract class defines the representation for a vtkButtonWidget
a simple class to control print indentation
Definition: vtkIndent.h:38
defines a representation for a vtkButtonWidget
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of the class.
int RenderVolumetricGeometry(vtkViewport *) override
Provide the necessary methods to satisfy the rendering API.
void PlaceWidget(double bounds[6]) override
This method positions (translates and scales the props) into the bounding box specified.
int ComputeInteractionState(int X, int Y, int modify=0) override
Provide the necessary methods to satisfy the vtkWidgetRepresentation API.
void BuildRepresentation() override
Provide the necessary methods to satisfy the vtkWidgetRepresentation API.
static vtkProp3DButtonRepresentation * New()
Instantiate the class.
~vtkProp3DButtonRepresentation() override
double * GetBounds() override
Provide the necessary methods to satisfy the rendering API.
void ReleaseGraphicsResources(vtkWindow *) override
Provide the necessary methods to satisfy the rendering API.
int RenderOpaqueGeometry(vtkViewport *) override
Provide the necessary methods to satisfy the rendering API.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Provide the necessary methods to satisfy the rendering API.
void ShallowCopy(vtkProp *prop) override
Provide the necessary methods to satisfy the rendering API.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Provide the necessary methods to satisfy the rendering API.
vtkProp3D * GetButtonProp(int i)
Add the ith texture corresponding to the ith button state.
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
void GetActors(vtkPropCollection *pc) override
Provide the necessary methods to satisfy the rendering API.
void SetState(int state) override
Extend the vtkButtonRepresentation::SetState() method.
void SetButtonProp(int i, vtkProp3D *prop)
Add the ith texture corresponding to the ith button state.
a vtkProp3D that always faces the camera
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:48
an ordered list of Props
pick an actor/prop using graphics hardware
Definition: vtkPropPicker.h:44
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:55
abstract specification for Viewports
Definition: vtkViewport.h:54
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
int vtkTypeBool
Definition: vtkABI.h:64