VTK
9.0.1
Interaction
Widgets
vtk3DWidget.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtk3DWidget.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
=========================================================================*/
59
#ifndef vtk3DWidget_h
60
#define vtk3DWidget_h
61
62
#include "vtkInteractionWidgetsModule.h"
// For export macro
63
#include "
vtkInteractorObserver.h
"
64
65
class
vtk3DWidgetConnection;
66
class
vtkAlgorithmOutput
;
67
class
vtkDataSet
;
68
class
vtkProp3D
;
69
70
class
VTKINTERACTIONWIDGETS_EXPORT
vtk3DWidget
:
public
vtkInteractorObserver
71
{
72
public
:
73
vtkTypeMacro(
vtk3DWidget
,
vtkInteractorObserver
);
74
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
75
77
86
virtual
void
PlaceWidget(
double
bounds[6]) = 0;
87
virtual
void
PlaceWidget();
88
virtual
void
PlaceWidget(
89
double
xmin,
double
xmax,
double
ymin,
double
ymax,
double
zmin,
double
zmax);
91
93
98
virtual
void
SetProp3D(
vtkProp3D
*);
99
vtkGetObjectMacro(Prop3D,
vtkProp3D
);
101
103
108
virtual
void
SetInputData(
vtkDataSet
*);
109
virtual
void
SetInputConnection(
vtkAlgorithmOutput
*);
110
virtual
vtkDataSet
* GetInput();
112
114
121
vtkSetClampMacro(PlaceFactor,
double
, 0.01,
VTK_DOUBLE_MAX
);
122
vtkGetMacro(PlaceFactor,
double
);
124
126
132
vtkSetClampMacro(HandleSize,
double
, 0.001, 0.5);
133
vtkGetMacro(HandleSize,
double
);
135
136
protected
:
137
vtk3DWidget
();
138
~
vtk3DWidget
()
override
;
139
140
// Used to position and scale the widget initially
141
vtkProp3D
*
Prop3D
;
142
143
vtk3DWidgetConnection*
ConnectionHolder
;
144
145
// has the widget ever been placed
146
double
PlaceFactor
;
147
int
Placed
;
148
void
AdjustBounds(
double
bounds[6],
double
newBounds[6],
double
center
[3]);
149
150
// control the size of handles (if there are any)
151
double
InitialBounds[6];
152
double
InitialLength
;
153
double
HandleSize
;
154
double
SizeHandles(
double
factor);
155
virtual
void
SizeHandles
() {}
// subclass in turn invokes parent's SizeHandles()
156
157
// used to track the depth of the last pick; also interacts with handle sizing
158
int
ValidPick
;
159
double
LastPickPosition[3];
160
161
void
UpdateInput();
162
163
private
:
164
vtk3DWidget
(
const
vtk3DWidget
&) =
delete
;
165
void
operator=(
const
vtk3DWidget
&) =
delete
;
166
};
167
168
#endif
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition:
vtkProp3D.h:43
vtk3DWidget::Prop3D
vtkProp3D * Prop3D
Definition:
vtk3DWidget.h:141
vtkX3D::center
@ center
Definition:
vtkX3D.h:236
vtk3DWidget::ConnectionHolder
vtk3DWidgetConnection * ConnectionHolder
Definition:
vtk3DWidget.h:143
vtkInteractorObserver
an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor
Definition:
vtkInteractorObserver.h:65
vtk3DWidget::HandleSize
double HandleSize
Definition:
vtk3DWidget.h:153
vtk3DWidget::ValidPick
int ValidPick
Definition:
vtk3DWidget.h:158
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:33
vtk3DWidget
an abstract superclass for 3D widgets
Definition:
vtk3DWidget.h:70
vtk3DWidget::Placed
int Placed
Definition:
vtk3DWidget.h:147
vtkInteractorObserver::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataSet
abstract class to specify dataset behavior
Definition:
vtkDataSet.h:56
vtk3DWidget::SizeHandles
virtual void SizeHandles()
Definition:
vtk3DWidget.h:155
vtk3DWidget::InitialLength
double InitialLength
Definition:
vtk3DWidget.h:152
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition:
vtkAlgorithmOutput.h:36
vtkInteractorObserver.h
vtk3DWidget::PlaceFactor
double PlaceFactor
Definition:
vtk3DWidget.h:146
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition:
vtkType.h:165
Generated on Thu Jun 24 2021 15:17:26 for VTK by
1.8.17