VTK  9.3.1
vtkInteractorStyleSwitch.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
20 #ifndef vtkInteractorStyleSwitch_h
21 #define vtkInteractorStyleSwitch_h
22 
23 #include "vtkInteractionStyleModule.h" // For export macro
25 
26 #define VTKIS_JOYSTICK 0
27 #define VTKIS_TRACKBALL 1
28 
29 #define VTKIS_CAMERA 0
30 #define VTKIS_ACTOR 1
31 
32 VTK_ABI_NAMESPACE_BEGIN
38 
39 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleSwitch : public vtkInteractorStyleSwitchBase
40 {
41 public:
42  static vtkInteractorStyleSwitch* New();
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
49  void SetInteractor(vtkRenderWindowInteractor* iren) override;
50 
56 
58 
61  vtkGetObjectMacro(CurrentStyle, vtkInteractorStyle);
62  void SetCurrentStyleToJoystickActor();
63  void SetCurrentStyleToJoystickCamera();
64  void SetCurrentStyleToTrackballActor();
65  void SetCurrentStyleToTrackballCamera();
66  void SetCurrentStyleToMultiTouchCamera();
68 
73  void OnChar() override;
74 
76 
80  void SetDefaultRenderer(vtkRenderer*) override;
81  void SetCurrentRenderer(vtkRenderer*) override;
83 
84 protected:
86  ~vtkInteractorStyleSwitch() override;
87 
88  void SetCurrentStyle();
89 
96 
99  bool MultiTouch;
100 
101 private:
103  void operator=(const vtkInteractorStyleSwitch&) = delete;
104 };
105 
106 VTK_ABI_NAMESPACE_END
107 #endif
interactive manipulation of the camera
void OnChar() override
OnChar is triggered when an ASCII key is pressed.
void SetInteractor(vtkRenderWindowInteractor *interactor) override
Set/Get the Interactor wrapper being controlled by this object.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract specification for renderers
Definition: vtkRenderer.h:61
vtkInteractorStyleMultiTouchCamera * MultiTouchCamera
multitouch manipulation of the camera
int vtkTypeBool
Definition: vtkABI.h:64
vtkInteractorStyleTrackballCamera * TrackballCamera
platform-independent render window interaction including picking and frame rate control.
vtkInteractorStyleJoystickCamera * JoystickCamera
static vtkInteractorStyleSwitchBase * New()
virtual void SetDefaultRenderer(vtkRenderer *)
Set/Get the default renderer to use when activating the interactor observer.
a simple class to control print indentation
Definition: vtkIndent.h:28
manipulate objects in the scene independently of one another
vtkInteractorStyleTrackballActor * TrackballActor
manipulate objects in the scene independent of each other
vtkInteractorStyle * CurrentStyle
virtual void SetCurrentRenderer(vtkRenderer *)
Set/Get the current renderer.
virtual void SetAutoAdjustCameraClippingRange(vtkTypeBool)
If AutoAdjustCameraClippingRange is on, then before each render the camera clipping range will be adj...
vtkInteractorStyleJoystickActor * JoystickActor
provide event-driven interface to the rendering window (defines trackball mode)
interactive manipulation of the camera
class to swap between interactory styles