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 =========================================================================*/
40 #ifndef vtkInteractorStyleTrackballActor_h
41 #define vtkInteractorStyleTrackballActor_h
42 
43 #include "vtkInteractionStyleModule.h" // For export macro
44 #include "vtkInteractorStyle.h"
45 
46 class vtkCellPicker;
47 
48 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballActor : public vtkInteractorStyle
49 {
50 public:
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56 
60  void OnMouseMove() override;
61  void OnLeftButtonDown() override;
62  void OnLeftButtonUp() override;
63  void OnMiddleButtonDown() override;
64  void OnMiddleButtonUp() override;
65  void OnRightButtonDown() override;
66  void OnRightButtonUp() override;
68 
69  // These methods for the different interactions in different modes
70  // are overridden in subclasses to perform the correct motion. Since
71  // they might be called from OnTimer, they do not have mouse coord parameters
72  // (use interactor's GetEventPosition and GetLastEventPosition)
73  void Rotate() override;
74  void Spin() override;
75  void Pan() override;
76  void Dolly() override;
77  void UniformScale() override;
78 
79 protected:
82 
83  void FindPickedActor(int x, int y);
84 
85  void Prop3DTransform(
86  vtkProp3D* prop3D, double* boxCenter, int NumRotation, double** rotate, double* scale);
87 
88  double MotionFactor;
89 
92 
93 private:
95  void operator=(const vtkInteractorStyleTrackballActor&) = delete;
96 };
97 
98 #endif
vtkInteractorStyle::Dolly
virtual void Dolly()
Definition: vtkInteractorStyle.h:304
vtkInteractorStyle.h
vtkX3D::scale
@ scale
Definition: vtkX3D.h:235
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
vtkInteractorStyle::Pan
virtual void Pan()
Definition: vtkInteractorStyle.h:303
vtkInteractorStyle::OnMiddleButtonUp
virtual void OnMiddleButtonUp()
Definition: vtkInteractorStyle.h:239
vtkInteractorStyle::OnMouseMove
virtual void OnMouseMove()
Generic event bindings can be overridden in subclasses.
Definition: vtkInteractorStyle.h:235
vtkInteractorStyle::Spin
virtual void Spin()
Definition: vtkInteractorStyle.h:302
vtkInteractorStyle::OnMiddleButtonDown
virtual void OnMiddleButtonDown()
Definition: vtkInteractorStyle.h:238
vtkInteractorStyle::OnRightButtonDown
virtual void OnRightButtonDown()
Definition: vtkInteractorStyle.h:240
vtkInteractorStyle::OnLeftButtonDown
virtual void OnLeftButtonDown()
Definition: vtkInteractorStyle.h:236
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkInteractorStyleTrackballActor::MotionFactor
double MotionFactor
Definition: vtkInteractorStyleTrackballActor.h:88
vtkInteractorStyle
provide event-driven interface to the rendering window (defines trackball mode)
Definition: vtkInteractorStyle.h:147
vtkInteractorStyle::OnLeftButtonUp
virtual void OnLeftButtonUp()
Definition: vtkInteractorStyle.h:237
vtkInteractorStyle::New
static vtkInteractorStyle * New()
This class must be supplied with a vtkRenderWindowInteractor wrapper or parent.
vtkInteractorStyle::UniformScale
virtual void UniformScale()
Definition: vtkInteractorStyle.h:306
vtkInteractorStyle::Rotate
virtual void Rotate()
These methods for the different interactions in different modes are overridden in subclasses to perfo...
Definition: vtkInteractorStyle.h:301
vtkInteractorStyleTrackballActor::InteractionProp
vtkProp3D * InteractionProp
Definition: vtkInteractorStyleTrackballActor.h:90
vtkInteractorStyleTrackballActor::InteractionPicker
vtkCellPicker * InteractionPicker
Definition: vtkInteractorStyleTrackballActor.h:91
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:241
vtkCellPicker
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:66
vtkInteractorStyleTrackballActor
manipulate objects in the scene independent of each other
Definition: vtkInteractorStyleTrackballActor.h:48