VTK  9.7.1
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
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
26 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkPropCollection;
30 class vtkPoints;
31 class vtkPolyData;
33 class vtkActor2D;
34 class vtkProperty2D;
35 
36 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkMagnifierRepresentation
38 {
39 public:
44 
46 
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 
81  void AddViewProp(vtkProp*);
82  vtkPropCollection* GetViewProps() { return this->Props; }
83  int HasViewProp(vtkProp*);
85  void RemoveViewProp(vtkProp*);
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 
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;
158 
163  vtkMTimeType GetMTime() override;
164 
165 protected:
167  ~vtkMagnifierRepresentation() override;
168 
169  // Ivars
172  int Size[2];
173  bool Border;
175 
176  // The internal magnification renderer and supporting classes
180 
181  // Border representation.
186 
187 private:
189  void operator=(const vtkMagnifierRepresentation&) = delete;
190 };
191 
192 VTK_ABI_NAMESPACE_END
193 #endif
represent a vtkBorderWidget
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
abstract specification for Viewports
Definition: vtkViewport.h:46
a actor that draws 2D data
Definition: vtkActor2D.h:35
abstract specification for renderers
Definition: vtkRenderer.h:63
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:71
int RenderOpaqueGeometry(vtkViewport *viewport) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
abstract class defines interface between the widget and widget representation classes ...
virtual void BuildRepresentation()=0
Subclasses of vtkWidgetRepresentation must implement these methods.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
InteractionStateType
Define the various states that the representation can be in.
an ordered list of Props
int vtkTypeBool
Definition: vtkABI.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
a simple class to control print indentation
Definition: vtkIndent.h:28
int RenderOverlay(vtkViewport *viewport) override
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
virtual vtkMTimeType GetMTime()
Return this object's modified time.
virtual void WidgetInteraction(double newEventPos[2])
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:69
#define VTK_MARSHALEXCLUDE(reason)
vtkTypeBool HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
represent surface properties of a 2D image
Definition: vtkProperty2D.h:30
#define VTK_MARSHALAUTO
vtkRenderer * GetMagnificationRenderer()
Provide access to the magnification renderer.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:30
void SetRenderer(vtkRenderer *ren) override
Specify the renderer viewport in which to place the magnifier.
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL