VTK  9.7.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
23 #ifndef vtkInteractorStyleSwitch_h
24 #define vtkInteractorStyleSwitch_h
25 
26 #include "vtkInteractionStyleModule.h" // For export macro
28 #include "vtkWrappingHints.h" // For VTK_MARSHALMANUAL
29 
30 #define VTKIS_JOYSTICK 0
31 #define VTKIS_TRACKBALL 1
32 
33 #define VTKIS_CAMERA 0
34 #define VTKIS_ACTOR 1
35 
36 VTK_ABI_NAMESPACE_BEGIN
42 
43 class VTKINTERACTIONSTYLE_EXPORT VTK_MARSHALMANUAL vtkInteractorStyleSwitch
45 {
46 public:
47  static vtkInteractorStyleSwitch* New();
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
54  void SetInteractor(vtkRenderWindowInteractor* iren) override;
55 
61 
63 
66  vtkGetObjectMacro(CurrentStyle, vtkInteractorStyle);
67  void SetCurrentStyleToJoystickActor();
68  void SetCurrentStyleToJoystickCamera();
69  void SetCurrentStyleToTrackballActor();
70  void SetCurrentStyleToTrackballCamera();
71  void SetCurrentStyleToMultiTouchCamera();
73 
78  void OnChar() override;
79 
81 
85  void SetDefaultRenderer(vtkRenderer*) override;
86  void SetCurrentRenderer(vtkRenderer*) override;
88 
89 protected:
91  ~vtkInteractorStyleSwitch() override;
92 
93  void SetCurrentStyle();
94 
101 
105 
106 private:
108  void operator=(const vtkInteractorStyleSwitch&) = delete;
109 };
110 
111 VTK_ABI_NAMESPACE_END
112 #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:63
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.
#define VTK_MARSHALMANUAL
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
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