VTK  9.0.1
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 
44 #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) override;
66 
68 
72  void SetButtonProp(int i, vtkProp3D* prop);
75 
77 
81  vtkSetMacro(FollowCamera, vtkTypeBool);
82  vtkGetMacro(FollowCamera, vtkTypeBool);
83  vtkBooleanMacro(FollowCamera, vtkTypeBool);
85 
89  void SetState(int state) override;
90 
92 
95  int ComputeInteractionState(int X, int Y, int modify = 0) override;
96  void BuildRepresentation() override;
98 
103  void PlaceWidget(double bounds[6]) override;
104 
106 
109  void ShallowCopy(vtkProp* prop) override;
110  double* GetBounds() override;
111  void GetActors(vtkPropCollection* pc) override;
118 
119  /*
120  * Register internal Pickers within PickingManager
121  */
122  void RegisterPickers() override;
123 
124 protected:
127 
128  // The current vtkProp3D used to represent the button
130 
131  // Follow the camera if requested
134 
135  // Keep track of the props associated with the N
136  // states of the button. This is a PIMPLd stl map.
137  vtkPropArray* PropArray;
138 
139  // For picking the button
141 
142 private:
144  void operator=(const vtkProp3DButtonRepresentation&) = delete;
145 };
146 
147 #endif
vtkProp3DButtonRepresentation::GetButtonProp
vtkProp3D * GetButtonProp(int i)
vtkProp3DButtonRepresentation::Follower
vtkProp3DFollower * Follower
Definition: vtkProp3DButtonRepresentation.h:132
vtkProp3DButtonRepresentation::RegisterPickers
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
vtkProp3DButtonRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:44
vtkProp3DButtonRepresentation::PlaceWidget
void PlaceWidget(double bounds[6]) override
This method positions (translates and scales the props) into the bounding box specified.
vtkProp3DButtonRepresentation::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
vtkProp3DButtonRepresentation::~vtkProp3DButtonRepresentation
~vtkProp3DButtonRepresentation() override
vtkButtonRepresentation.h
vtkProp3DFollower
a vtkProp3D that always faces the camera
Definition: vtkProp3DFollower.h:44
vtkButtonRepresentation
abstract class defines the representation for a vtkButtonWidget
Definition: vtkButtonRepresentation.h:45
vtkProp3DButtonRepresentation::ShallowCopy
void ShallowCopy(vtkProp *prop) override
Provide the necessary methods to satisfy the rendering API.
vtkProp3DButtonRepresentation::GetBounds
double * GetBounds() override
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkProp3DButtonRepresentation::ComputeInteractionState
int ComputeInteractionState(int X, int Y, int modify=0) override
Provide the necessary methods to satisfy the vtkWidgetRepresentation API.
vtkProp3DButtonRepresentation::FollowCamera
vtkTypeBool FollowCamera
Definition: vtkProp3DButtonRepresentation.h:133
vtkProp3DButtonRepresentation::SetButtonProp
void SetButtonProp(int i, vtkProp3D *prop)
Add the ith texture corresponding to the ith button state.
vtkProp3DButtonRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
vtkProp3DButtonRepresentation::vtkProp3DButtonRepresentation
vtkProp3DButtonRepresentation()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkProp3DButtonRepresentation::New
static vtkProp3DButtonRepresentation * New()
Instantiate the class.
vtkProp3DButtonRepresentation
defines a representation for a vtkButtonWidget
Definition: vtkProp3DButtonRepresentation.h:52
vtkProp3DButtonRepresentation::PropArray
vtkPropArray * PropArray
Definition: vtkProp3DButtonRepresentation.h:137
vtkPropPicker
pick an actor/prop using graphics hardware
Definition: vtkPropPicker.h:40
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:45
vtkProp3DButtonRepresentation::RenderVolumetricGeometry
int RenderVolumetricGeometry(vtkViewport *) override
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
vtkProp3DButtonRepresentation::Picker
vtkPropPicker * Picker
Definition: vtkProp3DButtonRepresentation.h:140
vtkProp3DButtonRepresentation::SetState
void SetState(int state) override
Extend the vtkButtonRepresentation::SetState() method.
vtkProp3DButtonRepresentation::HasTranslucentPolygonalGeometry
vtkTypeBool HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkProp3DButtonRepresentation::BuildRepresentation
void BuildRepresentation() override
vtkProp3DButtonRepresentation::GetActors
void GetActors(vtkPropCollection *pc) override
For some exporters and other other operations we must be able to collect all the actors or volumes.
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:36
vtkProp3DButtonRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkProp3DButtonRepresentation::CurrentProp
vtkProp3D * CurrentProp
Definition: vtkProp3DButtonRepresentation.h:129