VTK
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 "vtkRenderingCoreModule.h" // For export macro
55 #include "vtkInteractorStyle.h"
56 
57 class vtkCamera;
58 class vtkPropPicker;
59 class vtkProp3D;
60 class vtkMatrix3x3;
61 class vtkMatrix4x4;
62 class vtkTransform;
63 
64 class VTKRENDERINGCORE_EXPORT vtkInteractorStyle3D : public vtkInteractorStyle
65 {
66 public:
67  static vtkInteractorStyle3D *New();
69  void PrintSelf(ostream& os, vtkIndent indent) override;
70 
71  // This method handles updating the prop based on changes in the devices
72  // pose. We use rotate as the state to mean adjusting-the-actor-pose
73  virtual void PositionProp(vtkEventData *);
74 
75  // This method handles updating the camera based on changes in the devices
76  // pose. We use Dolly as the state to mean moving the camera forward
77  virtual void Dolly3D(vtkEventData *);
78 
80 
87  vtkSetMacro(DollyMotionFactor, double);
88  vtkGetMacro(DollyMotionFactor, double);
90 
98  void SetScale(vtkCamera *cam, double distance);
99 
104  {
105  return this->InteractionPicker;
106  };
107 
108 protected:
110  ~vtkInteractorStyle3D() override;
111 
112  void FindPickedActor(double pos[3], double orient[4]);
113 
114  void Prop3DTransform(vtkProp3D *prop3D,
115  double *boxCenter,
116  int NumRotation,
117  double **rotate,
118  double *scale);
119 
125  double AppliedTranslation[3];
126 
128 
129 private:
130  vtkInteractorStyle3D(const vtkInteractorStyle3D&) = delete; // Not implemented.
131  void operator=(const vtkInteractorStyle3D&) = delete; // Not implemented.
132 };
133 
134 #endif
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
pick an actor/prop using graphics hardware
Definition: vtkPropPicker.h:42
vtkPropPicker * InteractionPicker
static vtkInteractorStyle * New()
This class must be supplied with a vtkRenderWindowInteractor wrapper or parent.
extends interaction to support 3D input
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:60
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:46
a simple class to control print indentation
Definition: vtkIndent.h:39
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkPropPicker * GetInteractionPicker()
Get the interaction picker.
provide event-driven interface to the rendering window (defines trackball mode)
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:36