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 =========================================================================*/
43 #ifndef vtkProp3DButtonRepresentation_h
44 #define vtkProp3DButtonRepresentation_h
45 
46 #include "vtkInteractionWidgetsModule.h" // For export macro
48 
49 class vtkPropPicker;
50 class vtkProp3D;
51 class vtkProp3DFollower;
52 class vtkPropArray; //PIMPLd
53 
54 class VTKINTERACTIONWIDGETS_EXPORT vtkProp3DButtonRepresentation : public vtkButtonRepresentation
55 {
56 public:
61 
63 
67  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
71 
75  void SetButtonProp(int i, vtkProp3D *prop);
76  vtkProp3D *GetButtonProp(int i);
78 
80 
84  vtkSetMacro(FollowCamera,vtkTypeBool);
85  vtkGetMacro(FollowCamera,vtkTypeBool);
86  vtkBooleanMacro(FollowCamera,vtkTypeBool);
88 
92  void SetState(int state) override;
93 
95 
98  int ComputeInteractionState(int X, int Y, int modify=0) override;
99  void BuildRepresentation() override;
101 
106  void PlaceWidget(double bounds[6]) override;
107 
109 
112  void ShallowCopy(vtkProp *prop) override;
113  double *GetBounds() override;
114  void GetActors(vtkPropCollection *pc) override;
115  void ReleaseGraphicsResources(vtkWindow*) override;
116  int RenderOpaqueGeometry(vtkViewport*) override;
117  int RenderVolumetricGeometry(vtkViewport*) override;
121 
122  /*
123  * Register internal Pickers within PickingManager
124  */
125  void RegisterPickers() override;
126 
127 protected:
129  ~vtkProp3DButtonRepresentation() override;
130 
131  // The current vtkProp3D used to represent the button
133 
134  // Follow the camera if requested
137 
138  // Keep track of the props associated with the N
139  // states of the button. This is a PIMPLd stl map.
140  vtkPropArray *PropArray;
141 
142  // For picking the button
144 
145 private:
147  void operator=(const vtkProp3DButtonRepresentation&) = delete;
148 };
149 
150 #endif
vtkWidgetRepresentation::GetActors
void GetActors(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes.
Definition: vtkWidgetRepresentation.h:217
vtkProp3DButtonRepresentation::Follower
vtkProp3DFollower * Follower
Definition: vtkProp3DButtonRepresentation.h:135
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:46
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkButtonRepresentation.h
vtkButtonRepresentation::ShallowCopy
void ShallowCopy(vtkProp *prop) override
Satisfy some of vtkProp's API.
vtkProp3DFollower
a vtkProp3D that always faces the camera
Definition: vtkProp3DFollower.h:47
vtkButtonRepresentation
abstract class defines the representation for a vtkButtonWidget
Definition: vtkButtonRepresentation.h:45
vtkWidgetRepresentation::BuildRepresentation
virtual void BuildRepresentation()=0
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkWidgetRepresentation::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:223
vtkWidgetRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkWidgetRepresentation.h:220
vtkWidgetRepresentation::GetBounds
double * GetBounds() override
Methods to make this class behave as a vtkProp.
Definition: vtkWidgetRepresentation.h:215
vtkProp3DButtonRepresentation::FollowCamera
vtkTypeBool FollowCamera
Definition: vtkProp3DButtonRepresentation.h:136
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkWidgetRepresentation::RegisterPickers
virtual void RegisterPickers()
Register internal Pickers in the Picking Manager.
vtkProp3DButtonRepresentation
defines a representation for a vtkButtonWidget
Definition: vtkProp3DButtonRepresentation.h:54
vtkProp3DButtonRepresentation::PropArray
vtkPropArray * PropArray
Definition: vtkProp3DButtonRepresentation.h:140
vtkPropPicker
pick an actor/prop using graphics hardware
Definition: vtkPropPicker.h:42
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
vtkWidgetRepresentation::PlaceWidget
virtual void PlaceWidget(double *vtkNotUsed(bounds[6]))
The following is a suggested API for widget representations.
Definition: vtkWidgetRepresentation.h:135
vtkProp3DButtonRepresentation::Picker
vtkPropPicker * Picker
Definition: vtkProp3DButtonRepresentation.h:143
vtkWidgetRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:222
vtkWidgetRepresentation::RenderVolumetricGeometry
int RenderVolumetricGeometry(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:224
vtkWidgetRepresentation::HasTranslucentPolygonalGeometry
vtkTypeBool HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkWidgetRepresentation.h:225
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:41
vtkButtonRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkButtonRepresentation::SetState
virtual void SetState(int state)
Manipulate the state.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkWidgetRepresentation::ComputeInteractionState
virtual int ComputeInteractionState(int X, int Y, int modify=0)
vtkProp3DButtonRepresentation::CurrentProp
vtkProp3D * CurrentProp
Definition: vtkProp3DButtonRepresentation.h:132