VTK  9.1.0
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
59class vtkCamera;
60class vtkProp3D;
61class vtkMatrix3x3;
62class vtkMatrix4x4;
63class vtkTimerLog;
64class vtkTransform;
65
66class VTKRENDERINGCORE_EXPORT vtkInteractorStyle3D : public vtkInteractorStyle
67{
68public:
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 // if last world event position \p lwpos and orientation \p lwori are defined
76 // then this function do not use the Interactor3D to get the last world event position
77 // and orientation. This is useful when one needs to pass custom world event data.
78 virtual void PositionProp(vtkEventData*, double* lwpos = nullptr, double* lwori = nullptr);
79
80 // This method handles updating the camera based on changes in the devices
81 // pose. We use Dolly as the state to mean moving the camera forward
82 virtual void Dolly3D(vtkEventData*);
83
85
90 vtkSetMacro(DollyPhysicalSpeed, double);
91 vtkGetMacro(DollyPhysicalSpeed, double);
93
99 virtual void SetScale(vtkCamera* cam, double newScale);
100
102
106 vtkGetObjectMacro(InteractionPicker, vtkAbstractPropPicker);
108
109protected:
112
113 void FindPickedActor(double pos[3], double orient[4]);
114
116 vtkProp3D* prop3D, double* boxCenter, int NumRotation, double** rotate, double* scale);
117
122
124 double AppliedTranslation[3];
125
128 double LastTrackPadPosition[2];
129
130private:
132 void operator=(const vtkInteractorStyle3D&) = delete;
133};
134
135#endif
abstract API for pickers that can pick an instance of vtkProp
a virtual camera for 3D rendering
Definition: vtkCamera.h:155
a simple class to control print indentation
Definition: vtkIndent.h:113
extends interaction to support 3D input
vtkTransform * TempTransform
Get/Set the interaction picker.
virtual void Dolly3D(vtkEventData *)
double DollyPhysicalSpeed
Get/Set the interaction picker.
vtkAbstractPropPicker * InteractionPicker
Get/Set the interaction picker.
virtual void SetScale(vtkCamera *cam, double newScale)
Set the scaling factor from world to physical space.
static vtkInteractorStyle3D * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetInteractionPicker(vtkAbstractPropPicker *prop)
Get/Set the interaction picker.
~vtkInteractorStyle3D() override
Get/Set the interaction picker.
vtkMatrix3x3 * TempMatrix3
Get/Set the interaction picker.
vtkNew< vtkTimerLog > LastDolly3DEventTime
Get/Set the interaction picker.
virtual void PositionProp(vtkEventData *, double *lwpos=nullptr, double *lwori=nullptr)
vtkInteractorStyle3D()
Get/Set the interaction picker.
vtkProp3D * InteractionProp
Get/Set the interaction picker.
void Prop3DTransform(vtkProp3D *prop3D, double *boxCenter, int NumRotation, double **rotate, double *scale)
Get/Set the interaction picker.
vtkMatrix4x4 * TempMatrix4
Get/Set the interaction picker.
void FindPickedActor(double pos[3], double orient[4])
Get/Set the interaction picker.
provide event-driven interface to the rendering window (defines trackball mode)
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:63
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:145
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:93
Timer support and logging.
Definition: vtkTimerLog.h:199
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:164
@ scale
Definition: vtkX3D.h:235