VTK  9.1.0
vtkTexturedButtonRepresentation.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkTexturedButtonRepresentation.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=========================================================================*/
47#ifndef vtkTexturedButtonRepresentation_h
48#define vtkTexturedButtonRepresentation_h
49
51#include "vtkInteractionWidgetsModule.h" // For export macro
52
53class vtkCellPicker;
54class vtkActor;
55class vtkProperty;
56class vtkImageData;
57class vtkTextureArray; // PIMPLd
58class vtkPolyData;
61class vtkTexture;
62class vtkFollower;
63
64class VTKINTERACTIONWIDGETS_EXPORT vtkTexturedButtonRepresentation : public vtkButtonRepresentation
65{
66public:
71
73
77 void PrintSelf(ostream& os, vtkIndent indent) override;
79
81
88
90
94 vtkSetMacro(FollowCamera, vtkTypeBool);
95 vtkGetMacro(FollowCamera, vtkTypeBool);
96 vtkBooleanMacro(FollowCamera, vtkTypeBool);
98
100
104 virtual void SetProperty(vtkProperty* p);
105 vtkGetObjectMacro(Property, vtkProperty);
107
109
113 vtkGetObjectMacro(HoveringProperty, vtkProperty);
115
117
121 vtkGetObjectMacro(SelectingProperty, vtkProperty);
123
125
132
141 virtual void PlaceWidget(double scale, double point[3], double normal[3]);
142
144
147 int ComputeInteractionState(int X, int Y, int modify = 0) override;
148 void PlaceWidget(double bounds[6]) override;
149 void BuildRepresentation() override;
150 void Highlight(int state) override;
152
154
157 void ShallowCopy(vtkProp* prop) override;
158 double* GetBounds() override;
159 void GetActors(vtkPropCollection* pc) override;
165
166 /*
167 * Register internal Pickers within PickingManager
168 */
169 void RegisterPickers() override;
170
171protected:
174
175 // Representing the button
180
181 // Camera
183
184 // Properties of the button
189
190 // Keep track of the images (textures) associated with the N
191 // states of the button. This is a PIMPLd stl map.
192 vtkTextureArray* TextureArray;
193
194 // For picking the button
196
197private:
199 void operator=(const vtkTexturedButtonRepresentation&) = delete;
200};
201
202#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
Proxy object to connect input/output ports.
abstract class defines the representation for a vtkButtonWidget
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:96
a subclass of actor that always faces the camera
Definition: vtkFollower.h:120
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
a simple class to control print indentation
Definition: vtkIndent.h:113
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:67
represent surface properties of a geometric object
Definition: vtkProperty.h:171
handles properties associated with a texture map
Definition: vtkTexture.h:175
defines a representation for a vtkButtonWidget
void SetButtonGeometryConnection(vtkAlgorithmOutput *algOutput)
Set/Get the polydata which defines the button geometry.
static vtkTexturedButtonRepresentation * New()
Instantiate the class.
void Highlight(int state) override
Provide the necessary methods to satisfy the vtkWidgetRepresentation API.
void ReleaseGraphicsResources(vtkWindow *) override
Provide the necessary methods to satisfy the rendering API.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of the class.
void GetActors(vtkPropCollection *pc) override
Provide the necessary methods to satisfy the rendering API.
void ShallowCopy(vtkProp *prop) override
Provide the necessary methods to satisfy the rendering API.
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
virtual void PlaceWidget(double scale, double point[3], double normal[3])
Alternative method for placing a button at a given position (defined by point[3]); at a given orienta...
int RenderOpaqueGeometry(vtkViewport *) override
Provide the necessary methods to satisfy the rendering API.
vtkImageData * GetButtonTexture(int i)
Add the ith texture corresponding to the ith button state.
int ComputeInteractionState(int X, int Y, int modify=0) override
Provide the necessary methods to satisfy the vtkWidgetRepresentation API.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Provide the necessary methods to satisfy the rendering API.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Provide the necessary methods to satisfy the rendering API.
void BuildRepresentation() override
Provide the necessary methods to satisfy the vtkWidgetRepresentation API.
void SetButtonTexture(int i, vtkImageData *image)
Add the ith texture corresponding to the ith button state.
void PlaceWidget(double bounds[6]) override
Provide the necessary methods to satisfy the vtkWidgetRepresentation API.
virtual void SetSelectingProperty(vtkProperty *p)
Specify the property to use when selecting the button.
virtual void SetHoveringProperty(vtkProperty *p)
Specify the property to use when the hovering over the button.
double * GetBounds() override
Provide the necessary methods to satisfy the rendering API.
virtual void SetProperty(vtkProperty *p)
Specify the property to use when the button is to appear "normal" i.e., the mouse pointer is not hove...
vtkPolyData * GetButtonGeometry()
Set/Get the polydata which defines the button geometry.
void SetButtonGeometry(vtkPolyData *pd)
Set/Get the polydata which defines the button geometry.
abstract specification for Viewports
Definition: vtkViewport.h:47
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
@ point
Definition: vtkX3D.h:242
@ scale
Definition: vtkX3D.h:235
@ image
Definition: vtkX3D.h:380
int vtkTypeBool
Definition: vtkABI.h:69