VTK  9.3.0
vtkInteractorStyleRubberBandZoom.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
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 
32 VTK_ABI_NAMESPACE_BEGIN
34 
35 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBandZoom : public vtkInteractorStyle
36 {
37 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
47  vtkSetMacro(LockAspectToViewport, bool);
48  vtkGetMacro(LockAspectToViewport, bool);
49  vtkBooleanMacro(LockAspectToViewport, bool);
51 
53 
63  vtkSetMacro(CenterAtStartPosition, bool);
64  vtkGetMacro(CenterAtStartPosition, bool);
65  vtkBooleanMacro(CenterAtStartPosition, bool);
67 
69 
78  vtkSetMacro(UseDollyForPerspectiveProjection, bool);
79  vtkGetMacro(UseDollyForPerspectiveProjection, bool);
80  vtkBooleanMacro(UseDollyForPerspectiveProjection, bool);
82 
84 
87  void OnMouseMove() override;
88  void OnLeftButtonDown() override;
89  void OnLeftButtonUp() override;
91 
92 protected:
95 
96  void Zoom() override;
97 
98  virtual void ZoomTraditional(const vtkRecti& box);
99 
105 
106  int StartPosition[2];
107  int EndPosition[2];
108  int Moving;
113 
114 private:
116  void operator=(const vtkInteractorStyleRubberBandZoom&) = delete;
117 
123  void AdjustBox(int startPosition[2], int endPosition[2]) const;
124 };
125 
126 VTK_ABI_NAMESPACE_END
127 #endif
a simple class to control print indentation
Definition: vtkIndent.h:38
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...
static vtkInteractorStyleRubberBandZoom * New()
void OnLeftButtonUp() override
Event bindings.
void OnMouseMove() override
Event bindings.
provide event-driven interface to the rendering window (defines trackball mode)
dynamic, self-adjusting array of unsigned char