VTK
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 =========================================================================*/
49 #ifndef vtkTexturedButtonRepresentation_h
50 #define vtkTexturedButtonRepresentation_h
51 
52 #include "vtkInteractionWidgetsModule.h" // For export macro
54 
55 class vtkCellPicker;
56 class vtkActor;
57 class vtkProperty;
58 class vtkImageData;
59 class vtkTextureArray; //PIMPLd
60 class vtkPolyData;
61 class vtkPolyDataMapper;
62 class vtkAlgorithmOutput;
63 class vtkTexture;
64 class vtkFollower;
65 
67 {
68 public:
71 
73 
75  void PrintSelf(ostream& os, vtkIndent indent);
77 
79 
80  void SetButtonGeometry(vtkPolyData *pd);
81  void SetButtonGeometryConnection(vtkAlgorithmOutput* algOutput);
82  vtkPolyData *GetButtonGeometry();
84 
86 
88  vtkSetMacro(FollowCamera,int);
89  vtkGetMacro(FollowCamera,int);
90  vtkBooleanMacro(FollowCamera,int);
92 
94 
96  virtual void SetProperty(vtkProperty *p);
97  vtkGetObjectMacro(Property,vtkProperty);
99 
101 
102  virtual void SetHoveringProperty(vtkProperty *p);
103  vtkGetObjectMacro(HoveringProperty,vtkProperty);
105 
107 
108  virtual void SetSelectingProperty(vtkProperty *p);
109  vtkGetObjectMacro(SelectingProperty,vtkProperty);
111 
113 
115  void SetButtonTexture(int i, vtkImageData *image);
116  vtkImageData *GetButtonTexture(int i);
118 
125  virtual void PlaceWidget(double scale, double point[3], double normal[3]);
126 
128 
130  virtual int ComputeInteractionState(int X, int Y, int modify=0);
131  virtual void PlaceWidget(double bounds[6]);
132  virtual void BuildRepresentation();
133  virtual void Highlight(int state);
135 
137 
138  virtual void ShallowCopy(vtkProp *prop);
139  virtual double *GetBounds();
140  virtual void GetActors(vtkPropCollection *pc);
141  virtual void ReleaseGraphicsResources(vtkWindow*);
142  virtual int RenderOpaqueGeometry(vtkViewport*);
144  virtual int HasTranslucentPolygonalGeometry();
146 
147 protected:
150 
151  // Representing the button
156 
157  // Camera
159 
160  // Properties of the button
164  void CreateDefaultProperties();
165 
166  // Keep track of the images (textures) associated with the N
167  // states of the button. This is a PIMPLd stl map.
168  vtkTextureArray *TextureArray;
169 
170  // For picking the button
172 
173  // Register internal Pickers within PickingManager
174  virtual void RegisterPickers();
175 
176 private:
178  void operator=(const vtkTexturedButtonRepresentation&); //Not implemented
179 };
180 
181 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
virtual int ComputeInteractionState(int X, int Y, int modify=0)
abstract specification for Viewports
Definition: vtkViewport.h:46
represent surface properties of a geometric object
Definition: vtkProperty.h:63
virtual void ShallowCopy(vtkProp *prop)
defines a representation for a vtkButtonWidget
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
virtual void ReleaseGraphicsResources(vtkWindow *)
virtual void BuildRepresentation()=0
Proxy object to connect input/output ports.
a list of Props
virtual void Highlight(int)
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
#define VTKINTERACTIONWIDGETS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent)
virtual int HasTranslucentPolygonalGeometry()
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void RegisterPickers()
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
handles properties associated with a texture map
Definition: vtkTexture.h:69
abstract class defines the representation for a vtkButtonWidget
virtual void GetActors(vtkPropCollection *)
map vtkPolyData to graphics primitives
virtual int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport))
a subclass of actor that always faces the camera
Definition: vtkFollower.h:45
virtual void PlaceWidget(double *vtkNotUsed(bounds[6]))
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:68
static vtkObject * New()
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport))