VTK  9.1.0
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=========================================================================*/
44#ifndef vtkInteractorStyleRubberBandZoom_h
45#define vtkInteractorStyleRubberBandZoom_h
46
47#include "vtkInteractionStyleModule.h" // For export macro
48#include "vtkInteractorStyle.h"
49#include "vtkRect.h" // for vtkRecti
50
52
53class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBandZoom : public vtkInteractorStyle
54{
55public:
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
61
65 vtkSetMacro(LockAspectToViewport, bool);
66 vtkGetMacro(LockAspectToViewport, bool);
67 vtkBooleanMacro(LockAspectToViewport, bool);
69
71
81 vtkSetMacro(CenterAtStartPosition, bool);
82 vtkGetMacro(CenterAtStartPosition, bool);
83 vtkBooleanMacro(CenterAtStartPosition, bool);
85
87
96 vtkSetMacro(UseDollyForPerspectiveProjection, bool);
97 vtkGetMacro(UseDollyForPerspectiveProjection, bool);
98 vtkBooleanMacro(UseDollyForPerspectiveProjection, bool);
100
102
105 void OnMouseMove() override;
106 void OnLeftButtonDown() override;
107 void OnLeftButtonUp() override;
109
110protected:
113
114 void Zoom() override;
115
116 virtual void ZoomTraditional(const vtkRecti& box);
117
123
124 int StartPosition[2];
125 int EndPosition[2];
131
132private:
134 void operator=(const vtkInteractorStyleRubberBandZoom&) = delete;
135
141 void AdjustBox(int startPosition[2], int endPosition[2]) const;
142};
143
144#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
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