VTK
vtkSliderRepresentation2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSliderRepresentation2D.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 =========================================================================*/
35 #ifndef vtkSliderRepresentation2D_h
36 #define vtkSliderRepresentation2D_h
37 
38 #include "vtkInteractionWidgetsModule.h" // For export macro
40 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
41 
42 class vtkPoints;
43 class vtkCellArray;
44 class vtkPolyData;
46 class vtkActor2D;
47 class vtkCoordinate;
48 class vtkProperty2D;
49 class vtkPropCollection;
50 class vtkWindow;
51 class vtkViewport;
52 class vtkTransform;
54 class vtkTextProperty;
55 class vtkTextMapper;
56 class vtkTextActor;
57 
58 
59 class VTKINTERACTIONWIDGETS_EXPORT vtkSliderRepresentation2D : public vtkSliderRepresentation
60 {
61 public:
66 
68 
72  void PrintSelf(ostream& os, vtkIndent indent);
74 
84 
94 
96 
100  virtual void SetTitleText(const char*);
101  virtual const char* GetTitleText();
103 
105 
109  vtkGetObjectMacro(SliderProperty,vtkProperty2D);
111 
113 
116  vtkGetObjectMacro(TubeProperty,vtkProperty2D);
117  vtkGetObjectMacro(CapProperty,vtkProperty2D);
119 
121 
125  vtkGetObjectMacro(SelectedProperty,vtkProperty2D);
127 
129 
132  vtkGetObjectMacro(LabelProperty,vtkTextProperty);
133  vtkGetObjectMacro(TitleProperty,vtkTextProperty);
135 
137 
142  virtual void PlaceWidget(double bounds[6]);
143  virtual void BuildRepresentation();
144  virtual void StartWidgetInteraction(double eventPos[2]);
145  virtual void WidgetInteraction(double newEventPos[2]);
146  virtual void Highlight(int);
148 
150 
155  virtual int RenderOverlay(vtkViewport*);
158 
159 protected:
162 
163  // Positioning the widget
166 
167  // Determine the parameter t along the slider
168  virtual double ComputePickPosition(double eventPos[2]);
169 
170  // Define the geometry. It is constructed in canaonical position
171  // along the x-axis and then rotated into position.
174 
181 
188 
195 
199 
203 
205 
206  // internal variables used for computation
207  double X;
208 
209 private:
210  vtkSliderRepresentation2D(const vtkSliderRepresentation2D&) VTK_DELETE_FUNCTION;
211  void operator=(const vtkSliderRepresentation2D&) VTK_DELETE_FUNCTION;
212 };
213 
214 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:40
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:52
vtkSliderRepresentation2D::TubeActor
vtkActor2D * TubeActor
Definition: vtkSliderRepresentation2D.h:186
vtkSliderRepresentation2D::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
vtkSliderRepresentation2D::SetTitleText
virtual void SetTitleText(const char *)
Specify the label text for this widget.
vtkSliderRepresentation2D::LabelProperty
vtkTextProperty * LabelProperty
Definition: vtkSliderRepresentation2D.h:196
vtkSliderRepresentation2D::Cap
vtkPolyData * Cap
Definition: vtkSliderRepresentation2D.h:190
vtkSliderRepresentation2D::LabelActor
vtkActor2D * LabelActor
Definition: vtkSliderRepresentation2D.h:198
vtkSliderRepresentation2D::Point1Coordinate
vtkCoordinate * Point1Coordinate
Definition: vtkSliderRepresentation2D.h:164
vtkSliderRepresentation2D::SliderXForm
vtkTransformPolyDataFilter * SliderXForm
Definition: vtkSliderRepresentation2D.h:177
vtkSliderRepresentation2D::SelectedProperty
vtkProperty2D * SelectedProperty
Definition: vtkSliderRepresentation2D.h:204
vtkSliderRepresentation2D::TubeXForm
vtkTransformPolyDataFilter * TubeXForm
Definition: vtkSliderRepresentation2D.h:184
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:61
vtkSliderRepresentation2D::TitleProperty
vtkTextProperty * TitleProperty
Definition: vtkSliderRepresentation2D.h:200
vtkSliderRepresentation2D::GetActors2D
virtual void GetActors2D(vtkPropCollection *)
Methods supporting the rendering process.
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkSliderRepresentation2D::WidgetInteraction
virtual void WidgetInteraction(double newEventPos[2])
vtkSliderRepresentation2D::Tube
vtkPolyData * Tube
Definition: vtkSliderRepresentation2D.h:183
vtkSliderRepresentation2D::CapXForm
vtkTransformPolyDataFilter * CapXForm
Definition: vtkSliderRepresentation2D.h:191
vtkTextMapper
2D text annotation
Definition: vtkTextMapper.h:54
vtkSliderRepresentation2D::TubeProperty
vtkProperty2D * TubeProperty
Definition: vtkSliderRepresentation2D.h:187
vtkSliderRepresentation2D::Points
vtkPoints * Points
Definition: vtkSliderRepresentation2D.h:173
vtkSliderRepresentation2D::StartWidgetInteraction
virtual void StartWidgetInteraction(double eventPos[2])
vtkSliderRepresentation2D
provide the representation for a vtkSliderWidget with a 3D skin
Definition: vtkSliderRepresentation2D.h:60
vtkTextActor
An actor that displays text.
Definition: vtkTextActor.h:57
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:51
vtkSliderRepresentation2D::XForm
vtkTransform * XForm
Definition: vtkSliderRepresentation2D.h:172
vtkSliderRepresentation2D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkCoordinate
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:71
vtkSliderRepresentation2D::TitleMapper
vtkTextMapper * TitleMapper
Definition: vtkSliderRepresentation2D.h:201
vtkSliderRepresentation2D::SliderCells
vtkCellArray * SliderCells
Definition: vtkSliderRepresentation2D.h:175
vtkSliderRepresentation2D::Highlight
virtual void Highlight(int)
vtkSliderRepresentation2D::SliderMapper
vtkPolyDataMapper2D * SliderMapper
Definition: vtkSliderRepresentation2D.h:178
vtkTransformPolyDataFilter
transform points and associated normals and vectors for polygonal dataset
Definition: vtkTransformPolyDataFilter.h:52
vtkSliderRepresentation2D::Point2Coordinate
vtkCoordinate * Point2Coordinate
Definition: vtkSliderRepresentation2D.h:165
vtkSliderRepresentation2D::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:48
vtkSliderRepresentation2D::ComputePickPosition
virtual double ComputePickPosition(double eventPos[2])
vtkCoordinate.h
vtkSliderRepresentation2D::X
double X
Definition: vtkSliderRepresentation2D.h:207
vtkSliderRepresentation2D::GetPoint2Coordinate
vtkCoordinate * GetPoint2Coordinate()
Position the second end point of the slider.
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:40
vtkSliderRepresentation2D::CapProperty
vtkProperty2D * CapProperty
Definition: vtkSliderRepresentation2D.h:194
vtkSliderRepresentation2D::TubeCells
vtkCellArray * TubeCells
Definition: vtkSliderRepresentation2D.h:182
vtkSliderRepresentation2D::vtkSliderRepresentation2D
vtkSliderRepresentation2D()
vtkProperty2D
represent surface properties of a 2D image
Definition: vtkProperty2D.h:41
vtkSliderRepresentation2D::GetPoint1Coordinate
vtkCoordinate * GetPoint1Coordinate()
Position the first end point of the slider.
vtkSliderRepresentation2D::CapCells
vtkCellArray * CapCells
Definition: vtkSliderRepresentation2D.h:189
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:46
vtkSliderRepresentation2D::GetTitleText
virtual const char * GetTitleText()
vtkSliderRepresentation.h
vtkSliderRepresentation2D::~vtkSliderRepresentation2D
~vtkSliderRepresentation2D()
vtkSliderRepresentation2D::Slider
vtkPolyData * Slider
Definition: vtkSliderRepresentation2D.h:176
vtkSliderRepresentation2D::BuildRepresentation
virtual void BuildRepresentation()
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkSliderRepresentation2D::New
static vtkSliderRepresentation2D * New()
Instantiate the class.
vtkSliderRepresentation2D::PlaceWidget
virtual void PlaceWidget(double bounds[6])
Methods to interface with the vtkSliderWidget.
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:39
vtkSliderRepresentation2D::RenderOverlay
virtual int RenderOverlay(vtkViewport *)
vtkSliderRepresentation2D::CapMapper
vtkPolyDataMapper2D * CapMapper
Definition: vtkSliderRepresentation2D.h:192
vtkSliderRepresentation
abstract class defines the representation for a vtkSliderWidget
Definition: vtkSliderRepresentation.h:43
vtkSliderRepresentation2D::LabelMapper
vtkTextMapper * LabelMapper
Definition: vtkSliderRepresentation2D.h:197
vtkSliderRepresentation2D::TitleActor
vtkActor2D * TitleActor
Definition: vtkSliderRepresentation2D.h:202
vtkSliderRepresentation2D::TubeMapper
vtkPolyDataMapper2D * TubeMapper
Definition: vtkSliderRepresentation2D.h:185
vtkSliderRepresentation2D::SliderProperty
vtkProperty2D * SliderProperty
Definition: vtkSliderRepresentation2D.h:180
vtkSliderRepresentation2D::CapActor
vtkActor2D * CapActor
Definition: vtkSliderRepresentation2D.h:193
vtkSliderRepresentation2D::SliderActor
vtkActor2D * SliderActor
Definition: vtkSliderRepresentation2D.h:179