VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Widgets
vtkAngleWidget.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkAngleWidget.h,v
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
=========================================================================*/
79
#ifndef __vtkAngleWidget_h
80
#define __vtkAngleWidget_h
81
82
#include "
vtkAbstractWidget.h
"
83
84
class
vtkAngleRepresentation
;
85
class
vtkHandleWidget
;
86
class
vtkAngleWidgetCallback;
87
88
89
class
VTK_WIDGETS_EXPORT
vtkAngleWidget
:
public
vtkAbstractWidget
90
{
91
public
:
93
static
vtkAngleWidget
*
New
();
94
96
97
vtkTypeMacro(
vtkAngleWidget
,
vtkAbstractWidget
);
98
void
PrintSelf
(ostream& os,
vtkIndent
indent);
100
104
virtual
void
SetEnabled
(
int
);
105
107
110
void
SetRepresentation(
vtkAngleRepresentation
*r)
111
{this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
113
115
void
CreateDefaultRepresentation
();
116
118
119
vtkAngleRepresentation
*GetAngleRepresentation()
120
{
return
reinterpret_cast<
vtkAngleRepresentation
*
>
(this->
WidgetRep
);}
122
125
int
IsAngleValid();
126
129
virtual
void
SetProcessEvents
(
int
);
130
132
136
enum
{Start=0,Define,Manipulate};
137
//ETX
139
141
149
virtual
void
SetWidgetStateToStart();
150
virtual
void
SetWidgetStateToManipulate();
152
154
155
virtual
int
GetWidgetState()
156
{
return
this->WidgetState;}
158
159
protected
:
160
vtkAngleWidget
();
161
~
vtkAngleWidget
();
162
163
// The state of the widget
164
int
WidgetState
;
165
int
CurrentHandle
;
166
167
// Callback interface to capture events when
168
// placing the widget.
169
static
void
AddPointAction(
vtkAbstractWidget
*);
170
static
void
MoveAction(
vtkAbstractWidget
*);
171
static
void
EndSelectAction(
vtkAbstractWidget
*);
172
173
// The positioning handle widgets
174
vtkHandleWidget
*
Point1Widget
;
175
vtkHandleWidget
*
CenterWidget
;
176
vtkHandleWidget
*
Point2Widget
;
177
vtkAngleWidgetCallback *
AngleWidgetCallback1
;
178
vtkAngleWidgetCallback *
AngleWidgetCenterCallback
;
179
vtkAngleWidgetCallback *
AngleWidgetCallback2
;
180
181
// Methods invoked when the handles at the
182
// end points of the widget are manipulated
183
void
StartAngleInteraction(
int
handleNum);
184
void
AngleInteraction(
int
handleNum);
185
void
EndAngleInteraction(
int
handleNum);
186
187
//BTX
188
friend
class
vtkAngleWidgetCallback;
189
//ETX
190
191
private
:
192
vtkAngleWidget
(
const
vtkAngleWidget
&);
//Not implemented
193
void
operator=(
const
vtkAngleWidget
&);
//Not implemented
194
};
195
196
#endif
Generated on Wed Nov 21 2012 21:34:08 for VTK by
1.8.2