VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
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 "
vtkSliderRepresentation.h
"
38
#include "
vtkCoordinate.h
"
// For vtkViewportCoordinateMacro
39
40
class
vtkPoints
;
41
class
vtkCellArray
;
42
class
vtkPolyData
;
43
class
vtkPolyDataMapper2D
;
44
class
vtkActor2D
;
45
class
vtkCoordinate
;
46
class
vtkProperty2D
;
47
class
vtkPropCollection
;
48
class
vtkWindow
;
49
class
vtkViewport
;
50
class
vtkTransform
;
51
class
vtkTransformPolyDataFilter
;
52
class
vtkTextProperty
;
53
class
vtkTextMapper
;
54
class
vtkTextActor
;
55
56
57
class
VTK_WIDGETS_EXPORT
vtkSliderRepresentation2D
:
public
vtkSliderRepresentation
58
{
59
public
:
61
static
vtkSliderRepresentation2D
*
New
();
62
64
65
vtkTypeMacro(
vtkSliderRepresentation2D
,
vtkSliderRepresentation
);
66
void
PrintSelf
(ostream& os,
vtkIndent
indent);
68
75
vtkCoordinate
*GetPoint1Coordinate();
76
83
vtkCoordinate
*GetPoint2Coordinate();
84
86
88
virtual
void
SetTitleText
(
const
char
*);
89
virtual
const
char
*
GetTitleText
();
91
93
95
vtkGetObjectMacro(SliderProperty,
vtkProperty2D
);
97
99
100
vtkGetObjectMacro(TubeProperty,
vtkProperty2D
);
101
vtkGetObjectMacro(CapProperty,
vtkProperty2D
);
103
105
107
vtkGetObjectMacro(SelectedProperty,
vtkProperty2D
);
109
111
112
vtkGetObjectMacro(LabelProperty,
vtkTextProperty
);
113
vtkGetObjectMacro(TitleProperty,
vtkTextProperty
);
115
117
120
virtual
void
PlaceWidget
(
double
bounds[6]);
121
virtual
void
BuildRepresentation
();
122
virtual
void
StartWidgetInteraction
(
double
eventPos[2]);
123
virtual
void
WidgetInteraction
(
double
newEventPos[2]);
124
virtual
void
Highlight
(
int
);
126
128
129
virtual
void
GetActors2D
(
vtkPropCollection
*);
130
virtual
void
ReleaseGraphicsResources
(
vtkWindow
*);
131
virtual
int
RenderOverlay
(
vtkViewport
*);
132
virtual
int
RenderOpaqueGeometry
(
vtkViewport
*);
134
135
protected
:
136
vtkSliderRepresentation2D
();
137
~
vtkSliderRepresentation2D
();
138
139
// Positioning the widget
140
vtkCoordinate
*
Point1Coordinate
;
141
vtkCoordinate
*
Point2Coordinate
;
142
143
// Determine the parameter t along the slider
144
virtual
double
ComputePickPosition(
double
eventPos[2]);
145
146
// Define the geometry. It is constructed in canaonical position
147
// along the x-axis and then rotated into position.
148
vtkTransform
*
XForm
;
149
vtkPoints
*
Points
;
150
151
vtkCellArray
*
SliderCells
;
152
vtkPolyData
*
Slider
;
153
vtkTransformPolyDataFilter
*
SliderXForm
;
154
vtkPolyDataMapper2D
*
SliderMapper
;
155
vtkActor2D
*
SliderActor
;
156
vtkProperty2D
*
SliderProperty
;
157
158
vtkCellArray
*
TubeCells
;
159
vtkPolyData
*
Tube
;
160
vtkTransformPolyDataFilter
*
TubeXForm
;
161
vtkPolyDataMapper2D
*
TubeMapper
;
162
vtkActor2D
*
TubeActor
;
163
vtkProperty2D
*
TubeProperty
;
164
165
vtkCellArray
*
CapCells
;
166
vtkPolyData
*
Cap
;
167
vtkTransformPolyDataFilter
*
CapXForm
;
168
vtkPolyDataMapper2D
*
CapMapper
;
169
vtkActor2D
*
CapActor
;
170
vtkProperty2D
*
CapProperty
;
171
172
vtkTextProperty
*
LabelProperty
;
173
vtkTextMapper
*
LabelMapper
;
174
vtkActor2D
*
LabelActor
;
175
176
vtkTextProperty
*
TitleProperty
;
177
vtkTextMapper
*
TitleMapper
;
178
vtkActor2D
*
TitleActor
;
179
180
vtkProperty2D
*
SelectedProperty
;
181
182
// internal variables used for computation
183
double
X
;
184
185
private
:
186
vtkSliderRepresentation2D
(
const
vtkSliderRepresentation2D
&);
//Not implemented
187
void
operator=(
const
vtkSliderRepresentation2D
&);
//Not implemented
188
};
189
190
#endif
Generated on Fri Aug 2 2013 12:20:04 for VTK by
1.8.4