32 #ifndef vtkRenderWindowInteractor3D_h
33 #define vtkRenderWindowInteractor3D_h
36 #include "vtkRenderingCoreModule.h"
82 return this->WorldEventPositions[pointerIndex];
90 return this->LastWorldEventPositions[pointerIndex];
98 return this->WorldEventOrientations[pointerIndex];
106 return this->LastWorldEventOrientations[pointerIndex];
108 virtual void GetWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
109 virtual void GetLastWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
124 vtkDebugMacro(<< this->
GetClassName() <<
" (" <<
this <<
"): setting PhysicalEventPosition to ("
125 << x <<
"," << y <<
"," << z <<
") for pointerIndex number " << pointerIndex);
126 if (this->PhysicalEventPositions[pointerIndex][0] != x ||
127 this->PhysicalEventPositions[pointerIndex][1] != y ||
128 this->PhysicalEventPositions[pointerIndex][2] != z ||
129 this->LastPhysicalEventPositions[pointerIndex][0] != x ||
130 this->LastPhysicalEventPositions[pointerIndex][1] != y ||
131 this->LastPhysicalEventPositions[pointerIndex][2] != z)
133 this->LastPhysicalEventPositions[pointerIndex][0] =
134 this->PhysicalEventPositions[pointerIndex][0];
135 this->LastPhysicalEventPositions[pointerIndex][1] =
136 this->PhysicalEventPositions[pointerIndex][1];
137 this->LastPhysicalEventPositions[pointerIndex][2] =
138 this->PhysicalEventPositions[pointerIndex][2];
139 this->PhysicalEventPositions[pointerIndex][0] = x;
140 this->PhysicalEventPositions[pointerIndex][1] = y;
141 this->PhysicalEventPositions[pointerIndex][2] = z;
145 virtual void SetPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
154 virtual void GetPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
155 virtual void GetLastPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
156 virtual void GetStartingPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
171 vtkDebugMacro(<< this->
GetClassName() <<
" (" <<
this <<
"): setting WorldEventPosition to ("
172 << x <<
"," << y <<
"," << z <<
") for pointerIndex number " << pointerIndex);
173 if (this->WorldEventPositions[pointerIndex][0] != x ||
174 this->WorldEventPositions[pointerIndex][1] != y ||
175 this->WorldEventPositions[pointerIndex][2] != z ||
176 this->LastWorldEventPositions[pointerIndex][0] != x ||
177 this->LastWorldEventPositions[pointerIndex][1] != y ||
178 this->LastWorldEventPositions[pointerIndex][2] != z)
180 this->LastWorldEventPositions[pointerIndex][0] = this->WorldEventPositions[pointerIndex][0];
181 this->LastWorldEventPositions[pointerIndex][1] = this->WorldEventPositions[pointerIndex][1];
182 this->LastWorldEventPositions[pointerIndex][2] = this->WorldEventPositions[pointerIndex][2];
183 this->WorldEventPositions[pointerIndex][0] = x;
184 this->WorldEventPositions[pointerIndex][1] = y;
185 this->WorldEventPositions[pointerIndex][2] = z;
195 vtkDebugMacro(<< this->
GetClassName() <<
" (" <<
this <<
"): setting WorldEventOrientation to ("
196 << w <<
"," << x <<
"," << y <<
"," << z <<
") for pointerIndex number "
198 if (this->WorldEventOrientations[pointerIndex][0] != w ||
199 this->WorldEventOrientations[pointerIndex][1] != x ||
200 this->WorldEventOrientations[pointerIndex][2] != y ||
201 this->WorldEventOrientations[pointerIndex][3] != z ||
202 this->LastWorldEventOrientations[pointerIndex][0] != w ||
203 this->LastWorldEventOrientations[pointerIndex][1] != x ||
204 this->LastWorldEventOrientations[pointerIndex][2] != y ||
205 this->LastWorldEventOrientations[pointerIndex][3] != z)
207 this->LastWorldEventOrientations[pointerIndex][0] =
208 this->WorldEventOrientations[pointerIndex][0];
209 this->LastWorldEventOrientations[pointerIndex][1] =
210 this->WorldEventOrientations[pointerIndex][1];
211 this->LastWorldEventOrientations[pointerIndex][2] =
212 this->WorldEventOrientations[pointerIndex][2];
213 this->LastWorldEventOrientations[pointerIndex][3] =
214 this->WorldEventOrientations[pointerIndex][3];
215 this->WorldEventOrientations[pointerIndex][0] = w;
216 this->WorldEventOrientations[pointerIndex][1] = x;
217 this->WorldEventOrientations[pointerIndex][2] = y;
218 this->WorldEventOrientations[pointerIndex][3] = z;
222 virtual void SetWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
284 void SetTranslation3D(
double val[3]);
285 vtkGetVector3Macro(Translation3D,
double);
286 vtkGetVector3Macro(LastTranslation3D,
double);
295 double Translation3D[3];
296 double LastTranslation3D[3];
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.