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=========================================================================*/
47#ifndef vtkInteractorStyleRubberBandZoom_h
48#define vtkInteractorStyleRubberBandZoom_h
49
50#include "vtkInteractionStyleModule.h" // For export macro
51#include "vtkInteractorStyle.h"
52#include "vtkRect.h" // for vtkRecti
53
55
56class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBandZoom : public vtkInteractorStyle
57{
58public:
61 void PrintSelf(ostream& os, vtkIndent indent) override;
62
64
68 vtkSetMacro(LockAspectToViewport, bool);
69 vtkGetMacro(LockAspectToViewport, bool);
70 vtkBooleanMacro(LockAspectToViewport, bool);
72
74
84 vtkSetMacro(CenterAtStartPosition, bool);
85 vtkGetMacro(CenterAtStartPosition, bool);
86 vtkBooleanMacro(CenterAtStartPosition, bool);
88
90
99 vtkSetMacro(UseDollyForPerspectiveProjection, bool);
100 vtkGetMacro(UseDollyForPerspectiveProjection, bool);
101 vtkBooleanMacro(UseDollyForPerspectiveProjection, bool);
103
105
108 void OnMouseMove() override;
109 void OnLeftButtonDown() override;
110 void OnLeftButtonUp() override;
112
113protected:
116
117 void Zoom() override;
118
119 virtual void ZoomTraditional(const vtkRecti& box);
120
126
127 int StartPosition[2];
128 int EndPosition[2];
134
135private:
137 void operator=(const vtkInteractorStyleRubberBandZoom&) = delete;
138
144 void AdjustBox(int startPosition[2], int endPosition[2]) const;
145};
146
147#endif
a simple class to control print indentation
Definition: vtkIndent.h:119
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