VTK  9.2.6
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 =========================================================================*/
32 #ifndef vtkInteractorStyleSwitch_h
33 #define vtkInteractorStyleSwitch_h
34 
35 #include "vtkInteractionStyleModule.h" // For export macro
37 
38 #define VTKIS_JOYSTICK 0
39 #define VTKIS_TRACKBALL 1
40 
41 #define VTKIS_CAMERA 0
42 #define VTKIS_ACTOR 1
43 
49 
50 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleSwitch : public vtkInteractorStyleSwitchBase
51 {
52 public:
53  static vtkInteractorStyleSwitch* New();
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
60  void SetInteractor(vtkRenderWindowInteractor* iren) override;
61 
67 
69 
72  vtkGetObjectMacro(CurrentStyle, vtkInteractorStyle);
73  void SetCurrentStyleToJoystickActor();
74  void SetCurrentStyleToJoystickCamera();
75  void SetCurrentStyleToTrackballActor();
76  void SetCurrentStyleToTrackballCamera();
77  void SetCurrentStyleToMultiTouchCamera();
79 
84  void OnChar() override;
85 
87 
91  void SetDefaultRenderer(vtkRenderer*) override;
92  void SetCurrentRenderer(vtkRenderer*) override;
94 
95 protected:
97  ~vtkInteractorStyleSwitch() override;
98 
99  void SetCurrentStyle();
100 
107 
111 
112 private:
114  void operator=(const vtkInteractorStyleSwitch&) = delete;
115 };
116 
117 #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:72
vtkInteractorStyleMultiTouchCamera * MultiTouchCamera
multitouch manipulation of the camera
int vtkTypeBool
Definition: vtkABI.h:69
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:39
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