VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
34 #ifndef __vtkInteractorStyleSwitch_h
35 #define __vtkInteractorStyleSwitch_h
36 
37 #include "vtkInteractionStyleModule.h" // For export macro
38 #include "vtkInteractorStyleSwitchBase.h"
39 
40 #define VTKIS_JOYSTICK 0
41 #define VTKIS_TRACKBALL 1
42 
43 #define VTKIS_CAMERA 0
44 #define VTKIS_ACTOR 1
45 
50 
51 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleSwitch
52  : public vtkInteractorStyleSwitchBase
53 {
54 public:
55  static vtkInteractorStyleSwitch *New();
56  vtkTypeMacro(vtkInteractorStyleSwitch, vtkInteractorStyleSwitchBase);
57  void PrintSelf(ostream& os, vtkIndent indent);
58 
60  void SetInteractor(vtkRenderWindowInteractor *iren);
61 
64  void SetAutoAdjustCameraClippingRange( int value );
65 
67 
68  vtkGetObjectMacro(CurrentStyle, vtkInteractorStyle);
69  void SetCurrentStyleToJoystickActor();
70  void SetCurrentStyleToJoystickCamera();
71  void SetCurrentStyleToTrackballActor();
72  void SetCurrentStyleToTrackballCamera();
74 
77  virtual void OnChar();
78 
80 
82  virtual void SetDefaultRenderer(vtkRenderer*);
83  virtual void SetCurrentRenderer(vtkRenderer*);
85 
86 protected:
89 
90  void SetCurrentStyle();
91 
96  vtkInteractorStyle* CurrentStyle;
97 
100 
101 private:
102  vtkInteractorStyleSwitch(const vtkInteractorStyleSwitch&); // Not implemented.
103  void operator=(const vtkInteractorStyleSwitch&); // Not implemented.
104 };
105 
106 #endif
interactive manipulation of the camera
vtkInteractorStyleTrackballCamera * TrackballCamera
vtkInteractorStyleJoystickCamera * JoystickCamera
manipulate objects in the scene independently of one another
vtkInteractorStyleTrackballActor * TrackballActor
manipulate objects in the scene independent of each other
vtkInteractorStyle * CurrentStyle
vtkInteractorStyleJoystickActor * JoystickActor
interactive manipulation of the camera
class to swap between interactory styles