VTK  9.2.5
vtkProp3DButtonRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProp3DButtonRepresentation.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
62 #ifndef vtkProp3DButtonRepresentation_h
63 #define vtkProp3DButtonRepresentation_h
64 
66 #include "vtkInteractionWidgetsModule.h" // For export macro
67 
68 class vtkPropPicker;
69 class vtkProp3D;
70 class vtkProp3DFollower;
71 class vtkPropArray; // PIMPLd
72 
73 class VTKINTERACTIONWIDGETS_EXPORT vtkProp3DButtonRepresentation : public vtkButtonRepresentation
74 {
75 public:
80 
82 
86  void PrintSelf(ostream& os, vtkIndent indent) override;
88 
90 
94  void SetButtonProp(int i, vtkProp3D* prop);
97 
99 
103  vtkSetMacro(FollowCamera, vtkTypeBool);
104  vtkGetMacro(FollowCamera, vtkTypeBool);
105  vtkBooleanMacro(FollowCamera, vtkTypeBool);
107 
111  void SetState(int state) override;
112 
114 
117  int ComputeInteractionState(int X, int Y, int modify = 0) override;
118  void BuildRepresentation() override;
120 
125  void PlaceWidget(double bounds[6]) override;
126 
128 
131  void ShallowCopy(vtkProp* prop) override;
132  double* GetBounds() override;
133  void GetActors(vtkPropCollection* pc) override;
140 
141  /*
142  * Register internal Pickers within PickingManager
143  */
144  void RegisterPickers() override;
145 
146 protected:
149 
150  // The current vtkProp3D used to represent the button
152 
153  // Follow the camera if requested
156 
157  // Keep track of the props associated with the N
158  // states of the button. This is a PIMPLd stl map.
159  vtkPropArray* PropArray;
160 
161  // For picking the button
163 
164 private:
166  void operator=(const vtkProp3DButtonRepresentation&) = delete;
167 };
168 
169 #endif
abstract class defines the representation for a vtkButtonWidget
a simple class to control print indentation
Definition: vtkIndent.h:119
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:99
an ordered list of Props
pick an actor/prop using graphics hardware
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:76
abstract specification for Viewports
Definition: vtkViewport.h:56
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
int vtkTypeBool
Definition: vtkABI.h:69