VTK: Interaction/Style/vtkInteractorStyleSwitch.h Source File

| 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
29 #ifndef vtkInteractorStyleSwitch_h
30 #define vtkInteractorStyleSwitch_h
31
32 #include "vtkInteractionStyleModule.h" // For export macro
33 #include "vtkInteractorStyleSwitchBase.h"
34
35 #define VTKIS_JOYSTICK 0
36 #define VTKIS_TRACKBALL 1
37
38 #define VTKIS_CAMERA 0
39 #define VTKIS_ACTOR 1
40
41 VTK_ABI_NAMESPACE_BEGIN
42 class vtkInteractorStyleJoystickActor;
43 class vtkInteractorStyleJoystickCamera;
44 class vtkInteractorStyleTrackballActor;
45 class vtkInteractorStyleTrackballCamera;
46 class vtkInteractorStyleMultiTouchCamera;
47
48 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleSwitch : public vtkInteractorStyleSwitchBase
49 {
50 public:
51 static vtkInteractorStyleSwitch* New();
52 vtkTypeMacro(vtkInteractorStyleSwitch, vtkInteractorStyleSwitchBase);
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
58 void SetInteractor(vtkRenderWindowInteractor* iren) override;
59
64 void SetAutoAdjustCameraClippingRange(vtkTypeBool value) override;
65
67
70 vtkGetObjectMacro(CurrentStyle, vtkInteractorStyle);
71 void SetCurrentStyleToJoystickActor();
72 void SetCurrentStyleToJoystickCamera();
73 void SetCurrentStyleToTrackballActor();
74 void SetCurrentStyleToTrackballCamera();
75 void SetCurrentStyleToMultiTouchCamera();
77
82 void OnChar() override;
83
85
89 void SetDefaultRenderer(vtkRenderer*) override;
90 void SetCurrentRenderer(vtkRenderer*) override;
92
93 protected:
94 vtkInteractorStyleSwitch();
95 ~vtkInteractorStyleSwitch() override;
96
97 void SetCurrentStyle();
98
99 vtkInteractorStyleJoystickActor* JoystickActor;
100 vtkInteractorStyleJoystickCamera* JoystickCamera;
101 vtkInteractorStyleTrackballActor* TrackballActor;
102 vtkInteractorStyleTrackballCamera* TrackballCamera;
103 vtkInteractorStyleMultiTouchCamera* MultiTouchCamera;
104 vtkInteractorStyle* CurrentStyle;
105
106 int JoystickOrTrackball;
107 int CameraOrActor;
108 bool MultiTouch;
109
110 private:
111 vtkInteractorStyleSwitch(const vtkInteractorStyleSwitch&) = delete;
112 void operator=(const vtkInteractorStyleSwitch&) = delete;
113 };
114
115 VTK_ABI_NAMESPACE_END
116 #endif
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInteractorStyleJoystickActor
manipulate objects in the scene independently of one another
Definition: vtkInteractorStyleJoystickActor.h:37
vtkInteractorStyleJoystickCamera
interactive manipulation of the camera
Definition: vtkInteractorStyleJoystickCamera.h:35
vtkInteractorStyleMultiTouchCamera
multitouch manipulation of the camera
Definition: vtkInteractorStyleMultiTouchCamera.h:29
vtkInteractorStyleSwitchBase
dummy interface class.
Definition: vtkInteractorStyleSwitchBase.h:24
vtkInteractorStyleSwitch
class to swap between interactory styles
Definition: vtkInteractorStyleSwitch.h:49
vtkInteractorStyleSwitch::SetCurrentStyle
void SetCurrentStyle()
vtkInteractorStyleSwitch::CameraOrActor
int CameraOrActor
Definition: vtkInteractorStyleSwitch.h:107
vtkInteractorStyleSwitch::SetAutoAdjustCameraClippingRange
void SetAutoAdjustCameraClippingRange(vtkTypeBool value) override
We must override this method in order to pass the setting down to the underlying styles.
vtkInteractorStyleSwitch::CurrentStyle
vtkInteractorStyle * CurrentStyle
Definition: vtkInteractorStyleSwitch.h:104
vtkInteractorStyleSwitch::MultiTouchCamera
vtkInteractorStyleMultiTouchCamera * MultiTouchCamera
Definition: vtkInteractorStyleSwitch.h:103
vtkInteractorStyleSwitch::SetCurrentStyleToJoystickActor
void SetCurrentStyleToJoystickActor()
Set/Get current style.
vtkInteractorStyleSwitch::JoystickActor
vtkInteractorStyleJoystickActor * JoystickActor
Definition: vtkInteractorStyleSwitch.h:99
vtkInteractorStyleSwitch::JoystickCamera
vtkInteractorStyleJoystickCamera * JoystickCamera
Definition: vtkInteractorStyleSwitch.h:100
vtkInteractorStyleSwitch::SetInteractor
void SetInteractor(vtkRenderWindowInteractor *iren) override
The sub styles need the interactor too.
vtkInteractorStyleSwitch::SetCurrentStyleToTrackballActor
void SetCurrentStyleToTrackballActor()
Set/Get current style.
vtkInteractorStyleSwitch::SetCurrentStyleToJoystickCamera
void SetCurrentStyleToJoystickCamera()
Set/Get current style.
vtkInteractorStyleSwitch::New
static vtkInteractorStyleSwitch * New()
vtkInteractorStyleSwitch::OnChar
void OnChar() override
Only care about the char event, which is used to switch between different styles.
vtkInteractorStyleSwitch::SetCurrentRenderer
void SetCurrentRenderer(vtkRenderer *) override
Overridden from vtkInteractorObserver because the interactor styles used by this class must also be u...
vtkInteractorStyleSwitch::MultiTouch
bool MultiTouch
Definition: vtkInteractorStyleSwitch.h:108
vtkInteractorStyleSwitch::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInteractorStyleSwitch::SetCurrentStyleToMultiTouchCamera
void SetCurrentStyleToMultiTouchCamera()
Set/Get current style.
vtkInteractorStyleSwitch::SetCurrentStyleToTrackballCamera
void SetCurrentStyleToTrackballCamera()
Set/Get current style.
vtkInteractorStyleSwitch::JoystickOrTrackball
int JoystickOrTrackball
Definition: vtkInteractorStyleSwitch.h:106
vtkInteractorStyleSwitch::TrackballActor
vtkInteractorStyleTrackballActor * TrackballActor
Definition: vtkInteractorStyleSwitch.h:101
vtkInteractorStyleSwitch::vtkInteractorStyleSwitch
vtkInteractorStyleSwitch()
vtkInteractorStyleSwitch::SetDefaultRenderer
void SetDefaultRenderer(vtkRenderer *) override
Overridden from vtkInteractorObserver because the interactor styles used by this class must also be u...
vtkInteractorStyleSwitch::TrackballCamera
vtkInteractorStyleTrackballCamera * TrackballCamera
Definition: vtkInteractorStyleSwitch.h:102
vtkInteractorStyleSwitch::~vtkInteractorStyleSwitch
~vtkInteractorStyleSwitch() override
vtkInteractorStyleTrackballActor
manipulate objects in the scene independent of each other
Definition: vtkInteractorStyleTrackballActor.h:47
vtkInteractorStyleTrackballCamera
interactive manipulation of the camera
Definition: vtkInteractorStyleTrackballCamera.h:49
vtkInteractorStyle
provide event-driven interface to the rendering window (defines trackball mode)
Definition: vtkInteractorStyle.h:148
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:82
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:71
vtkX3D::value
@ value
Definition: vtkX3D.h:220
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkInteractorStyleSwitchBase.h