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
31#ifndef vtkProp3DButtonRepresentation_h
32#define vtkProp3DButtonRepresentation_h
33
35#include "vtkInteractionWidgetsModule.h" // For export macro
36
37VTK_ABI_NAMESPACE_BEGIN
38class vtkPropPicker;
39class vtkProp3D;
41class vtkPropArray; // PIMPLd
42
43class VTKINTERACTIONWIDGETS_EXPORT vtkProp3DButtonRepresentation : public vtkButtonRepresentation
44{
45public:
50
52
56 void PrintSelf(ostream& os, vtkIndent indent) override;
58
60
64 void SetButtonProp(int i, vtkProp3D* prop);
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;
110
111 /*
112 * Register internal Pickers within PickingManager
113 */
114 void RegisterPickers() override;
115
116protected:
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
134private:
136 void operator=(const vtkProp3DButtonRepresentation&) = delete;
137};
138
139VTK_ABI_NAMESPACE_END
140#endif
abstract class defines the representation for a vtkButtonWidget
a simple class to control print indentation
Definition vtkIndent.h:29
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:39
an ordered list of Props
pick an actor/prop using graphics hardware
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:43
abstract specification for Viewports
Definition vtkViewport.h:45
window superclass for vtkRenderWindow
Definition vtkWindow.h:25
int vtkTypeBool
Definition vtkABI.h:64