20 #ifndef vtkRenderWindowInteractor3D_h
21 #define vtkRenderWindowInteractor3D_h
24 #include "vtkRenderingCoreModule.h"
29 VTK_ABI_NAMESPACE_BEGIN
73 return this->WorldEventPositions[pointerIndex];
81 return this->LastWorldEventPositions[pointerIndex];
89 return this->WorldEventOrientations[pointerIndex];
97 return this->LastWorldEventOrientations[pointerIndex];
99 virtual void GetWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
100 virtual void GetLastWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
115 vtkDebugMacro(<< this->
GetClassName() <<
" (" <<
this <<
"): setting PhysicalEventPosition to ("
116 << x <<
"," << y <<
"," << z <<
") for pointerIndex number " << pointerIndex);
117 if (this->PhysicalEventPositions[pointerIndex][0] != x ||
118 this->PhysicalEventPositions[pointerIndex][1] != y ||
119 this->PhysicalEventPositions[pointerIndex][2] != z ||
120 this->LastPhysicalEventPositions[pointerIndex][0] != x ||
121 this->LastPhysicalEventPositions[pointerIndex][1] != y ||
122 this->LastPhysicalEventPositions[pointerIndex][2] != z)
124 this->LastPhysicalEventPositions[pointerIndex][0] =
125 this->PhysicalEventPositions[pointerIndex][0];
126 this->LastPhysicalEventPositions[pointerIndex][1] =
127 this->PhysicalEventPositions[pointerIndex][1];
128 this->LastPhysicalEventPositions[pointerIndex][2] =
129 this->PhysicalEventPositions[pointerIndex][2];
130 this->PhysicalEventPositions[pointerIndex][0] = x;
131 this->PhysicalEventPositions[pointerIndex][1] = y;
132 this->PhysicalEventPositions[pointerIndex][2] = z;
136 virtual void SetPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
145 virtual void GetPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
146 virtual void GetLastPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
147 virtual void GetStartingPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
154 virtual
void GetStartingPhysicalToWorldMatrix(
vtkMatrix4x4* startingPhysicalToWorldMatrix);
168 virtual
void SetStartingPhysicalToWorldMatrix(
vtkMatrix4x4* startingPhysicalToWorldMatrix);
189 virtual
void SetWorldEventPosition(
double x,
double y,
double z,
int pointerIndex)
195 vtkDebugMacro(<< this->
GetClassName() <<
" (" <<
this <<
"): setting WorldEventPosition to ("
196 << x <<
"," << y <<
"," << z <<
") for pointerIndex number " << pointerIndex);
197 if (this->WorldEventPositions[pointerIndex][0] != x ||
198 this->WorldEventPositions[pointerIndex][1] != y ||
199 this->WorldEventPositions[pointerIndex][2] != z ||
200 this->LastWorldEventPositions[pointerIndex][0] != x ||
201 this->LastWorldEventPositions[pointerIndex][1] != y ||
202 this->LastWorldEventPositions[pointerIndex][2] != z)
204 this->LastWorldEventPositions[pointerIndex][0] = this->WorldEventPositions[pointerIndex][0];
205 this->LastWorldEventPositions[pointerIndex][1] = this->WorldEventPositions[pointerIndex][1];
206 this->LastWorldEventPositions[pointerIndex][2] = this->WorldEventPositions[pointerIndex][2];
207 this->WorldEventPositions[pointerIndex][0] = x;
208 this->WorldEventPositions[pointerIndex][1] = y;
209 this->WorldEventPositions[pointerIndex][2] = z;
219 vtkDebugMacro(<< this->
GetClassName() <<
" (" <<
this <<
"): setting WorldEventOrientation to ("
220 << w <<
"," << x <<
"," << y <<
"," << z <<
") for pointerIndex number "
222 if (this->WorldEventOrientations[pointerIndex][0] != w ||
223 this->WorldEventOrientations[pointerIndex][1] != x ||
224 this->WorldEventOrientations[pointerIndex][2] != y ||
225 this->WorldEventOrientations[pointerIndex][3] != z ||
226 this->LastWorldEventOrientations[pointerIndex][0] != w ||
227 this->LastWorldEventOrientations[pointerIndex][1] != x ||
228 this->LastWorldEventOrientations[pointerIndex][2] != y ||
229 this->LastWorldEventOrientations[pointerIndex][3] != z)
231 this->LastWorldEventOrientations[pointerIndex][0] =
232 this->WorldEventOrientations[pointerIndex][0];
233 this->LastWorldEventOrientations[pointerIndex][1] =
234 this->WorldEventOrientations[pointerIndex][1];
235 this->LastWorldEventOrientations[pointerIndex][2] =
236 this->WorldEventOrientations[pointerIndex][2];
237 this->LastWorldEventOrientations[pointerIndex][3] =
238 this->WorldEventOrientations[pointerIndex][3];
239 this->WorldEventOrientations[pointerIndex][0] = w;
240 this->WorldEventOrientations[pointerIndex][1] = x;
241 this->WorldEventOrientations[pointerIndex][2] = y;
242 this->WorldEventOrientations[pointerIndex][3] = z;
246 virtual void SetWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
308 void SetTranslation3D(
double val[3]);
309 vtkGetVector3Macro(Translation3D,
double);
310 vtkGetVector3Macro(LastTranslation3D,
double);
319 double Translation3D[3];
320 double LastTranslation3D[3];
346 VTK_ABI_NAMESPACE_END
virtual void SetPhysicalTranslation(vtkCamera *, double, double, double)
Set/get position of the physical coordinate system origin in world coordinates.
represent and manipulate 4x4 transformation matrices
virtual void Enable()
Enable/Disable interactions.
virtual void RecognizeGesture(vtkCommand::EventIds)
virtual void SetWorldEventOrientation(double w, double x, double y, double z, int pointerIndex)
With VR we know the world coordinate positions and orientations of events.
virtual double * GetPhysicalViewUp()
Set/get the direction of the physical coordinate system +Y axis in world coordinates.
virtual double * GetPhysicalViewDirection()
Set/get the direction of the physical coordinate system -Z axis in world coordinates.
adds support for 3D events to vtkRenderWindowInteractor.
virtual void RightButtonReleaseEvent()
Fire various events.
virtual void MiddleButtonPressEvent()
Fire various events.
virtual void MiddleButtonReleaseEvent()
Fire various events.
virtual double * GetPhysicalTranslation(vtkCamera *)
Set/get position of the physical coordinate system origin in world coordinates.
static vtkRenderWindowInteractor * New()
platform-independent render window interaction including picking and frame rate control.
vtkNew< vtkMatrix4x4 > StartingPhysicalToWorldMatrix
Store physical to world matrix at the start of a complex gesture.
virtual double * GetWorldEventPosition(int pointerIndex)
With VR we know the world coordinate positions and orientations of events.
a simple class to control print indentation
const char * GetClassName() const
Return the class name as a string.
a virtual camera for 3D rendering
virtual void SetPhysicalViewUp(double, double, double)
Set/get the direction of the physical coordinate system +Y axis in world coordinates.
virtual void SetPhysicalViewDirection(double, double, double)
Set/get the direction of the physical coordinate system -Z axis in world coordinates.
virtual double * GetLastWorldEventPosition(int pointerIndex)
With VR we know the world coordinate positions and orientations of events.
virtual void Modified()
Update the modification time for this object.
virtual double GetPhysicalScale()
Set/get the physical scale (world / physical distance ratio)
vtkEventDataDevice
platform-independent event data structures
#define VTK_MARSHALEXCLUDE(reason)
virtual void SetPhysicalScale(double)
Set/get the physical scale (world / physical distance ratio)
virtual void GetTouchPadPosition(vtkEventDataDevice, vtkEventDataDeviceInput, float[3])
Get the latest touchpad or joystick position for a device.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTKI_MAX_POINTERS
virtual double * GetWorldEventOrientation(int pointerIndex)
With VR we know the world coordinate positions and orientations of events.
virtual void RightButtonPressEvent()
Fire various events.
virtual double * GetLastWorldEventOrientation(int pointerIndex)
With VR we know the world coordinate positions and orientations of events.
virtual void SetPhysicalEventPosition(double x, double y, double z, int pointerIndex)
With VR we know the physical/room coordinate positions and orientations of events.
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL