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=========================================================================*/
24
25#ifndef vtkInteractorStyleRubberBandZoom_h
26#define vtkInteractorStyleRubberBandZoom_h
27
28#include "vtkInteractionStyleModule.h" // For export macro
29#include "vtkInteractorStyle.h"
30#include "vtkRect.h" // for vtkRecti
31
33
34class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBandZoom : public vtkInteractorStyle
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
42
46 vtkSetMacro(LockAspectToViewport, bool);
47 vtkGetMacro(LockAspectToViewport, bool);
48 vtkBooleanMacro(LockAspectToViewport, bool);
50
52
62 vtkSetMacro(CenterAtStartPosition, bool);
63 vtkGetMacro(CenterAtStartPosition, bool);
64 vtkBooleanMacro(CenterAtStartPosition, bool);
66
68
79 vtkBooleanMacro(UseDollyForPerspectiveProjection, bool);
81
83
86 void OnMouseMove() override;
87 void OnLeftButtonDown() override;
88 void OnLeftButtonUp() override;
90
91protected:
94
95 void Zoom() override;
96
97 virtual void ZoomTraditional(const vtkRecti& box);
98
104
112
113private:
115 void operator=(const vtkInteractorStyleRubberBandZoom&) = delete;
116
122 void AdjustBox(int startPosition[2], int endPosition[2]) const;
123};
124
125#endif
a simple class to control print indentation
Definition vtkIndent.h:34
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()
dynamic, self-adjusting array of unsigned char