VTK  9.3.0
vtkInteractorStyleTrackballActor.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
37 #ifndef vtkInteractorStyleTrackballActor_h
38 #define vtkInteractorStyleTrackballActor_h
39 
40 #include "vtkInteractionStyleModule.h" // For export macro
41 #include "vtkInteractorStyle.h"
42 
43 VTK_ABI_NAMESPACE_BEGIN
44 class vtkCellPicker;
45 
46 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballActor : public vtkInteractorStyle
47 {
48 public:
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
54 
58  void OnMouseMove() override;
59  void OnLeftButtonDown() override;
60  void OnLeftButtonUp() override;
61  void OnMiddleButtonDown() override;
62  void OnMiddleButtonUp() override;
63  void OnRightButtonDown() override;
64  void OnRightButtonUp() override;
66 
67  // These methods for the different interactions in different modes
68  // are overridden in subclasses to perform the correct motion. Since
69  // they might be called from OnTimer, they do not have mouse coord parameters
70  // (use interactor's GetEventPosition and GetLastEventPosition)
71  void Rotate() override;
72  void Spin() override;
73  void Pan() override;
74  void Dolly() override;
75  void UniformScale() override;
76 
77 protected:
80 
81  void FindPickedActor(int x, int y);
82 
84  vtkProp3D* prop3D, double* boxCenter, int NumRotation, double** rotate, double* scale);
85 
86  double MotionFactor;
87 
90 
91 private:
93  void operator=(const vtkInteractorStyleTrackballActor&) = delete;
94 };
95 
96 VTK_ABI_NAMESPACE_END
97 #endif
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:71
a simple class to control print indentation
Definition: vtkIndent.h:38
manipulate objects in the scene independent of each other
void OnMiddleButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
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 OnRightButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnRightButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnLeftButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnLeftButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
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.
void OnMiddleButtonDown() 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:48
@ scale
Definition: vtkX3D.h:229