VTK
9.1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Interaction
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
=========================================================================*/
106
#ifndef vtkAngleWidget_h
107
#define vtkAngleWidget_h
108
109
#include "
vtkAbstractWidget.h
"
110
#include "vtkInteractionWidgetsModule.h"
// For export macro
111
112
class
vtkAngleRepresentation
;
113
class
vtkHandleWidget
;
114
class
vtkAngleWidgetCallback;
115
116
class
VTKINTERACTIONWIDGETS_EXPORT
vtkAngleWidget
:
public
vtkAbstractWidget
117
{
118
public
:
122
static
vtkAngleWidget
*
New
();
123
125
128
vtkTypeMacro(
vtkAngleWidget
,
vtkAbstractWidget
);
129
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
131
137
void
SetEnabled
(
int
)
override
;
138
144
void
SetRepresentation
(
vtkAngleRepresentation
* r)
145
{
146
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
147
}
148
152
void
CreateDefaultRepresentation
()
override
;
153
157
vtkAngleRepresentation
*
GetAngleRepresentation
()
158
{
159
return
reinterpret_cast<
vtkAngleRepresentation
*
>
(this->
WidgetRep
);
160
}
161
166
vtkTypeBool
IsAngleValid
();
167
172
void
SetProcessEvents
(
vtkTypeBool
)
override
;
173
180
enum
181
{
182
Start = 0,
183
Define
,
184
Manipulate
185
};
186
188
198
virtual
void
SetWidgetStateToStart
();
199
virtual
void
SetWidgetStateToManipulate
();
201
205
virtual
int
GetWidgetState
() {
return
this->WidgetState; }
206
207
protected
:
208
vtkAngleWidget
();
209
~vtkAngleWidget
()
override
;
210
211
// The state of the widget
212
int
WidgetState
;
213
int
CurrentHandle
;
214
215
// Callback interface to capture events when
216
// placing the widget.
217
static
void
AddPointAction
(
vtkAbstractWidget
*);
218
static
void
MoveAction
(
vtkAbstractWidget
*);
219
static
void
EndSelectAction
(
vtkAbstractWidget
*);
220
221
// The positioning handle widgets
222
vtkHandleWidget
*
Point1Widget
;
223
vtkHandleWidget
*
CenterWidget
;
224
vtkHandleWidget
*
Point2Widget
;
225
vtkAngleWidgetCallback*
AngleWidgetCallback1
;
226
vtkAngleWidgetCallback*
AngleWidgetCenterCallback
;
227
vtkAngleWidgetCallback*
AngleWidgetCallback2
;
228
229
// Methods invoked when the handles at the
230
// end points of the widget are manipulated
231
void
StartAngleInteraction
(
int
handleNum);
232
void
AngleInteraction
(
int
handleNum);
233
void
EndAngleInteraction
(
int
handleNum);
234
235
friend
class
vtkAngleWidgetCallback;
236
237
private
:
238
vtkAngleWidget
(
const
vtkAngleWidget
&) =
delete
;
239
void
operator=(
const
vtkAngleWidget
&) =
delete
;
240
};
241
242
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:66
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition:
vtkAbstractWidget.h:175
vtkAngleRepresentation
represent the vtkAngleWidget
Definition:
vtkAngleRepresentation.h:39
vtkAngleWidget
measure the angle between two rays (defined by three points)
Definition:
vtkAngleWidget.h:117
vtkAngleWidget::~vtkAngleWidget
~vtkAngleWidget() override
vtkAngleWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkAngleWidget::AngleWidgetCallback2
vtkAngleWidgetCallback * AngleWidgetCallback2
Definition:
vtkAngleWidget.h:227
vtkAngleWidget::AngleWidgetCallback1
vtkAngleWidgetCallback * AngleWidgetCallback1
Definition:
vtkAngleWidget.h:225
vtkAngleWidget::Point2Widget
vtkHandleWidget * Point2Widget
Definition:
vtkAngleWidget.h:224
vtkAngleWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for a VTK class.
vtkAngleWidget::GetAngleRepresentation
vtkAngleRepresentation * GetAngleRepresentation()
Return the representation as a vtkAngleRepresentation.
Definition:
vtkAngleWidget.h:157
vtkAngleWidget::IsAngleValid
vtkTypeBool IsAngleValid()
A flag indicates whether the angle is valid.
vtkAngleWidget::vtkAngleWidget
vtkAngleWidget()
vtkAngleWidget::WidgetState
int WidgetState
Definition:
vtkAngleWidget.h:212
vtkAngleWidget::AngleWidgetCenterCallback
vtkAngleWidgetCallback * AngleWidgetCenterCallback
Definition:
vtkAngleWidget.h:226
vtkAngleWidget::SetWidgetStateToStart
virtual void SetWidgetStateToStart()
Set the state of the widget.
vtkAngleWidget::GetWidgetState
virtual int GetWidgetState()
Return the current widget state.
Definition:
vtkAngleWidget.h:205
vtkAngleWidget::CenterWidget
vtkHandleWidget * CenterWidget
Definition:
vtkAngleWidget.h:223
vtkAngleWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkAngleWidget::AddPointAction
static void AddPointAction(vtkAbstractWidget *)
vtkAngleWidget::New
static vtkAngleWidget * New()
Instantiate this class.
vtkAngleWidget::AngleInteraction
void AngleInteraction(int handleNum)
vtkAngleWidget::SetRepresentation
void SetRepresentation(vtkAngleRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition:
vtkAngleWidget.h:144
vtkAngleWidget::CurrentHandle
int CurrentHandle
Definition:
vtkAngleWidget.h:213
vtkAngleWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkAngleWidget::Define
@ Define
Definition:
vtkAngleWidget.h:183
vtkAngleWidget::StartAngleInteraction
void StartAngleInteraction(int handleNum)
vtkAngleWidget::SetWidgetStateToManipulate
virtual void SetWidgetStateToManipulate()
Set the state of the widget.
vtkAngleWidget::SetProcessEvents
void SetProcessEvents(vtkTypeBool) override
Methods to change the whether the widget responds to interaction.
vtkAngleWidget::Point1Widget
vtkHandleWidget * Point1Widget
Definition:
vtkAngleWidget.h:222
vtkAngleWidget::SetEnabled
void SetEnabled(int) override
The method for activating and deactivating this widget.
vtkAngleWidget::EndAngleInteraction
void EndAngleInteraction(int handleNum)
vtkHandleWidget
a general widget for moving handles
Definition:
vtkHandleWidget.h:79
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:113
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition:
vtkWidgetRepresentation.h:60
vtkTypeBool
int vtkTypeBool
Definition:
vtkABI.h:69
vtkAbstractWidget.h
Generated on Fri Apr 21 2023 10:28:51 for VTK by
1.9.6