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 =========================================================================*/
50 #ifndef vtkTexturedButtonRepresentation_h
51 #define vtkTexturedButtonRepresentation_h
52 
53 #include "vtkInteractionWidgetsModule.h" // For export macro
55 
56 class vtkCellPicker;
57 class vtkActor;
58 class vtkProperty;
59 class vtkImageData;
60 class vtkTextureArray; //PIMPLd
61 class vtkPolyData;
62 class vtkPolyDataMapper;
63 class vtkAlgorithmOutput;
64 class vtkTexture;
65 class vtkFollower;
66 
67 class VTKINTERACTIONWIDGETS_EXPORT vtkTexturedButtonRepresentation : public vtkButtonRepresentation
68 {
69 public:
74 
76 
80  void PrintSelf(ostream& os, vtkIndent indent);
82 
84 
91 
93 
97  vtkSetMacro(FollowCamera,int);
98  vtkGetMacro(FollowCamera,int);
99  vtkBooleanMacro(FollowCamera,int);
101 
103 
107  virtual void SetProperty(vtkProperty *p);
108  vtkGetObjectMacro(Property,vtkProperty);
110 
112 
116  vtkGetObjectMacro(HoveringProperty,vtkProperty);
118 
120 
124  vtkGetObjectMacro(SelectingProperty,vtkProperty);
126 
128 
135 
144  virtual void PlaceWidget(double scale, double point[3], double normal[3]);
145 
147 
150  virtual int ComputeInteractionState(int X, int Y, int modify=0);
151  virtual void PlaceWidget(double bounds[6]);
152  virtual void BuildRepresentation();
153  virtual void Highlight(int state);
155 
157 
160  virtual void ShallowCopy(vtkProp *prop);
161  virtual double *GetBounds();
162  virtual void GetActors(vtkPropCollection *pc);
168 
169 protected:
172 
173  // Representing the button
178 
179  // Camera
181 
182  // Properties of the button
187 
188  // Keep track of the images (textures) associated with the N
189  // states of the button. This is a PIMPLd stl map.
190  vtkTextureArray *TextureArray;
191 
192  // For picking the button
194 
195  // Register internal Pickers within PickingManager
196  virtual void RegisterPickers();
197 
198 private:
200  void operator=(const vtkTexturedButtonRepresentation&) VTK_DELETE_FUNCTION;
201 };
202 
203 #endif
vtkPolyDataMapper
map vtkPolyData to graphics primitives
Definition: vtkPolyDataMapper.h:43
vtkTexturedButtonRepresentation::Picker
vtkCellPicker * Picker
Definition: vtkTexturedButtonRepresentation.h:193
vtkFollower
a subclass of actor that always faces the camera
Definition: vtkFollower.h:47
vtkTexturedButtonRepresentation::New
static vtkTexturedButtonRepresentation * New()
Instantiate the class.
vtkTexturedButtonRepresentation::SetHoveringProperty
virtual void SetHoveringProperty(vtkProperty *p)
Specify the property to use when the hovering over the button.
vtkTexturedButtonRepresentation::FollowCamera
int FollowCamera
Definition: vtkTexturedButtonRepresentation.h:180
vtkX3D::scale
@ scale
Definition: vtkX3D.h:229
vtkTexturedButtonRepresentation::GetBounds
virtual double * GetBounds()
Methods to make this class behave as a vtkProp.
vtkTexturedButtonRepresentation::SetButtonGeometryConnection
void SetButtonGeometryConnection(vtkAlgorithmOutput *algOutput)
vtkX3D::image
@ image
Definition: vtkX3D.h:374
vtkTexturedButtonRepresentation::SetProperty
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...
vtkTexturedButtonRepresentation::ShallowCopy
virtual void ShallowCopy(vtkProp *prop)
Provide the necessary methods to satisfy the rendering API.
vtkTexturedButtonRepresentation::SelectingProperty
vtkProperty * SelectingProperty
Definition: vtkTexturedButtonRepresentation.h:185
vtkButtonRepresentation.h
vtkTexturedButtonRepresentation::GetButtonTexture
vtkImageData * GetButtonTexture(int i)
vtkButtonRepresentation
abstract class defines the representation for a vtkButtonWidget
Definition: vtkButtonRepresentation.h:46
vtkTexturedButtonRepresentation::SetButtonTexture
void SetButtonTexture(int i, vtkImageData *image)
Add the ith texture corresponding to the ith button state.
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkTexturedButtonRepresentation::Texture
vtkTexture * Texture
Definition: vtkTexturedButtonRepresentation.h:177
vtkTexturedButtonRepresentation::Mapper
vtkPolyDataMapper * Mapper
Definition: vtkTexturedButtonRepresentation.h:176
vtkX3D::point
@ point
Definition: vtkX3D.h:236
vtkTexturedButtonRepresentation::HasTranslucentPolygonalGeometry
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:71
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkTexturedButtonRepresentation::PlaceWidget
virtual void PlaceWidget(double bounds[6])
vtkTexturedButtonRepresentation::vtkTexturedButtonRepresentation
vtkTexturedButtonRepresentation()
vtkTexturedButtonRepresentation::ComputeInteractionState
virtual int ComputeInteractionState(int X, int Y, int modify=0)
Provide the necessary methods to satisfy the vtkWidgetRepresentation API.
vtkTexturedButtonRepresentation::GetActors
virtual void GetActors(vtkPropCollection *pc)
For some exporters and other other operations we must be able to collect all the actors or volumes.
vtkTexturedButtonRepresentation::GetButtonGeometry
vtkPolyData * GetButtonGeometry()
vtkTexturedButtonRepresentation::BuildRepresentation
virtual void BuildRepresentation()
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:48
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
vtkTexturedButtonRepresentation::Property
vtkProperty * Property
Definition: vtkTexturedButtonRepresentation.h:183
vtkTexturedButtonRepresentation::Follower
vtkFollower * Follower
Definition: vtkTexturedButtonRepresentation.h:175
vtkTexturedButtonRepresentation
defines a representation for a vtkButtonWidget
Definition: vtkTexturedButtonRepresentation.h:68
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:40
vtkTexturedButtonRepresentation::PlaceWidget
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...
vtkTexturedButtonRepresentation::Highlight
virtual void Highlight(int state)
vtkTexturedButtonRepresentation::RenderTranslucentPolygonalGeometry
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
vtkTexturedButtonRepresentation::SetSelectingProperty
virtual void SetSelectingProperty(vtkProperty *p)
Specify the property to use when selecting the button.
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkTexturedButtonRepresentation::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkTexturedButtonRepresentation::Actor
vtkActor * Actor
Definition: vtkTexturedButtonRepresentation.h:174
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:65
vtkTexturedButtonRepresentation::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
vtkTexturedButtonRepresentation::~vtkTexturedButtonRepresentation
~vtkTexturedButtonRepresentation()
vtkTexturedButtonRepresentation::CreateDefaultProperties
void CreateDefaultProperties()
vtkTexturedButtonRepresentation::SetButtonGeometry
void SetButtonGeometry(vtkPolyData *pd)
Set/Get the polydata which defines the button geometry.
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:39
vtkTexturedButtonRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkCellPicker
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:70
vtkTexturedButtonRepresentation::RegisterPickers
virtual void RegisterPickers()
Register internal Pickers in the Picking Manager.
vtkTexturedButtonRepresentation::TextureArray
vtkTextureArray * TextureArray
Definition: vtkTexturedButtonRepresentation.h:190
vtkTexturedButtonRepresentation::HoveringProperty
vtkProperty * HoveringProperty
Definition: vtkTexturedButtonRepresentation.h:184