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 
53 
54 class vtkCellPicker;
55 class vtkActor;
56 class vtkProperty;
57 class vtkImageData;
58 class vtkTextureArray; //PIMPLd
59 class vtkPolyData;
60 class vtkPolyDataMapper;
61 class vtkAlgorithmOutput;
62 class vtkTexture;
63 class vtkFollower;
64 
66 {
67 public:
70 
72 
74  void PrintSelf(ostream& os, vtkIndent indent);
76 
78 
79  void SetButtonGeometry(vtkPolyData *pd);
80  void SetButtonGeometryConnection(vtkAlgorithmOutput* algOutput);
81  vtkPolyData *GetButtonGeometry();
83 
85 
87  vtkSetMacro(FollowCamera,int);
88  vtkGetMacro(FollowCamera,int);
89  vtkBooleanMacro(FollowCamera,int);
91 
93 
95  virtual void SetProperty(vtkProperty *p);
96  vtkGetObjectMacro(Property,vtkProperty);
98 
100 
101  virtual void SetHoveringProperty(vtkProperty *p);
102  vtkGetObjectMacro(HoveringProperty,vtkProperty);
104 
106 
107  virtual void SetSelectingProperty(vtkProperty *p);
108  vtkGetObjectMacro(SelectingProperty,vtkProperty);
110 
112 
114  void SetButtonTexture(int i, vtkImageData *image);
115  vtkImageData *GetButtonTexture(int i);
117 
124  virtual void PlaceWidget(double scale, double point[3], double normal[3]);
125 
127 
129  virtual int ComputeInteractionState(int X, int Y, int modify=0);
130  virtual void PlaceWidget(double bounds[6]);
131  virtual void BuildRepresentation();
132  virtual void Highlight(int state);
134 
136 
137  virtual void ShallowCopy(vtkProp *prop);
138  virtual double *GetBounds();
139  virtual void GetActors(vtkPropCollection *pc);
140  virtual void ReleaseGraphicsResources(vtkWindow*);
141  virtual int RenderOpaqueGeometry(vtkViewport*);
143  virtual int HasTranslucentPolygonalGeometry();
145 
146 protected:
149 
150  // Representing the button
155 
156  // Camera
158 
159  // Properties of the button
163  void CreateDefaultProperties();
164 
165  // Keep track of the images (textures) associated with the N
166  // states of the button. This is a PIMPLd stl map.
167  vtkTextureArray *TextureArray;
168 
169  // For picking the button
171 
172 private:
174  void operator=(const vtkTexturedButtonRepresentation&); //Not implemented
175 };
176 
177 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:49
virtual int ComputeInteractionState(int X, int Y, int modify=0)
abstract specification for Viewports
Definition: vtkViewport.h:45
represent surface properties of a geometric object
Definition: vtkProperty.h:61
virtual void ShallowCopy(vtkProp *prop)
defines a representation for a vtkButtonWidget
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
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:35
void PrintSelf(ostream &os, vtkIndent indent)
virtual int HasTranslucentPolygonalGeometry()
a simple class to control print indentation
Definition: vtkIndent.h:37
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
handles properties associated with a texture map
Definition: vtkTexture.h:68
abstract class defines the representation for a vtkButtonWidget
#define VTK_WIDGETS_EXPORT
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:44
virtual void PlaceWidget(double *vtkNotUsed(bounds[6]))
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:66
static vtkObject * New()
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport))