VTK
dox
Interaction
Widgets
vtkBoxWidget2.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkBoxWidget2.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
=========================================================================*/
96
#ifndef vtkBoxWidget2_h
97
#define vtkBoxWidget2_h
98
99
#include "vtkInteractionWidgetsModule.h"
// For export macro
100
#include "
vtkAbstractWidget.h
"
101
102
class
vtkBoxRepresentation
;
103
class
vtkHandleWidget
;
104
105
106
class
VTKINTERACTIONWIDGETS_EXPORT
vtkBoxWidget2
:
public
vtkAbstractWidget
107
{
108
public
:
112
static
vtkBoxWidget2
*
New
();
113
115
118
vtkTypeMacro(
vtkBoxWidget2
,
vtkAbstractWidget
);
119
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
121
127
void
SetRepresentation
(
vtkBoxRepresentation
*r)
128
{this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
129
131
139
vtkSetMacro(TranslationEnabled,
vtkTypeBool
);
140
vtkGetMacro(TranslationEnabled,
vtkTypeBool
);
141
vtkBooleanMacro(TranslationEnabled,
vtkTypeBool
);
142
vtkSetMacro(ScalingEnabled,
vtkTypeBool
);
143
vtkGetMacro(ScalingEnabled,
vtkTypeBool
);
144
vtkBooleanMacro(ScalingEnabled,
vtkTypeBool
);
145
vtkSetMacro(RotationEnabled,
vtkTypeBool
);
146
vtkGetMacro(RotationEnabled,
vtkTypeBool
);
147
vtkBooleanMacro(RotationEnabled,
vtkTypeBool
);
148
vtkSetMacro(MoveFacesEnabled,
vtkTypeBool
);
149
vtkGetMacro(MoveFacesEnabled,
vtkTypeBool
);
150
vtkBooleanMacro(MoveFacesEnabled,
vtkTypeBool
);
152
157
void
CreateDefaultRepresentation
()
override
;
158
159
protected
:
160
vtkBoxWidget2
();
161
~
vtkBoxWidget2
()
override
;
162
163
// Manage the state of the widget
164
int
WidgetState
;
165
enum
_WidgetState
{Start=0,Active};
166
167
// These methods handle events
168
static
void
SelectAction(
vtkAbstractWidget
*);
169
static
void
EndSelectAction(
vtkAbstractWidget
*);
170
static
void
TranslateAction(
vtkAbstractWidget
*);
171
static
void
ScaleAction(
vtkAbstractWidget
*);
172
static
void
MoveAction(
vtkAbstractWidget
*);
173
static
void
SelectAction3D(
vtkAbstractWidget
*);
174
static
void
EndSelectAction3D(
vtkAbstractWidget
*);
175
static
void
MoveAction3D(
vtkAbstractWidget
*);
176
static
void
StepAction3D(
vtkAbstractWidget
*);
177
178
179
// Control whether scaling, rotation, and translation are supported
180
vtkTypeBool
TranslationEnabled
;
181
vtkTypeBool
ScalingEnabled
;
182
vtkTypeBool
RotationEnabled
;
183
vtkTypeBool
MoveFacesEnabled
;
184
private
:
185
vtkBoxWidget2
(
const
vtkBoxWidget2
&) =
delete
;
186
void
operator=(
const
vtkBoxWidget2
&) =
delete
;
187
};
188
189
#endif
vtkBoxWidget2
3D widget for manipulating a box
Definition:
vtkBoxWidget2.h:106
vtkHandleWidget
a general widget for moving handles
Definition:
vtkHandleWidget.h:76
vtkBoxWidget2::WidgetState
int WidgetState
Definition:
vtkBoxWidget2.h:164
vtkBoxRepresentation
a class defining the representation for the vtkBoxWidget2
Definition:
vtkBoxRepresentation.h:63
vtkAbstractWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractWidget.h
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkBoxWidget2::TranslationEnabled
vtkTypeBool TranslationEnabled
Definition:
vtkBoxWidget2.h:180
vtkBoxWidget2::ScalingEnabled
vtkTypeBool ScalingEnabled
Definition:
vtkBoxWidget2.h:181
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:63
vtkAbstractWidget::CreateDefaultRepresentation
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkBoxWidget2::SetRepresentation
void SetRepresentation(vtkBoxRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition:
vtkBoxWidget2.h:127
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkBoxWidget2::MoveFacesEnabled
vtkTypeBool MoveFacesEnabled
Definition:
vtkBoxWidget2.h:183
vtkBoxWidget2::_WidgetState
_WidgetState
Definition:
vtkBoxWidget2.h:165
vtkBoxWidget2::RotationEnabled
vtkTypeBool RotationEnabled
Definition:
vtkBoxWidget2.h:182
vtkTypeBool
int vtkTypeBool
Definition:
vtkABI.h:69
Generated by
1.8.16