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 =========================================================================*/
34 #ifndef vtkSliderRepresentation2D_h
35 #define vtkSliderRepresentation2D_h
36 
37 #include "vtkInteractionWidgetsModule.h" // For export macro
39 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
40 
41 class vtkPoints;
42 class vtkCellArray;
43 class vtkPolyData;
45 class vtkActor2D;
46 class vtkCoordinate;
47 class vtkProperty2D;
48 class vtkPropCollection;
49 class vtkWindow;
50 class vtkViewport;
51 class vtkTransform;
53 class vtkTextProperty;
54 class vtkTextMapper;
55 class vtkTextActor;
56 
57 
59 {
60 public:
63 
65 
67  void PrintSelf(ostream& os, vtkIndent indent);
69 
76  vtkCoordinate *GetPoint1Coordinate();
77 
84  vtkCoordinate *GetPoint2Coordinate();
85 
87 
89  virtual void SetTitleText(const char*);
90  virtual const char* GetTitleText();
92 
94 
96  vtkGetObjectMacro(SliderProperty,vtkProperty2D);
98 
100 
101  vtkGetObjectMacro(TubeProperty,vtkProperty2D);
102  vtkGetObjectMacro(CapProperty,vtkProperty2D);
104 
106 
108  vtkGetObjectMacro(SelectedProperty,vtkProperty2D);
110 
112 
113  vtkGetObjectMacro(LabelProperty,vtkTextProperty);
114  vtkGetObjectMacro(TitleProperty,vtkTextProperty);
116 
118 
121  virtual void PlaceWidget(double bounds[6]);
122  virtual void BuildRepresentation();
123  virtual void StartWidgetInteraction(double eventPos[2]);
124  virtual void WidgetInteraction(double newEventPos[2]);
125  virtual void Highlight(int);
127 
129 
130  virtual void GetActors2D(vtkPropCollection*);
131  virtual void ReleaseGraphicsResources(vtkWindow*);
132  virtual int RenderOverlay(vtkViewport*);
133  virtual int RenderOpaqueGeometry(vtkViewport*);
135 
136 protected:
139 
140  // Positioning the widget
143 
144  // Determine the parameter t along the slider
145  virtual double ComputePickPosition(double eventPos[2]);
146 
147  // Define the geometry. It is constructed in canaonical position
148  // along the x-axis and then rotated into position.
151 
158 
165 
172 
176 
180 
182 
183  // internal variables used for computation
184  double X;
185 
186 private:
187  vtkSliderRepresentation2D(const vtkSliderRepresentation2D&); //Not implemented
188  void operator=(const vtkSliderRepresentation2D&); //Not implemented
189 };
190 
191 #endif
provide the representation for a vtkSliderWidget with a 3D skin
virtual int RenderOverlay(vtkViewport *vtkNotUsed(viewport))
abstract specification for Viewports
Definition: vtkViewport.h:46
virtual void StartWidgetInteraction(double eventPos[2])
vtkTransformPolyDataFilter * CapXForm
a actor that draws 2D data
Definition: vtkActor2D.h:44
vtkTransformPolyDataFilter * TubeXForm
transform points and associated normals and vectors for polygonal dataset
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:59
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
virtual void SetTitleText(const char *)
virtual void ReleaseGraphicsResources(vtkWindow *)
virtual void BuildRepresentation()=0
2D text annotation
Definition: vtkTextMapper.h:52
a list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
#define VTKINTERACTIONWIDGETS_EXPORT
An actor that displays text. Scaled or unscaled.
Definition: vtkTextActor.h:54
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkTransformPolyDataFilter * SliderXForm
virtual void WidgetInteraction(double newEventPos[2])
represent text properties.
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:69
abstract class defines the representation for a vtkSliderWidget
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport))
virtual void GetActors2D(vtkPropCollection *)
virtual void PlaceWidget(double *vtkNotUsed(bounds[6]))
virtual void Highlight(int vtkNotUsed(highlightOn))
virtual const char * GetTitleText()
represent surface properties of a 2D image
Definition: vtkProperty2D.h:39
static vtkObject * New()
draw vtkPolyData onto the image plane
void PrintSelf(ostream &os, vtkIndent indent)
represent and manipulate 3D points
Definition: vtkPoints.h:38