VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
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
=========================================================================*/
58
#ifndef __vtk3DWidget_h
59
#define __vtk3DWidget_h
60
61
#include "
vtkInteractorObserver.h
"
62
63
class
vtkDataSet
;
64
class
vtkProp3D
;
65
66
class
VTK_WIDGETS_EXPORT
vtk3DWidget
:
public
vtkInteractorObserver
67
{
68
public
:
69
vtkTypeMacro(
vtk3DWidget
,
vtkInteractorObserver
);
70
void
PrintSelf
(ostream& os,
vtkIndent
indent);
71
73
80
virtual
void
PlaceWidget(
double
bounds[6]) = 0;
81
virtual
void
PlaceWidget();
82
virtual
void
PlaceWidget(
double
xmin,
double
xmax,
double
ymin,
double
ymax,
83
double
zmin,
double
zmax);
85
87
90
virtual
void
SetProp3D(
vtkProp3D
*);
91
vtkGetObjectMacro(Prop3D,
vtkProp3D
);
93
95
98
virtual
void
SetInput(
vtkDataSet
*);
99
vtkGetObjectMacro(Input,
vtkDataSet
);
101
103
109
vtkSetClampMacro(PlaceFactor,
double
,0.01,
VTK_DOUBLE_MAX
);
110
vtkGetMacro(PlaceFactor,
double
);
112
114
118
vtkSetClampMacro(HandleSize,
double
,0.001,0.5);
119
vtkGetMacro(HandleSize,
double
);
121
122
protected
:
123
vtk3DWidget
();
124
~
vtk3DWidget
();
125
126
// Used to position and scale the widget initially
127
vtkProp3D
*
Prop3D
;
128
vtkDataSet
*
Input
;
129
130
//has the widget ever been placed
131
double
PlaceFactor
;
132
int
Placed
;
133
void
AdjustBounds(
double
bounds[6],
double
newBounds[6],
double
center
[3]);
134
135
//control the size of handles (if there are any)
136
double
InitialBounds[6];
137
double
InitialLength
;
138
double
HandleSize
;
139
double
SizeHandles(
double
factor);
140
virtual
void
SizeHandles
() {}
//subclass in turn invokes parent's SizeHandles()
141
142
//used to track the depth of the last pick; also interacts with handle sizing
143
int
ValidPick
;
144
double
LastPickPosition[3];
145
146
private
:
147
vtk3DWidget
(
const
vtk3DWidget
&);
// Not implemented.
148
void
operator=(
const
vtk3DWidget
&);
// Not implemented.
149
150
};
151
152
#endif
Generated on Fri Aug 2 2013 12:20:03 for VTK by
1.8.4