VTK
9.5.2
Main Page
Related Pages
Topics
Namespaces
Classes
Files
Examples
File List
File Members
Interaction
Widgets
vtkMagnifierRepresentation.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2
// SPDX-License-Identifier: BSD-3-Clause
19
20
#ifndef vtkMagnifierRepresentation_h
21
#define vtkMagnifierRepresentation_h
22
23
#include "
vtkCoordinate.h
"
//Because of the viewport coordinate macro
24
#include "vtkInteractionWidgetsModule.h"
// For export macro
25
#include "
vtkWidgetRepresentation.h
"
26
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
27
28
VTK_ABI_NAMESPACE_BEGIN
29
class
vtkPropCollection
;
30
class
vtkPoints
;
31
class
vtkPolyData
;
32
class
vtkPolyDataMapper2D
;
33
class
vtkActor2D
;
34
class
vtkProperty2D
;
35
36
class
VTKINTERACTIONWIDGETS_EXPORT
VTK_MARSHALAUTO
vtkMagnifierRepresentation
37
:
public
vtkWidgetRepresentation
38
{
39
public
:
43
static
vtkMagnifierRepresentation
*
New
();
44
46
49
vtkTypeMacro(
vtkMagnifierRepresentation
,
vtkWidgetRepresentation
);
50
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
52
54
57
void
SetRenderer
(
vtkRenderer
* ren)
override
{ this->
Superclass::SetRenderer
(ren); }
59
61
68
vtkSetClampMacro(
MagnificationFactor
,
double
, 0.001, 1000.0);
69
vtkGetMacro(
MagnificationFactor
,
double
);
71
73
80
VTK_MARSHALEXCLUDE
(
VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
)
81
void
AddViewProp
(
vtkProp
*);
82
vtkPropCollection
*
GetViewProps
() {
return
this->
Props
; }
83
int
HasViewProp
(
vtkProp
*);
84
VTK_MARSHALEXCLUDE
(
VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
)
85
void
RemoveViewProp
(
vtkProp
*);
86
VTK_MARSHALEXCLUDE
(
VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
)
87
void
RemoveAllViewProps
();
89
91
94
vtkSetVector2Macro(
Size
,
int
);
95
vtkGetVector2Macro(
Size
,
int
);
97
99
103
vtkSetMacro(
Border
,
bool
);
104
vtkGetMacro(
Border
,
bool
);
105
vtkBooleanMacro(
Border
,
bool
);
107
109
112
vtkGetObjectMacro(
BorderProperty
,
vtkProperty2D
);
114
118
enum
InteractionStateType
119
{
120
Invisible
= 0,
121
Visible
122
};
123
125
129
void
BuildRepresentation
()
override
;
130
void
WidgetInteraction
(
double
eventPos[2])
override
;
132
139
vtkSetClampMacro(
InteractionState
,
int
,
Invisible
,
Visible
);
140
145
vtkRenderer
*
GetMagnificationRenderer
() {
return
this->
MagnificationRenderer
; }
146
148
152
void
ReleaseGraphicsResources
(
vtkWindow
*)
override
;
153
int
RenderOverlay
(
vtkViewport
*)
override
;
154
int
RenderOpaqueGeometry
(
vtkViewport
*)
override
;
155
int
RenderTranslucentPolygonalGeometry
(
vtkViewport
*)
override
;
156
vtkTypeBool
HasTranslucentPolygonalGeometry
()
override
;
158
163
vtkMTimeType
GetMTime
()
override
;
164
165
protected
:
166
vtkMagnifierRepresentation
();
167
~vtkMagnifierRepresentation
()
override
;
168
169
// Ivars
170
double
MagnificationFactor
;
171
vtkPropCollection
*
Props
;
172
int
Size
[2];
173
bool
Border
;
174
vtkProperty2D
*
BorderProperty
;
175
176
// The internal magnification renderer and supporting classes
177
vtkRenderer
*
MagnificationRenderer
;
178
vtkCoordinate
*
Coordinate
;
179
bool
InsideRenderer
;
180
181
// Border representation.
182
vtkPoints
*
BorderPoints
;
183
vtkPolyData
*
BorderPolyData
;
184
vtkPolyDataMapper2D
*
BorderMapper
;
185
vtkActor2D
*
BorderActor
;
186
187
private
:
188
vtkMagnifierRepresentation
(
const
vtkMagnifierRepresentation
&) =
delete
;
189
void
operator=(
const
vtkMagnifierRepresentation
&) =
delete
;
190
};
191
192
VTK_ABI_NAMESPACE_END
193
#endif
vtkActor2D
a actor that draws 2D data
Definition
vtkActor2D.h:36
vtkCoordinate
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition
vtkCoordinate.h:70
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:29
vtkMagnifierRepresentation::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
These