VTK  9.3.20240424
vtkInteractorStyleRubberBandZoom.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
35#ifndef vtkInteractorStyleRubberBandZoom_h
36#define vtkInteractorStyleRubberBandZoom_h
37
38#include "vtkInteractionStyleModule.h" // For export macro
39#include "vtkInteractorStyle.h"
40#include "vtkRect.h" // for vtkRecti
41#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
42
43VTK_ABI_NAMESPACE_BEGIN
45
46class VTKINTERACTIONSTYLE_EXPORT VTK_MARSHALAUTO vtkInteractorStyleRubberBandZoom
47 : public vtkInteractorStyle
48{
49public:
52 void PrintSelf(ostream& os, vtkIndent indent) override;
53
55
59 vtkSetMacro(LockAspectToViewport, bool);
60 vtkGetMacro(LockAspectToViewport, bool);
61 vtkBooleanMacro(LockAspectToViewport, bool);
63
65
75 vtkSetMacro(CenterAtStartPosition, bool);
76 vtkGetMacro(CenterAtStartPosition, bool);
77 vtkBooleanMacro(CenterAtStartPosition, bool);
79
81
90 vtkSetMacro(UseDollyForPerspectiveProjection, bool);
91 vtkGetMacro(UseDollyForPerspectiveProjection, bool);
92 vtkBooleanMacro(UseDollyForPerspectiveProjection, bool);
94
96
99 void OnMouseMove() override;
100 void OnLeftButtonDown() override;
101 void OnLeftButtonUp() override;
103
104protected:
107
108 void Zoom() override;
109
110 virtual void ZoomTraditional(const vtkRecti& box);
111
117
118 int StartPosition[2];
119 int EndPosition[2];
125
126private:
128 void operator=(const vtkInteractorStyleRubberBandZoom&) = delete;
129
135 void AdjustBox(int startPosition[2], int endPosition[2]) const;
136};
137
138VTK_ABI_NAMESPACE_END
139#endif
a simple class to control print indentation
Definition vtkIndent.h:108
zoom in by amount indicated by rubber band box
void OnLeftButtonDown() override
Event bindings.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ZoomTraditional(const vtkRecti &box)
virtual vtkVector3d CalculatePerspectiveZoomFocalPoint(const vtkRecti &box) const
Calculates the focal point to be used when zooming on perspective projection using the view angle bas...
void OnLeftButtonUp() override
Event bindings.
void OnMouseMove() override
Event bindings.
static vtkInteractorStyleRubberBandZoom * New()
provide event-driven interface to the rendering window (defines trackball mode)
dynamic, self-adjusting array of unsigned char
#define VTK_MARSHALAUTO