VTK  9.0.1
vtkInteractorStyle3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInteractorStyle3D.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 =========================================================================*/
51 #ifndef vtkInteractorStyle3D_h
52 #define vtkInteractorStyle3D_h
53 
54 #include "vtkInteractorStyle.h"
55 #include "vtkNew.h" // ivars
56 #include "vtkRenderingCoreModule.h" // For export macro
57 
59 class vtkCamera;
60 class vtkProp3D;
61 class vtkMatrix3x3;
62 class vtkMatrix4x4;
63 class vtkTimerLog;
64 class vtkTransform;
65 
66 class VTKRENDERINGCORE_EXPORT vtkInteractorStyle3D : public vtkInteractorStyle
67 {
68 public:
71  void PrintSelf(ostream& os, vtkIndent indent) override;
72 
73  // This method handles updating the prop based on changes in the devices
74  // pose. We use rotate as the state to mean adjusting-the-actor-pose
75  virtual void PositionProp(vtkEventData*);
76 
77  // This method handles updating the camera based on changes in the devices
78  // pose. We use Dolly as the state to mean moving the camera forward
79  virtual void Dolly3D(vtkEventData*);
80 
82 
87  vtkSetMacro(DollyPhysicalSpeed, double);
88  vtkGetMacro(DollyPhysicalSpeed, double);
90 
96  virtual void SetScale(vtkCamera* cam, double newScale);
97 
99 
103  vtkGetObjectMacro(InteractionPicker, vtkAbstractPropPicker);
105 
106 protected:
109 
110  void FindPickedActor(double pos[3], double orient[4]);
111 
113  vtkProp3D* prop3D, double* boxCenter, int NumRotation, double** rotate, double* scale);
114 
119 
121  double AppliedTranslation[3];
122 
125 
126 private:
127  vtkInteractorStyle3D(const vtkInteractorStyle3D&) = delete; // Not implemented.
128  void operator=(const vtkInteractorStyle3D&) = delete; // Not implemented.
129 };
130 
131 #endif
vtkInteractorStyle3D::Dolly3D
virtual void Dolly3D(vtkEventData *)
vtkInteractorStyle3D::~vtkInteractorStyle3D
~vtkInteractorStyle3D() override
vtkEventData
Definition: vtkEventData.h:66
vtkInteractorStyle.h
vtkX3D::scale
@ scale
Definition: vtkX3D.h:235
vtkInteractorStyle3D::SetScale
virtual void SetScale(vtkCamera *cam, double newScale)
Set the scaling factor from world to physical space.
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:44
vtkInteractorStyle3D::TempTransform
vtkTransform * TempTransform
Definition: vtkInteractorStyle3D.h:120
vtkInteractorStyle3D::New
static vtkInteractorStyle3D * New()
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:55
vtkMatrix3x3
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:34
vtkInteractorStyle3D::InteractionProp
vtkProp3D * InteractionProp
Definition: vtkInteractorStyle3D.h:116
vtkInteractorStyle3D::SetInteractionPicker
void SetInteractionPicker(vtkAbstractPropPicker *prop)
vtkInteractorStyle3D::PositionProp
virtual void PositionProp(vtkEventData *)
vtkInteractorStyle3D::vtkInteractorStyle3D
vtkInteractorStyle3D()
vtkInteractorStyle3D::TempMatrix3
vtkMatrix3x3 * TempMatrix3
Definition: vtkInteractorStyle3D.h:117
vtkInteractorStyle3D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInteractorStyle3D::TempMatrix4
vtkMatrix4x4 * TempMatrix4
Definition: vtkInteractorStyle3D.h:118
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:36
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:46
vtkNew< vtkTimerLog >
vtkAbstractPropPicker
abstract API for pickers that can pick an instance of vtkProp
Definition: vtkAbstractPropPicker.h:80
vtkInteractorStyle
provide event-driven interface to the rendering window (defines trackball mode)
Definition: vtkInteractorStyle.h:139
vtkInteractorStyle3D
extends interaction to support 3D input
Definition: vtkInteractorStyle3D.h:67
vtkInteractorStyle3D::LastDolly3DEventTime
vtkNew< vtkTimerLog > LastDolly3DEventTime
Definition: vtkInteractorStyle3D.h:124
vtkTimerLog
Timer support and logging.
Definition: vtkTimerLog.h:91
vtkNew.h
vtkInteractorStyle3D::Prop3DTransform
void Prop3DTransform(vtkProp3D *prop3D, double *boxCenter, int NumRotation, double **rotate, double *scale)
vtkInteractorStyle3D::InteractionPicker
vtkAbstractPropPicker * InteractionPicker
Definition: vtkInteractorStyle3D.h:115
vtkInteractorStyle3D::FindPickedActor
void FindPickedActor(double pos[3], double orient[4])
vtkInteractorStyle3D::DollyPhysicalSpeed
double DollyPhysicalSpeed
Definition: vtkInteractorStyle3D.h:123