VTK  9.7.1
vtkTrackballZoom.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
21 #ifndef vtkTrackballZoom_h
22 #define vtkTrackballZoom_h
23 
24 #include "vtkCameraManipulator.h"
25 
26 #include "vtkInteractionStyleModule.h" // needed for export macro
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class VTKINTERACTIONSTYLE_EXPORT vtkTrackballZoom : public vtkCameraManipulator
30 {
31 public:
32  static vtkTrackballZoom* New();
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
37 
40  void StartInteraction() override {};
41  void EndInteraction() override {};
42  void OnKeyDown(vtkRenderWindowInteractor* vtkNotUsed(rwi)) override {}
43  void OnKeyUp(vtkRenderWindowInteractor* vtkNotUsed(rwi)) override {}
44  void OnButtonUp(int, int, vtkRenderer*, vtkRenderWindowInteractor*) override {}
46 
48 
52  void OnMouseMove(int x, int y, vtkRenderer* ren, vtkRenderWindowInteractor* rwi) override;
53  void OnButtonDown(int x, int y, vtkRenderer* ren, vtkRenderWindowInteractor* rwi) override;
55 
60  vtkSetMacro(UseDollyForPerspectiveProjection, bool);
61  vtkGetMacro(UseDollyForPerspectiveProjection, bool);
62  vtkBooleanMacro(UseDollyForPerspectiveProjection, bool);
63 
64 protected:
66  ~vtkTrackballZoom() override;
67 
68  // Subclass can access it
69  double ZoomScale = 0.0;
70 
71 private:
72  vtkTrackballZoom(const vtkTrackballZoom&) = delete;
73  void operator=(const vtkTrackballZoom&) = delete;
74 
75  bool UseDollyForPerspectiveProjection = true;
76 };
77 VTK_ABI_NAMESPACE_END
78 #endif
void StartInteraction() override
Unimplemented methods from vtkCameraManipulator.
void OnButtonUp(int, int, vtkRenderer *, vtkRenderWindowInteractor *) override
Unimplemented methods from vtkCameraManipulator.
void OnKeyUp(vtkRenderWindowInteractor *rwi) override
Unimplemented methods from vtkCameraManipulator.
abstract specification for renderers
Definition: vtkRenderer.h:63
Abstraction of style away from button.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void OnMouseMove(int x, int y, vtkRenderer *ren, vtkRenderWindowInteractor *iren)=0
These methods are called on the active manipulator when the corresponding events occur.
platform-independent render window interaction including picking and frame rate control.
void EndInteraction() override
Unimplemented methods from vtkCameraManipulator.
a simple class to control print indentation
Definition: vtkIndent.h:28
Zooms camera with vertical mouse movement.
virtual void OnButtonDown(int x, int y, vtkRenderer *ren, vtkRenderWindowInteractor *iren)=0
void OnKeyDown(vtkRenderWindowInteractor *rwi) override
Unimplemented methods from vtkCameraManipulator.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...