VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Interaction
Widgets
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
38
#include "
vtkSliderRepresentation.h
"
39
#include "
vtkCoordinate.h
"
// For vtkViewportCoordinateMacro
40
41
class
vtkPoints
;
42
class
vtkCellArray
;
43
class
vtkPolyData
;
44
class
vtkPolyDataMapper2D
;
45
class
vtkActor2D
;
46
class
vtkCoordinate
;
47
class
vtkProperty2D
;
48
class
vtkPropCollection
;
49
class
vtkWindow
;
50
class
vtkViewport
;
51
class
vtkTransform
;
52
class
vtkTransformPolyDataFilter
;
53
class
vtkTextProperty
;
54
class
vtkTextMapper
;
55
class
vtkTextActor
;
56
57
58
class
VTKINTERACTIONWIDGETS_EXPORT
vtkSliderRepresentation2D
:
public
vtkSliderRepresentation
59
{
60
public
:
62
static
vtkSliderRepresentation2D
*
New
();
63
65
66
vtkTypeMacro(
vtkSliderRepresentation2D
,
vtkSliderRepresentation
);
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
:
137
vtkSliderRepresentation2D
();
138
~
vtkSliderRepresentation2D
();
139
140
// Positioning the widget
141
vtkCoordinate
*
Point1Coordinate
;
142
vtkCoordinate
*
Point2Coordinate
;
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.
149
vtkTransform
*
XForm
;
150
vtkPoints
*
Points
;
151
152
vtkCellArray
*
SliderCells
;
153
vtkPolyData
*
Slider
;
154
vtkTransformPolyDataFilter
*
SliderXForm
;
155
vtkPolyDataMapper2D
*
SliderMapper
;
156
vtkActor2D
*
SliderActor
;
157
vtkProperty2D
*
SliderProperty
;
158
159
vtkCellArray
*
TubeCells
;
160
vtkPolyData
*
Tube
;
161
vtkTransformPolyDataFilter
*
TubeXForm
;
162
vtkPolyDataMapper2D
*
TubeMapper
;
163
vtkActor2D
*
TubeActor
;
164
vtkProperty2D
*
TubeProperty
;
165
166
vtkCellArray
*
CapCells
;
167
vtkPolyData
*
Cap
;
168
vtkTransformPolyDataFilter
*
CapXForm
;
169
vtkPolyDataMapper2D
*
CapMapper
;
170
vtkActor2D
*
CapActor
;
171
vtkProperty2D
*
CapProperty
;
172
173
vtkTextProperty
*
LabelProperty
;
174
vtkTextMapper
*
LabelMapper
;
175
vtkActor2D
*
LabelActor
;
176
177
vtkTextProperty
*
TitleProperty
;
178
vtkTextMapper
*
TitleMapper
;
179
vtkActor2D
*
TitleActor
;
180
181
vtkProperty2D
*
SelectedProperty
;
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
Generated on Thu May 24 2012 22:22:28 for VTK by
1.8.1