VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Interaction
Widgets
vtkAxesTransformRepresentation.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkAxesTransformRepresentation.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
=========================================================================*/
31
#ifndef __vtkAxesTransformRepresentation_h
32
#define __vtkAxesTransformRepresentation_h
33
34
#include "vtkInteractionWidgetsModule.h"
// For export macro
35
#include "
vtkWidgetRepresentation.h
"
36
37
class
vtkHandleRepresentation
;
38
class
vtkPoints
;
39
class
vtkPolyData
;
40
class
vtkPolyDataMapper
;
41
class
vtkActor
;
42
class
vtkVectorText
;
43
class
vtkFollower
;
44
class
vtkBox
;
45
class
vtkCylinderSource
;
46
class
vtkGlyph3D
;
47
class
vtkDoubleArray
;
48
class
vtkTransformPolyDataFilter
;
49
class
vtkProperty
;
50
51
52
class
VTKINTERACTIONWIDGETS_EXPORT
vtkAxesTransformRepresentation
:
public
vtkWidgetRepresentation
53
{
54
public
:
56
static
vtkAxesTransformRepresentation
*
New
();
57
59
60
vtkTypeMacro(
vtkAxesTransformRepresentation
,
vtkWidgetRepresentation
);
61
void
PrintSelf
(ostream& os,
vtkIndent
indent);
63
65
68
vtkGetObjectMacro(OriginRepresentation,
vtkHandleRepresentation
);
69
vtkGetObjectMacro(SelectionRepresentation,
vtkHandleRepresentation
);
71
73
76
double
* GetOriginWorldPosition();
77
void
GetOriginWorldPosition(
double
pos[3]);
78
void
SetOriginWorldPosition(
double
pos[3]);
79
void
SetOriginDisplayPosition(
double
pos[3]);
80
void
GetOriginDisplayPosition(
double
pos[3]);
82
90
vtkSetClampMacro(Tolerance,
int
,1,100);
91
vtkGetMacro(Tolerance,
int
);
93
95
98
vtkSetStringMacro(LabelFormat);
99
vtkGetStringMacro
(LabelFormat);
101
103
enum
{Outside=0,OnOrigin,OnX,OnY,OnZ,OnXEnd,OnYEnd,OnZEnd};
104
106
113
vtkSetClampMacro(InteractionState,
int
,Outside,OnZEnd);
115
117
118
virtual
void
BuildRepresentation
();
119
virtual
int
ComputeInteractionState
(
int
X,
int
Y,
int
modify=0);
120
virtual
void
StartWidgetInteraction
(
double
e[2]);
121
virtual
void
WidgetInteraction
(
double
e[2]);
122
virtual
double
*
GetBounds
();
124
126
127
virtual
void
ReleaseGraphicsResources
(
vtkWindow
*w);
128
virtual
int
RenderOpaqueGeometry
(
vtkViewport
*viewport);
129
virtual
int
RenderTranslucentPolygonalGeometry
(
vtkViewport
*viewport);
131
133
135
void
SetLabelScale(
double
x,
double
y,
double
z)
136
{
137
double
scale
[3];
138
scale[0] = x;
139
scale[1] = y;
140
scale[2] = z;
141
this->SetLabelScale(scale);
142
}
143
virtual
void
SetLabelScale(
double
scale
[3] );
144
virtual
double
* GetLabelScale();
146
148
virtual
vtkProperty
*GetLabelProperty();
149
150
protected
:
151
vtkAxesTransformRepresentation
();
152
~
vtkAxesTransformRepresentation
();
153
154
// The handle and the rep used to close the handles
155
vtkHandleRepresentation
*
OriginRepresentation
;
156
vtkHandleRepresentation
*
SelectionRepresentation
;
157
158
// Selection tolerance for the handles
159
int
Tolerance
;
160
161
// Format for printing the distance
162
char
*
LabelFormat
;
163
164
// The line
165
vtkPoints
*
LinePoints
;
166
vtkPolyData
*
LinePolyData
;
167
vtkPolyDataMapper
*
LineMapper
;
168
vtkActor
*
LineActor
;
169
170
// The distance label
171
vtkVectorText
*
LabelText
;
172
vtkPolyDataMapper
*
LabelMapper
;
173
vtkFollower
*
LabelActor
;
174
175
// The 3D disk tick marks
176
vtkPoints
*
GlyphPoints
;
177
vtkDoubleArray
*
GlyphVectors
;
178
vtkPolyData
*
GlyphPolyData
;
179
vtkCylinderSource
*
GlyphCylinder
;
180
vtkTransformPolyDataFilter
*
GlyphXForm
;
181
vtkGlyph3D
*
Glyph3D
;
182
vtkPolyDataMapper
*
GlyphMapper
;
183
vtkActor
*
GlyphActor
;
184
185
// Support GetBounds() method
186
vtkBox
*
BoundingBox
;
187
188
double
LastEventPosition[3];
189
190
private
:
191
vtkAxesTransformRepresentation
(
const
vtkAxesTransformRepresentation
&);
//Not implemented
192
void
operator=(
const
vtkAxesTransformRepresentation
&);
//Not implemented
193
};
194
195
#endif
Generated on Thu May 24 2012 22:22:27 for VTK by
1.8.1