20 #ifndef vtkRenderWindowInteractor3D_h
21 #define vtkRenderWindowInteractor3D_h
24 #include "vtkRenderingCoreModule.h"
28 VTK_ABI_NAMESPACE_BEGIN
71 return this->WorldEventPositions[pointerIndex];
79 return this->LastWorldEventPositions[pointerIndex];
87 return this->WorldEventOrientations[pointerIndex];
95 return this->LastWorldEventOrientations[pointerIndex];
97 virtual void GetWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
98 virtual void GetLastWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
113 vtkDebugMacro(<< this->
GetClassName() <<
" (" <<
this <<
"): setting PhysicalEventPosition to ("
114 << x <<
"," << y <<
"," << z <<
") for pointerIndex number " << pointerIndex);
115 if (this->PhysicalEventPositions[pointerIndex][0] != x ||
116 this->PhysicalEventPositions[pointerIndex][1] != y ||
117 this->PhysicalEventPositions[pointerIndex][2] != z ||
118 this->LastPhysicalEventPositions[pointerIndex][0] != x ||
119 this->LastPhysicalEventPositions[pointerIndex][1] != y ||
120 this->LastPhysicalEventPositions[pointerIndex][2] != z)
122 this->LastPhysicalEventPositions[pointerIndex][0] =
123 this->PhysicalEventPositions[pointerIndex][0];
124 this->LastPhysicalEventPositions[pointerIndex][1] =
125 this->PhysicalEventPositions[pointerIndex][1];
126 this->LastPhysicalEventPositions[pointerIndex][2] =
127 this->PhysicalEventPositions[pointerIndex][2];
128 this->PhysicalEventPositions[pointerIndex][0] = x;
129 this->PhysicalEventPositions[pointerIndex][1] = y;
130 this->PhysicalEventPositions[pointerIndex][2] = z;
134 virtual void SetPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
143 virtual void GetPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
144 virtual void GetLastPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
145 virtual void GetStartingPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
160 vtkDebugMacro(<< this->
GetClassName() <<
" (" <<
this <<
"): setting WorldEventPosition to ("
161 << x <<
"," << y <<
"," << z <<
") for pointerIndex number " << pointerIndex);
162 if (this->WorldEventPositions[pointerIndex][0] != x ||
163 this->WorldEventPositions[pointerIndex][1] != y ||
164 this->WorldEventPositions[pointerIndex][2] != z ||
165 this->LastWorldEventPositions[pointerIndex][0] != x ||
166 this->LastWorldEventPositions[pointerIndex][1] != y ||
167 this->LastWorldEventPositions[pointerIndex][2] != z)
169 this->LastWorldEventPositions[pointerIndex][0] = this->WorldEventPositions[pointerIndex][0];
170 this->LastWorldEventPositions[pointerIndex][1] = this->WorldEventPositions[pointerIndex][1];
171 this->LastWorldEventPositions[pointerIndex][2] = this->WorldEventPositions[pointerIndex][2];
172 this->WorldEventPositions[pointerIndex][0] = x;
173 this->WorldEventPositions[pointerIndex][1] = y;
174 this->WorldEventPositions[pointerIndex][2] = z;
184 vtkDebugMacro(<< this->
GetClassName() <<
" (" <<
this <<
"): setting WorldEventOrientation to ("
185 << w <<
"," << x <<
"," << y <<
"," << z <<
") for pointerIndex number "
187 if (this->WorldEventOrientations[pointerIndex][0] != w ||
188 this->WorldEventOrientations[pointerIndex][1] != x ||
189 this->WorldEventOrientations[pointerIndex][2] != y ||
190 this->WorldEventOrientations[pointerIndex][3] != z ||
191 this->LastWorldEventOrientations[pointerIndex][0] != w ||
192 this->LastWorldEventOrientations[pointerIndex][1] != x ||
193 this->LastWorldEventOrientations[pointerIndex][2] != y ||
194 this->LastWorldEventOrientations[pointerIndex][3] != z)
196 this->LastWorldEventOrientations[pointerIndex][0] =
197 this->WorldEventOrientations[pointerIndex][0];
198 this->LastWorldEventOrientations[pointerIndex][1] =
199 this->WorldEventOrientations[pointerIndex][1];
200 this->LastWorldEventOrientations[pointerIndex][2] =
201 this->WorldEventOrientations[pointerIndex][2];
202 this->LastWorldEventOrientations[pointerIndex][3] =
203 this->WorldEventOrientations[pointerIndex][3];
204 this->WorldEventOrientations[pointerIndex][0] = w;
205 this->WorldEventOrientations[pointerIndex][1] = x;
206 this->WorldEventOrientations[pointerIndex][2] = y;
207 this->WorldEventOrientations[pointerIndex][3] = z;
211 virtual void SetWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
273 void SetTranslation3D(
double val[3]);
274 vtkGetVector3Macro(Translation3D,
double);
275 vtkGetVector3Macro(LastTranslation3D,
double);
284 double Translation3D[3];
285 double LastTranslation3D[3];
306 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 SetWorldEventPosition(double x, double y, double z, int pointerIndex)
With VR we know the world coordinate positions and orientations of events.
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.
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
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.