VTK  9.3.20240327
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
137 #ifndef vtkInteractorStyleTrackballActor_h
138 #define vtkInteractorStyleTrackballActor_h
139 
140 #include "vtkInteractionStyleModule.h" // For export macro
141 #include "vtkInteractorStyle.h"
142 
143 VTK_ABI_NAMESPACE_BEGIN
144 class vtkCellPicker;
145 
146 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballActor : public vtkInteractorStyle
147 {
148 public:
151  void PrintSelf(ostream& os, vtkIndent indent) override;
152 
154 
158  void OnMouseMove() override;
159  void OnLeftButtonDown() override;
160  void OnLeftButtonUp() override;
161  void OnMiddleButtonDown() override;
162  void OnMiddleButtonUp() override;
163  void OnRightButtonDown() override;
164  void OnRightButtonUp() override;
166 
167  // These methods for the different interactions in different modes
168  // are overridden in subclasses to perform the correct motion. Since
169  // they might be called from OnTimer, they do not have mouse coord parameters
170  // (use interactor's GetEventPosition and GetLastEventPosition)
171  void Rotate() override;
172  void Spin() override;
173  void Pan() override;
174  void Dolly() override;
175  void UniformScale() override;
176 
177 protected:
180 
181  void FindPickedActor(int x, int y);
182 
184  vtkProp3D* prop3D, double* boxCenter, int NumRotation, double** rotate, double* scale);
185 
186  double MotionFactor;
187 
190 
191 private:
193  void operator=(const vtkInteractorStyleTrackballActor&) = delete;
194 };
195 
196 VTK_ABI_NAMESPACE_END
197 #endif
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:91
a simple class to control print indentation
Definition: vtkIndent.h:108
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:88
@ scale
Definition: vtkX3D.h:229