VTK  9.0.1
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 =========================================================================*/
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 
34 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBandZoom : public vtkInteractorStyle
35 {
36 public:
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 
77  vtkSetMacro(UseDollyForPerspectiveProjection, bool);
78  vtkGetMacro(UseDollyForPerspectiveProjection, bool);
79  vtkBooleanMacro(UseDollyForPerspectiveProjection, bool);
81 
83 
86  void OnMouseMove() override;
87  void OnLeftButtonDown() override;
88  void OnLeftButtonUp() override;
90 
91 protected:
94 
95  void Zoom() override;
96 
97  int StartPosition[2];
98  int EndPosition[2];
99  int Moving;
104 
105 private:
107  void operator=(const vtkInteractorStyleRubberBandZoom&) = delete;
108 
114  void AdjustBox(int startPosition[2], int endPosition[2]) const;
115 
116  void ZoomTraditional(const vtkRecti& box);
117  void ZoomPerspectiveProjectionUsingViewAngle(const vtkRecti& box);
118 };
119 
120 #endif
a simple class to control print indentation
Definition: vtkIndent.h:34
zoom in by amount indicated by rubber band box
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkInteractorStyleRubberBandZoom * New()
void OnMouseMove() override
Event bindings.
provide event-driven interface to the rendering window (defines trackball mode)
dynamic, self-adjusting array of unsigned char