VTK  9.3.20240424
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
50#ifndef vtkProp3DButtonRepresentation_h
51#define vtkProp3DButtonRepresentation_h
52
54#include "vtkInteractionWidgetsModule.h" // For export macro
55
56VTK_ABI_NAMESPACE_BEGIN
57class vtkPropPicker;
58class vtkProp3D;
60class vtkPropArray; // PIMPLd
61
62class VTKINTERACTIONWIDGETS_EXPORT vtkProp3DButtonRepresentation : public vtkButtonRepresentation
63{
64public:
69
71
75 void PrintSelf(ostream& os, vtkIndent indent) override;
77
79
83 void SetButtonProp(int i, vtkProp3D* prop);
86
88
92 vtkSetMacro(FollowCamera, vtkTypeBool);
93 vtkGetMacro(FollowCamera, vtkTypeBool);
94 vtkBooleanMacro(FollowCamera, vtkTypeBool);
96
100 void SetState(int state) override;
101
103
106 int ComputeInteractionState(int X, int Y, int modify = 0) override;
107 void BuildRepresentation() override;
109
114 void PlaceWidget(double bounds[6]) override;
115
117
120 void ShallowCopy(vtkProp* prop) override;
121 double* GetBounds() override;
122 void GetActors(vtkPropCollection* pc) override;
129
130 /*
131 * Register internal Pickers within PickingManager
132 */
133 void RegisterPickers() override;
134
135protected:
138
139 // The current vtkProp3D used to represent the button
141
142 // Follow the camera if requested
145
146 // Keep track of the props associated with the N
147 // states of the button. This is a PIMPLd stl map.
148 vtkPropArray* PropArray;
149
150 // For picking the button
152
153private:
155 void operator=(const vtkProp3DButtonRepresentation&) = delete;
156};
157
158VTK_ABI_NAMESPACE_END
159#endif
abstract class defines the representation for a vtkButtonWidget
a simple class to control print indentation
Definition vtkIndent.h:108
defines a representation for a vtkButtonWidget
vtkProp3D * GetButtonProp(int i)
Add the ith texture corresponding to the ith button state.
double * GetBounds() override
Provide the necessary methods to satisfy the rendering API.
static vtkProp3DButtonRepresentation * New()
Instantiate the class.
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.
~vtkProp3DButtonRepresentation() override
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.
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:89
an ordered list of Props
pick an actor/prop using graphics hardware
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:66
abstract specification for Viewports
Definition vtkViewport.h:65
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64