VTK  9.1.0
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 =========================================================================*/
149 #ifndef vtkInteractorStyleTrackballActor_h
150 #define vtkInteractorStyleTrackballActor_h
151 
152 #include "vtkInteractionStyleModule.h" // For export macro
153 #include "vtkInteractorStyle.h"
154 
155 class vtkCellPicker;
156 
157 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballActor : public vtkInteractorStyle
158 {
159 public:
162  void PrintSelf(ostream& os, vtkIndent indent) override;
163 
165 
169  void OnMouseMove() override;
170  void OnLeftButtonDown() override;
171  void OnLeftButtonUp() override;
172  void OnMiddleButtonDown() override;
173  void OnMiddleButtonUp() override;
174  void OnRightButtonDown() override;
175  void OnRightButtonUp() override;
177 
178  // These methods for the different interactions in different modes
179  // are overridden in subclasses to perform the correct motion. Since
180  // they might be called from OnTimer, they do not have mouse coord parameters
181  // (use interactor's GetEventPosition and GetLastEventPosition)
182  void Rotate() override;
183  void Spin() override;
184  void Pan() override;
185  void Dolly() override;
186  void UniformScale() override;
187 
188 protected:
191 
192  void FindPickedActor(int x, int y);
193 
195  vtkProp3D* prop3D, double* boxCenter, int NumRotation, double** rotate, double* scale);
196 
197  double MotionFactor;
198 
201 
202 private:
204  void operator=(const vtkInteractorStyleTrackballActor&) = delete;
205 };
206 
207 #endif
vtkInteractorStyleTrackballActor::OnLeftButtonDown
void OnLeftButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyle.h
vtkX3D::scale
@ scale
Definition: vtkX3D.h:235
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:93
vtkInteractorStyleTrackballActor::Dolly
void Dolly() override
vtkInteractorStyleTrackballActor::OnLeftButtonUp
void OnLeftButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyleTrackballActor::vtkInteractorStyleTrackballActor
vtkInteractorStyleTrackballActor()
vtkInteractorStyleTrackballActor::FindPickedActor
void FindPickedActor(int x, int y)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkInteractorStyleTrackballActor::MotionFactor
double MotionFactor
Definition: vtkInteractorStyleTrackballActor.h:197
vtkInteractorStyleTrackballActor::Spin
void Spin() override
vtkInteractorStyleTrackballActor::UniformScale
void UniformScale() override
vtkInteractorStyle
provide event-driven interface to the rendering window (defines trackball mode)
Definition: vtkInteractorStyle.h:207
vtkInteractorStyleTrackballActor::Rotate
void Rotate() override
These methods for the different interactions in different modes are overridden in subclasses to perfo...
vtkInteractorStyleTrackballActor::OnMiddleButtonDown
void OnMiddleButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyleTrackballActor::OnMiddleButtonUp
void OnMiddleButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyleTrackballActor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInteractorStyleTrackballActor::OnRightButtonUp
void OnRightButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyleTrackballActor::InteractionProp
vtkProp3D * InteractionProp
Definition: vtkInteractorStyleTrackballActor.h:199
vtkInteractorStyleTrackballActor::InteractionPicker
vtkCellPicker * InteractionPicker
Definition: vtkInteractorStyleTrackballActor.h:200
vtkInteractorStyleTrackballActor::OnMouseMove
void OnMouseMove() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyleTrackballActor::OnRightButtonDown
void OnRightButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyleTrackballActor::New
static vtkInteractorStyleTrackballActor * New()
vtkCellPicker
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:96
vtkInteractorStyleTrackballActor::Prop3DTransform
void Prop3DTransform(vtkProp3D *prop3D, double *boxCenter, int NumRotation, double **rotate, double *scale)
vtkInteractorStyleTrackballActor::Pan
void Pan() override
vtkInteractorStyleTrackballActor::~vtkInteractorStyleTrackballActor
~vtkInteractorStyleTrackballActor() override
vtkInteractorStyleTrackballActor
manipulate objects in the scene independent of each other
Definition: vtkInteractorStyleTrackballActor.h:158