VTK  9.0.1
vtkInteractorStyleSwitch.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInteractorStyleSwitch.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef vtkInteractorStyleSwitch_h
30 #define vtkInteractorStyleSwitch_h
31 
32 #include "vtkInteractionStyleModule.h" // For export macro
34 
35 #define VTKIS_JOYSTICK 0
36 #define VTKIS_TRACKBALL 1
37 
38 #define VTKIS_CAMERA 0
39 #define VTKIS_ACTOR 1
40 
46 
47 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleSwitch : public vtkInteractorStyleSwitchBase
48 {
49 public:
50  static vtkInteractorStyleSwitch* New();
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
57  void SetInteractor(vtkRenderWindowInteractor* iren) override;
58 
64 
66 
69  vtkGetObjectMacro(CurrentStyle, vtkInteractorStyle);
70  void SetCurrentStyleToJoystickActor();
71  void SetCurrentStyleToJoystickCamera();
72  void SetCurrentStyleToTrackballActor();
73  void SetCurrentStyleToTrackballCamera();
74  void SetCurrentStyleToMultiTouchCamera();
76 
81  void OnChar() override;
82 
84 
88  void SetDefaultRenderer(vtkRenderer*) override;
89  void SetCurrentRenderer(vtkRenderer*) override;
91 
92 protected:
94  ~vtkInteractorStyleSwitch() override;
95 
96  void SetCurrentStyle();
97 
104 
108 
109 private:
111  void operator=(const vtkInteractorStyleSwitch&) = delete;
112 };
113 
114 #endif
vtkInteractorStyleSwitch::CameraOrActor
int CameraOrActor
Definition: vtkInteractorStyleSwitch.h:106
vtkInteractorStyleSwitch::JoystickOrTrackball
int JoystickOrTrackball
Definition: vtkInteractorStyleSwitch.h:105
vtkInteractorStyleSwitch::JoystickActor
vtkInteractorStyleJoystickActor * JoystickActor
Definition: vtkInteractorStyleSwitch.h:98
vtkX3D::value
@ value
Definition: vtkX3D.h:226
vtkInteractorStyle::SetAutoAdjustCameraClippingRange
virtual void SetAutoAdjustCameraClippingRange(vtkTypeBool)
If AutoAdjustCameraClippingRange is on, then before each render the camera clipping range will be adj...
vtkInteractorObserver::SetDefaultRenderer
virtual void SetDefaultRenderer(vtkRenderer *)
vtkInteractorStyleSwitch::MultiTouchCamera
vtkInteractorStyleMultiTouchCamera * MultiTouchCamera
Definition: vtkInteractorStyleSwitch.h:102
vtkInteractorStyleSwitchBase.h
vtkInteractorStyleMultiTouchCamera
multitouch manipulation of the camera
Definition: vtkInteractorStyleMultiTouchCamera.h:35
vtkInteractorStyle::SetInteractor
void SetInteractor(vtkRenderWindowInteractor *interactor) override
Set/Get the Interactor wrapper being controlled by this object.
vtkInteractorStyle::OnChar
void OnChar() override
OnChar is triggered when an ASCII key is pressed.
vtkInteractorStyleSwitch::TrackballCamera
vtkInteractorStyleTrackballCamera * TrackballCamera
Definition: vtkInteractorStyleSwitch.h:101
vtkInteractorStyleSwitchBase::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkInteractorStyleSwitch::JoystickCamera
vtkInteractorStyleJoystickCamera * JoystickCamera
Definition: vtkInteractorStyleSwitch.h:99
vtkInteractorStyleSwitchBase
dummy interface class.
Definition: vtkInteractorStyleSwitchBase.h:34
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:82
vtkInteractorStyle
provide event-driven interface to the rendering window (defines trackball mode)
Definition: vtkInteractorStyle.h:147
vtkInteractorStyleJoystickCamera
interactive manipulation of the camera
Definition: vtkInteractorStyleJoystickCamera.h:45
vtkInteractorStyleTrackballCamera
interactive manipulation of the camera
Definition: vtkInteractorStyleTrackballCamera.h:50
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:67
vtkInteractorStyleSwitch::CurrentStyle
vtkInteractorStyle * CurrentStyle
Definition: vtkInteractorStyleSwitch.h:103
vtkInteractorStyleSwitch
class to swap between interactory styles
Definition: vtkInteractorStyleSwitch.h:47
vtkInteractorStyleSwitchBase::New
static vtkInteractorStyleSwitchBase * New()
vtkInteractorStyleJoystickActor
manipulate objects in the scene independently of one another
Definition: vtkInteractorStyleJoystickActor.h:47
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkInteractorStyleSwitch::MultiTouch
bool MultiTouch
Definition: vtkInteractorStyleSwitch.h:107
vtkInteractorObserver::SetCurrentRenderer
virtual void SetCurrentRenderer(vtkRenderer *)
vtkInteractorStyleTrackballActor
manipulate objects in the scene independent of each other
Definition: vtkInteractorStyleTrackballActor.h:48
vtkInteractorStyleSwitch::TrackballActor
vtkInteractorStyleTrackballActor * TrackballActor
Definition: vtkInteractorStyleSwitch.h:100