VTK  9.2.6
vtkInteractorStyleRubberBandZoom.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkInteractorStyleRubberBandZoom.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=========================================================================*/
37#ifndef vtkInteractorStyleRubberBandZoom_h
38#define vtkInteractorStyleRubberBandZoom_h
39
40#include "vtkInteractionStyleModule.h" // For export macro
41#include "vtkInteractorStyle.h"
42#include "vtkRect.h" // for vtkRecti
43
45
46class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBandZoom : public vtkInteractorStyle
47{
48public:
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54
58 vtkSetMacro(LockAspectToViewport, bool);
59 vtkGetMacro(LockAspectToViewport, bool);
60 vtkBooleanMacro(LockAspectToViewport, bool);
62
64
74 vtkSetMacro(CenterAtStartPosition, bool);
75 vtkGetMacro(CenterAtStartPosition, bool);
76 vtkBooleanMacro(CenterAtStartPosition, bool);
78
80
89 vtkSetMacro(UseDollyForPerspectiveProjection, bool);
90 vtkGetMacro(UseDollyForPerspectiveProjection, bool);
91 vtkBooleanMacro(UseDollyForPerspectiveProjection, bool);
93
95
98 void OnMouseMove() override;
99 void OnLeftButtonDown() override;
100 void OnLeftButtonUp() override;
102
103protected:
106
107 void Zoom() override;
108
109 virtual void ZoomTraditional(const vtkRecti& box);
110
116
117 int StartPosition[2];
118 int EndPosition[2];
124
125private:
127 void operator=(const vtkInteractorStyleRubberBandZoom&) = delete;
128
134 void AdjustBox(int startPosition[2], int endPosition[2]) const;
135};
136
137#endif
a simple class to control print indentation
Definition vtkIndent.h:49
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