VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkInteractorStyleJoystickActor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInteractorStyleJoystickActor.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 =========================================================================*/
36 #ifndef __vtkInteractorStyleJoystickActor_h
37 #define __vtkInteractorStyleJoystickActor_h
38 
39 #include "vtkInteractionStyleModule.h" // For export macro
40 #include "vtkInteractorStyle.h"
41 
42 class vtkCellPicker;
43 
44 // motion flags
45 
46 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleJoystickActor : public vtkInteractorStyle
47 {
48 public:
49  static vtkInteractorStyleJoystickActor *New();
50 
51  vtkTypeMacro(vtkInteractorStyleJoystickActor,vtkInteractorStyle);
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
55 
57  virtual void OnMouseMove();
58  virtual void OnLeftButtonDown();
59  virtual void OnLeftButtonUp();
60  virtual void OnMiddleButtonDown();
61  virtual void OnMiddleButtonUp();
62  virtual void OnRightButtonDown();
63  virtual void OnRightButtonUp();
65 
66  // These methods for the different interactions in different modes
67  // are overridden in subclasses to perform the correct motion. Since
68  // they might be called from OnTimer, they do not have mouse coord parameters
69  // (use interactor's GetEventPosition and GetLastEventPosition)
70  virtual void Rotate();
71  virtual void Spin();
72  virtual void Pan();
73  virtual void Dolly();
74  virtual void UniformScale();
75 
76 protected:
79 
80  void FindPickedActor(int x, int y);
81 
82  void Prop3DTransform(vtkProp3D *prop3D,
83  double *boxCenter,
84  int numRotation,
85  double **rotate,
86  double *scale);
87 
88  double MotionFactor;
89 
90  vtkProp3D *InteractionProp;
91  vtkCellPicker *InteractionPicker;
92 
93 private:
95  void operator=(const vtkInteractorStyleJoystickActor&); // Not implemented.
96 };
97 
98 #endif
manipulate objects in the scene independently of one another