VTK
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 =========================================================================*/
34 #ifndef vtkInteractorStyleJoystickActor_h
35 #define vtkInteractorStyleJoystickActor_h
36 
37 #include "vtkInteractionStyleModule.h" // For export macro
38 #include "vtkInteractorStyle.h"
39 
40 class vtkCellPicker;
41 
42 // motion flags
43 
44 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleJoystickActor : public vtkInteractorStyle
45 {
46 public:
48 
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
53 
57  void OnMouseMove() override;
58  void OnLeftButtonDown() override;
59  void OnLeftButtonUp() override;
60  void OnMiddleButtonDown() override;
61  void OnMiddleButtonUp() override;
62  void OnRightButtonDown() override;
63  void OnRightButtonUp() override;
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  void Rotate() override;
71  void Spin() override;
72  void Pan() override;
73  void Dolly() override;
74  void UniformScale() override;
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 
92 
93 private:
95  void operator=(const vtkInteractorStyleJoystickActor&) = delete;
96 };
97 
98 #endif
vtkInteractorStyle::Dolly
virtual void Dolly()
Definition: vtkInteractorStyle.h:299
vtkInteractorStyleJoystickActor::InteractionProp
vtkProp3D * InteractionProp
Definition: vtkInteractorStyleJoystickActor.h:90
vtkInteractorStyle.h
vtkX3D::scale
Definition: vtkX3D.h:229
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:46
vtkInteractorStyle::Pan
virtual void Pan()
Definition: vtkInteractorStyle.h:298
vtkInteractorStyleJoystickActor::MotionFactor
double MotionFactor
Definition: vtkInteractorStyleJoystickActor.h:88
vtkInteractorStyle::OnMiddleButtonUp
virtual void OnMiddleButtonUp()
Definition: vtkInteractorStyle.h:233
vtkInteractorStyle::OnMouseMove
virtual void OnMouseMove()
Generic event bindings can be overridden in subclasses.
Definition: vtkInteractorStyle.h:229
vtkInteractorStyle::Spin
virtual void Spin()
Definition: vtkInteractorStyle.h:297
vtkInteractorStyle::OnMiddleButtonDown
virtual void OnMiddleButtonDown()
Definition: vtkInteractorStyle.h:232
vtkInteractorStyle::OnRightButtonDown
virtual void OnRightButtonDown()
Definition: vtkInteractorStyle.h:234
vtkInteractorStyle::OnLeftButtonDown
virtual void OnLeftButtonDown()
Definition: vtkInteractorStyle.h:230
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkInteractorStyleJoystickActor::InteractionPicker
vtkCellPicker * InteractionPicker
Definition: vtkInteractorStyleJoystickActor.h:91
vtkInteractorStyle
provide event-driven interface to the rendering window (defines trackball mode)
Definition: vtkInteractorStyle.h:141
vtkInteractorStyle::OnLeftButtonUp
virtual void OnLeftButtonUp()
Definition: vtkInteractorStyle.h:231
vtkInteractorStyle::New
static vtkInteractorStyle * New()
This class must be supplied with a vtkRenderWindowInteractor wrapper or parent.
vtkInteractorStyle::UniformScale
virtual void UniformScale()
Definition: vtkInteractorStyle.h:301
vtkInteractorStyle::Rotate
virtual void Rotate()
These methods for the different interactions in different modes are overridden in subclasses to perfo...
Definition: vtkInteractorStyle.h:296
vtkInteractorStyle::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInteractorStyle::OnRightButtonUp
virtual void OnRightButtonUp()
Definition: vtkInteractorStyle.h:235
vtkInteractorStyleJoystickActor
manipulate objects in the scene independently of one another
Definition: vtkInteractorStyleJoystickActor.h:44
vtkCellPicker
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:69