VTK
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 =========================================================================*/
40 #ifndef vtkProp3DButtonRepresentation_h
41 #define vtkProp3DButtonRepresentation_h
42 
43 #include "vtkInteractionWidgetsModule.h" // For export macro
45 
46 class vtkPropPicker;
47 class vtkProp3D;
48 class vtkProp3DFollower;
49 class vtkPropArray; //PIMPLd
50 
51 class VTKINTERACTIONWIDGETS_EXPORT vtkProp3DButtonRepresentation : public vtkButtonRepresentation
52 {
53 public:
58 
60 
64  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
66 
68 
72  void SetButtonProp(int i, vtkProp3D *prop);
73  vtkProp3D *GetButtonProp(int i);
75 
77 
81  vtkSetMacro(FollowCamera,int);
82  vtkGetMacro(FollowCamera,int);
83  vtkBooleanMacro(FollowCamera,int);
85 
89  void SetState(int state) VTK_OVERRIDE;
90 
92 
95  int ComputeInteractionState(int X, int Y, int modify=0) VTK_OVERRIDE;
96  void BuildRepresentation() VTK_OVERRIDE;
98 
103  void PlaceWidget(double bounds[6]) VTK_OVERRIDE;
104 
106 
109  void ShallowCopy(vtkProp *prop) VTK_OVERRIDE;
110  double *GetBounds() VTK_OVERRIDE;
111  void GetActors(vtkPropCollection *pc) VTK_OVERRIDE;
112  void ReleaseGraphicsResources(vtkWindow*) VTK_OVERRIDE;
113  int RenderOpaqueGeometry(vtkViewport*) VTK_OVERRIDE;
114  int RenderVolumetricGeometry(vtkViewport*) VTK_OVERRIDE;
115  int RenderTranslucentPolygonalGeometry(vtkViewport*) VTK_OVERRIDE;
116  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
118 
119 protected:
121  ~vtkProp3DButtonRepresentation() VTK_OVERRIDE;
122 
123  // The current vtkProp3D used to represent the button
124  vtkProp3D *CurrentProp;
125 
126  // Follow the camera if requested
127  vtkProp3DFollower *Follower;
128  int FollowCamera;
129 
130  // Keep track of the props associated with the N
131  // states of the button. This is a PIMPLd stl map.
132  vtkPropArray *PropArray;
133 
134  // For picking the button
135  vtkPropPicker *Picker;
136 
137  // Register internal Pickers within PickingManager
138  void RegisterPickers() VTK_OVERRIDE;
139 
140 private:
141  vtkProp3DButtonRepresentation(const vtkProp3DButtonRepresentation&) VTK_DELETE_FUNCTION;
142  void operator=(const vtkProp3DButtonRepresentation&) VTK_DELETE_FUNCTION;
143 };
144 
145 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:44
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
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:39
abstract specification for Viewports
Definition: vtkViewport.h:44
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
defines a representation for a vtkButtonWidget
an ordered list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
a simple class to control print indentation
Definition: vtkIndent.h:33
a vtkProp3D that always faces the camera
abstract class defines the representation for a vtkButtonWidget
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...