VTK
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
49 {
50 public:
51  static vtkInteractorStyleSwitch *New();
53  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
54 
58  void SetInteractor(vtkRenderWindowInteractor *iren) VTK_OVERRIDE;
59 
64  void SetAutoAdjustCameraClippingRange( int value ) VTK_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() VTK_OVERRIDE;
83 
85 
89  void SetDefaultRenderer(vtkRenderer*) VTK_OVERRIDE;
90  void SetCurrentRenderer(vtkRenderer*) VTK_OVERRIDE;
92 
93 protected:
95  ~vtkInteractorStyleSwitch() VTK_OVERRIDE;
96 
97  void SetCurrentStyle();
98 
104  vtkInteractorStyle* CurrentStyle;
105 
106  int JoystickOrTrackball;
107  int CameraOrActor;
108  bool MultiTouch;
109 
110 private:
111  vtkInteractorStyleSwitch(const vtkInteractorStyleSwitch&) VTK_DELETE_FUNCTION;
112  void operator=(const vtkInteractorStyleSwitch&) VTK_DELETE_FUNCTION;
113 };
114 
115 #endif
interactive manipulation of the camera
void OnChar() override
OnChar is triggered when an ASCII key is pressed.
virtual void SetAutoAdjustCameraClippingRange(int)
If AutoAdjustCameraClippingRange is on, then before each render the camera clipping range will be adj...
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:57
multitouch manipulation of the camera
platform-independent render window interaction including picking and frame rate control.
static vtkInteractorStyleSwitchBase * New()
a simple class to control print indentation
Definition: vtkIndent.h:33
manipulate objects in the scene independently of one another
manipulate objects in the scene independent of each other
provide event-driven interface to the rendering window (defines trackball mode)
interactive manipulation of the camera
class to swap between interactory styles