VTK  9.3.1
vtkInteractorStyle3D.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
39 #ifndef vtkInteractorStyle3D_h
40 #define vtkInteractorStyle3D_h
41 
42 #include "vtkInteractorStyle.h"
43 #include "vtkNew.h" // ivars
44 #include "vtkRenderingCoreModule.h" // For export macro
45 
46 VTK_ABI_NAMESPACE_BEGIN
48 class vtkCamera;
49 class vtkProp3D;
50 class vtkMatrix3x3;
51 class vtkMatrix4x4;
52 class vtkTimerLog;
53 class vtkTransform;
54 
55 class VTKRENDERINGCORE_EXPORT vtkInteractorStyle3D : public vtkInteractorStyle
56 {
57 public:
58  static vtkInteractorStyle3D* New();
60  void PrintSelf(ostream& os, vtkIndent indent) override;
61 
62  // This method handles updating the prop based on changes in the devices
63  // pose. We use rotate as the state to mean adjusting-the-actor-pose
64  // if last world event position \p lwpos and orientation \p lwori are defined
65  // then this function do not use the Interactor3D to get the last world event position
66  // and orientation. This is useful when one needs to pass custom world event data.
67  virtual void PositionProp(vtkEventData*, double* lwpos = nullptr, double* lwori = nullptr);
68 
69  // This method handles updating the camera based on changes in the devices
70  // pose. We use Dolly as the state to mean moving the camera forward
71  virtual void Dolly3D(vtkEventData*);
72 
74 
79  vtkSetMacro(DollyPhysicalSpeed, double);
80  vtkGetMacro(DollyPhysicalSpeed, double);
82 
88  virtual void SetScale(vtkCamera* cam, double newScale);
89 
91 
95  vtkGetObjectMacro(InteractionPicker, vtkAbstractPropPicker);
96  void SetInteractionPicker(vtkAbstractPropPicker* prop);
97 
98 protected:
100  ~vtkInteractorStyle3D() override;
101 
102  void FindPickedActor(double pos[3], double orient[4]);
103 
104  void Prop3DTransform(
105  vtkProp3D* prop3D, double* boxCenter, int NumRotation, double** rotate, double* scale);
106 
111 
113  double AppliedTranslation[3];
114 
117  double LastTrackPadPosition[2];
118 
119 private:
121  void operator=(const vtkInteractorStyle3D&) = delete;
122 };
123 
124 VTK_ABI_NAMESPACE_END
125 #endif
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:30
vtkNew< vtkTimerLog > LastDolly3DEventTime
Get/Set the interaction picker.
static vtkInteractorStyle * New()
This class must be supplied with a vtkRenderWindowInteractor wrapper or parent.
vtkTransform * TempTransform
Get/Set the interaction picker.
extends interaction to support 3D input
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:49
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:38
double DollyPhysicalSpeed
Get/Set the interaction picker.
Timer support and logging.
Definition: vtkTimerLog.h:84
a simple class to control print indentation
Definition: vtkIndent.h:28
a virtual camera for 3D rendering
Definition: vtkCamera.h:40
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract API for pickers that can pick an instance of vtkProp
vtkMatrix4x4 * TempMatrix4
Get/Set the interaction picker.
provide event-driven interface to the rendering window (defines trackball mode)
vtkMatrix3x3 * TempMatrix3
Get/Set the interaction picker.
vtkAbstractPropPicker * InteractionPicker
Get/Set the interaction picker.
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:25
vtkProp3D * InteractionProp
Get/Set the interaction picker.