VTK  9.3.1
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
28 #ifndef vtkInteractorStyleTrackballActor_h
29 #define vtkInteractorStyleTrackballActor_h
30 
31 #include "vtkInteractionStyleModule.h" // For export macro
32 #include "vtkInteractorStyle.h"
33 
34 VTK_ABI_NAMESPACE_BEGIN
35 class vtkCellPicker;
36 
37 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballActor : public vtkInteractorStyle
38 {
39 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
49  void OnMouseMove() override;
50  void OnLeftButtonDown() override;
51  void OnLeftButtonUp() override;
52  void OnMiddleButtonDown() override;
53  void OnMiddleButtonUp() override;
54  void OnRightButtonDown() override;
55  void OnRightButtonUp() override;
57 
58  // These methods for the different interactions in different modes
59  // are overridden in subclasses to perform the correct motion. Since
60  // they might be called from OnTimer, they do not have mouse coord parameters
61  // (use interactor's GetEventPosition and GetLastEventPosition)
62  void Rotate() override;
63  void Spin() override;
64  void Pan() override;
65  void Dolly() override;
66  void UniformScale() override;
67 
68 protected:
71 
72  void FindPickedActor(int x, int y);
73 
74  void Prop3DTransform(
75  vtkProp3D* prop3D, double* boxCenter, int NumRotation, double** rotate, double* scale);
76 
77  double MotionFactor;
78 
81 
82 private:
84  void operator=(const vtkInteractorStyleTrackballActor&) = delete;
85 };
86 
87 VTK_ABI_NAMESPACE_END
88 #endif
virtual void OnLeftButtonDown()
virtual void Rotate()
These methods for the different interactions in different modes are overridden in subclasses to perfo...
virtual void OnMiddleButtonDown()
virtual void OnRightButtonDown()
virtual void OnLeftButtonUp()
static vtkInteractorStyle * New()
This class must be supplied with a vtkRenderWindowInteractor wrapper or parent.
virtual void OnMiddleButtonUp()
virtual void UniformScale()
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:38
virtual void OnRightButtonUp()
a simple class to control print indentation
Definition: vtkIndent.h:28
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.
provide event-driven interface to the rendering window (defines trackball mode)
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:61
virtual void OnMouseMove()
Generic event bindings can be overridden in subclasses.