VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
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 "
vtkWidgetRepresentation.h
"
35
36
class
vtkHandleRepresentation
;
37
class
vtkPoints
;
38
class
vtkPolyData
;
39
class
vtkPolyDataMapper
;
40
class
vtkActor
;
41
class
vtkVectorText
;
42
class
vtkFollower
;
43
class
vtkBox
;
44
class
vtkCylinderSource
;
45
class
vtkGlyph3D
;
46
class
vtkDoubleArray
;
47
class
vtkTransformPolyDataFilter
;
48
class
vtkProperty
;
49
50
51
class
VTK_WIDGETS_EXPORT
vtkAxesTransformRepresentation
:
public
vtkWidgetRepresentation
52
{
53
public
:
55
static
vtkAxesTransformRepresentation
*
New
();
56
58
59
vtkTypeMacro(
vtkAxesTransformRepresentation
,
vtkWidgetRepresentation
);
60
void
PrintSelf
(ostream& os,
vtkIndent
indent);
62
64
67
vtkGetObjectMacro(OriginRepresentation,
vtkHandleRepresentation
);
68
vtkGetObjectMacro(SelectionRepresentation,
vtkHandleRepresentation
);
70
72
75
double
* GetOriginWorldPosition();
76
void
GetOriginWorldPosition(
double
pos[3]);
77
void
SetOriginWorldPosition(
double
pos[3]);
78
void
SetOriginDisplayPosition(
double
pos[3]);
79
void
GetOriginDisplayPosition(
double
pos[3]);
81
89
vtkSetClampMacro(Tolerance,
int
,1,100);
90
vtkGetMacro(Tolerance,
int
);
92
94
97
vtkSetStringMacro(LabelFormat);
98
vtkGetStringMacro(LabelFormat);
100
102
enum
{Outside=0,OnOrigin,OnX,OnY,OnZ,OnXEnd,OnYEnd,OnZEnd};
103
105
112
vtkSetClampMacro(InteractionState,
int
,Outside,OnZEnd);
114
116
117
virtual
void
BuildRepresentation
();
118
virtual
int
ComputeInteractionState
(
int
X,
int
Y,
int
modify=0);
119
virtual
void
StartWidgetInteraction
(
double
e[2]);
120
virtual
void
WidgetInteraction
(
double
e[2]);
121
virtual
double
*
GetBounds
();
123
125
126
virtual
void
ReleaseGraphicsResources
(
vtkWindow
*w);
127
virtual
int
RenderOpaqueGeometry
(
vtkViewport
*viewport);
128
virtual
int
RenderTranslucentPolygonalGeometry
(
vtkViewport
*viewport);
130
132
134
void
SetLabelScale(
double
x,
double
y,
double
z)
135
{
136
double
scale
[3];
137
scale[0] = x;
138
scale[1] = y;
139
scale[2] = z;
140
this->SetLabelScale(scale);
141
}
142
virtual
void
SetLabelScale(
double
scale
[3] );
143
virtual
double
* GetLabelScale();
145
147
virtual
vtkProperty
*GetLabelProperty();
148
149
protected
:
150
vtkAxesTransformRepresentation
();
151
~
vtkAxesTransformRepresentation
();
152
153
// The handle and the rep used to close the handles
154
vtkHandleRepresentation
*
OriginRepresentation
;
155
vtkHandleRepresentation
*
SelectionRepresentation
;
156
157
// Selection tolerance for the handles
158
int
Tolerance
;
159
160
// Format for printing the distance
161
char
*
LabelFormat
;
162
163
// The line
164
vtkPoints
*
LinePoints
;
165
vtkPolyData
*
LinePolyData
;
166
vtkPolyDataMapper
*
LineMapper
;
167
vtkActor
*
LineActor
;
168
169
// The distance label
170
vtkVectorText
*
LabelText
;
171
vtkPolyDataMapper
*
LabelMapper
;
172
vtkFollower
*
LabelActor
;
173
174
// The 3D disk tick marks
175
vtkPoints
*
GlyphPoints
;
176
vtkDoubleArray
*
GlyphVectors
;
177
vtkPolyData
*
GlyphPolyData
;
178
vtkCylinderSource
*
GlyphCylinder
;
179
vtkTransformPolyDataFilter
*
GlyphXForm
;
180
vtkGlyph3D
*
Glyph3D
;
181
vtkPolyDataMapper
*
GlyphMapper
;
182
vtkActor
*
GlyphActor
;
183
184
// Support GetBounds() method
185
vtkBox
*
BoundingBox
;
186
187
double
LastEventPosition[3];
188
189
private
:
190
vtkAxesTransformRepresentation
(
const
vtkAxesTransformRepresentation
&);
//Not implemented
191
void
operator=(
const
vtkAxesTransformRepresentation
&);
//Not implemented
192
};
193
194
#endif
Generated on Sun Sep 9 2012 13:03:49 for VTK by
1.8.1.2