VTK  9.0.1
vtkInteractorStyleTrackballActor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInteractorStyleTrackballActor.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 =========================================================================*/
37 #ifndef vtkInteractorStyleTrackballActor_h
38 #define vtkInteractorStyleTrackballActor_h
39 
40 #include "vtkInteractionStyleModule.h" // For export macro
41 #include "vtkInteractorStyle.h"
42 
43 class vtkCellPicker;
44 
45 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballActor : public vtkInteractorStyle
46 {
47 public:
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 
83  vtkProp3D* prop3D, double* boxCenter, int NumRotation, double** rotate, double* scale);
84 
85  double MotionFactor;
86 
89 
90 private:
92  void operator=(const vtkInteractorStyleTrackballActor&) = delete;
93 };
94 
95 #endif
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:67
a simple class to control print indentation
Definition: vtkIndent.h:34
manipulate objects in the scene independent of each other
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void FindPickedActor(int x, int y)
void Rotate() override
These methods for the different interactions in different modes are overridden in subclasses to perfo...
static vtkInteractorStyleTrackballActor * New()
void Prop3DTransform(vtkProp3D *prop3D, double *boxCenter, int NumRotation, double **rotate, double *scale)
void OnMouseMove() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
provide event-driven interface to the rendering window (defines trackball mode)
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:44
@ scale
Definition: vtkX3D.h:235