VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Interaction
Widgets
vtkCenteredSliderRepresentation.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkCenteredSliderRepresentation.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
=========================================================================*/
15
16
/*-------------------------------------------------------------------------
17
Copyright 2008 Sandia Corporation.
18
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
19
the U.S. Government retains certain rights in this software.
20
-------------------------------------------------------------------------*/
21
35
#ifndef __vtkCenteredSliderRepresentation_h
36
#define __vtkCenteredSliderRepresentation_h
37
38
#include "vtkInteractionWidgetsModule.h"
// For export macro
39
#include "
vtkSliderRepresentation.h
"
40
#include "
vtkCoordinate.h
"
// For vtkViewportCoordinateMacro
41
42
class
vtkPoints
;
43
class
vtkCellArray
;
44
class
vtkPolyData
;
45
class
vtkPolyDataMapper2D
;
46
class
vtkActor2D
;
47
class
vtkCoordinate
;
48
class
vtkProperty2D
;
49
class
vtkPropCollection
;
50
class
vtkWindow
;
51
class
vtkViewport
;
52
class
vtkTransform
;
53
class
vtkTransformPolyDataFilter
;
54
class
vtkTextProperty
;
55
class
vtkTextMapper
;
56
class
vtkTextActor
;
57
58
59
class
VTKINTERACTIONWIDGETS_EXPORT
vtkCenteredSliderRepresentation
:
public
vtkSliderRepresentation
60
{
61
public
:
63
static
vtkCenteredSliderRepresentation
*
New
();
64
66
67
vtkTypeMacro(
vtkCenteredSliderRepresentation
,
68
vtkSliderRepresentation
);
69
void
PrintSelf
(ostream& os,
vtkIndent
indent);
71
78
vtkCoordinate
*GetPoint1Coordinate();
79
86
vtkCoordinate
*GetPoint2Coordinate();
87
89
91
virtual
void
SetTitleText
(
const
char
*);
92
virtual
const
char
*
GetTitleText
();
94
96
97
vtkGetObjectMacro(TubeProperty,
vtkProperty2D
);
98
vtkGetObjectMacro(SliderProperty,
vtkProperty2D
);
100
102
104
vtkGetObjectMacro(SelectedProperty,
vtkProperty2D
);
106
108
109
vtkGetObjectMacro(LabelProperty,
vtkTextProperty
);
111
113
116
virtual
void
PlaceWidget
(
double
bounds[6]);
117
virtual
void
BuildRepresentation
();
118
virtual
void
StartWidgetInteraction
(
double
eventPos[2]);
119
virtual
int
ComputeInteractionState
(
int
X,
int
Y,
int
modify=0);
120
virtual
void
WidgetInteraction
(
double
eventPos[2]);
121
virtual
void
Highlight
(
int
);
123
125
126
virtual
void
GetActors
(
vtkPropCollection
*);
127
virtual
void
ReleaseGraphicsResources
(
vtkWindow
*);
128
virtual
int
RenderOverlay
(
vtkViewport
*);
129
virtual
int
RenderOpaqueGeometry
(
vtkViewport
*);
131
132
protected
:
133
vtkCenteredSliderRepresentation
();
134
~
vtkCenteredSliderRepresentation
();
135
136
// Positioning the widget
137
vtkCoordinate
*
Point1Coordinate
;
138
vtkCoordinate
*
Point2Coordinate
;
139
140
// Determine the parameter t along the slider
141
virtual
double
ComputePickPosition(
double
x,
double
y);
142
143
// Define the geometry. It is constructed in canaonical position
144
// along the x-axis and then rotated into position.
145
vtkTransform
*
XForm
;
146
vtkPoints
*
Points
;
147
148
vtkCellArray
*
SliderCells
;
149
vtkPolyData
*
Slider
;
150
vtkTransformPolyDataFilter
*
SliderXForm
;
151
vtkPolyDataMapper2D
*
SliderMapper
;
152
vtkActor2D
*
SliderActor
;
153
vtkProperty2D
*
SliderProperty
;
154
155
vtkCellArray
*
TubeCells
;
156
vtkPolyData
*
Tube
;
157
vtkTransformPolyDataFilter
*
TubeXForm
;
158
vtkPolyDataMapper2D
*
TubeMapper
;
159
vtkActor2D
*
TubeActor
;
160
vtkProperty2D
*
TubeProperty
;
161
162
vtkTextProperty
*
LabelProperty
;
163
vtkTextActor
*
LabelActor
;
164
165
vtkProperty2D
*
SelectedProperty
;
166
int
HighlightState
;
167
168
// build the tube geometry
169
void
BuildTube();
170
171
private
:
172
173
// how many points along the tube
174
int
ArcCount;
175
double
ArcStart;
176
double
ArcEnd;
177
double
ButtonSize;
178
double
TubeSize;
179
180
vtkCenteredSliderRepresentation
181
(
const
vtkCenteredSliderRepresentation
&);
// Not implemented
182
void
operator=(
const
vtkCenteredSliderRepresentation
&);
//Not implemented
183
};
184
185
#endif
Generated on Thu May 24 2012 22:22:27 for VTK by
1.8.1