29 #ifndef vtkRenderWindowInteractor3D_h 30 #define vtkRenderWindowInteractor3D_h 33 #include "vtkRenderingCoreModule.h" 79 return this->WorldEventPositions[pointerIndex];
87 return this->LastWorldEventPositions[pointerIndex];
95 return this->WorldEventOrientations[pointerIndex];
103 return this->LastWorldEventOrientations[pointerIndex];
105 virtual void GetWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
106 virtual void GetLastWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
121 vtkDebugMacro(<< this->
GetClassName() <<
" (" <<
this <<
"): setting PhysicalEventPosition to (" 122 << x <<
"," << y <<
"," << z <<
") for pointerIndex number " << pointerIndex);
123 if (this->PhysicalEventPositions[pointerIndex][0] != x ||
124 this->PhysicalEventPositions[pointerIndex][1] != y ||
125 this->PhysicalEventPositions[pointerIndex][2] != z ||
126 this->LastPhysicalEventPositions[pointerIndex][0] != x ||
127 this->LastPhysicalEventPositions[pointerIndex][1] != y ||
128 this->LastPhysicalEventPositions[pointerIndex][2] != z)
130 this->LastPhysicalEventPositions[pointerIndex][0] =
131 this->PhysicalEventPositions[pointerIndex][0];
132 this->LastPhysicalEventPositions[pointerIndex][1] =
133 this->PhysicalEventPositions[pointerIndex][1];
134 this->LastPhysicalEventPositions[pointerIndex][2] =
135 this->PhysicalEventPositions[pointerIndex][2];
136 this->PhysicalEventPositions[pointerIndex][0] = x;
137 this->PhysicalEventPositions[pointerIndex][1] = y;
138 this->PhysicalEventPositions[pointerIndex][2] = z;
142 virtual void SetPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
151 virtual void GetPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
152 virtual void GetLastPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
153 virtual void GetStartingPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
168 vtkDebugMacro(<< this->
GetClassName() <<
" (" <<
this <<
"): setting WorldEventPosition to (" 169 << x <<
"," << y <<
"," << z <<
") for pointerIndex number " << pointerIndex);
170 if (this->WorldEventPositions[pointerIndex][0] != x ||
171 this->WorldEventPositions[pointerIndex][1] != y ||
172 this->WorldEventPositions[pointerIndex][2] != z ||
173 this->LastWorldEventPositions[pointerIndex][0] != x ||
174 this->LastWorldEventPositions[pointerIndex][1] != y ||
175 this->LastWorldEventPositions[pointerIndex][2] != z)
177 this->LastWorldEventPositions[pointerIndex][0] = this->WorldEventPositions[pointerIndex][0];
178 this->LastWorldEventPositions[pointerIndex][1] = this->WorldEventPositions[pointerIndex][1];
179 this->LastWorldEventPositions[pointerIndex][2] = this->WorldEventPositions[pointerIndex][2];
180 this->WorldEventPositions[pointerIndex][0] = x;
181 this->WorldEventPositions[pointerIndex][1] = y;
182 this->WorldEventPositions[pointerIndex][2] = z;
192 vtkDebugMacro(<< this->
GetClassName() <<
" (" <<
this <<
"): setting WorldEventOrientation to (" 193 << w <<
"," << x <<
"," << y <<
"," << z <<
") for pointerIndex number " 195 if (this->WorldEventOrientations[pointerIndex][0] != w ||
196 this->WorldEventOrientations[pointerIndex][1] != x ||
197 this->WorldEventOrientations[pointerIndex][2] != y ||
198 this->WorldEventOrientations[pointerIndex][3] != z ||
199 this->LastWorldEventOrientations[pointerIndex][0] != w ||
200 this->LastWorldEventOrientations[pointerIndex][1] != x ||
201 this->LastWorldEventOrientations[pointerIndex][2] != y ||
202 this->LastWorldEventOrientations[pointerIndex][3] != z)
204 this->LastWorldEventOrientations[pointerIndex][0] =
205 this->WorldEventOrientations[pointerIndex][0];
206 this->LastWorldEventOrientations[pointerIndex][1] =
207 this->WorldEventOrientations[pointerIndex][1];
208 this->LastWorldEventOrientations[pointerIndex][2] =
209 this->WorldEventOrientations[pointerIndex][2];
210 this->LastWorldEventOrientations[pointerIndex][3] =
211 this->WorldEventOrientations[pointerIndex][3];
212 this->WorldEventOrientations[pointerIndex][0] = w;
213 this->WorldEventOrientations[pointerIndex][1] = x;
214 this->WorldEventOrientations[pointerIndex][2] = y;
215 this->WorldEventOrientations[pointerIndex][3] = z;
219 virtual void SetWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
260 void SetTranslation3D(
double val[3]);
261 vtkGetVector3Macro(Translation3D,
double);
262 vtkGetVector3Macro(LastTranslation3D,
double);
271 double Translation3D[3];
272 double LastTranslation3D[3];
virtual void SetPhysicalTranslation(vtkCamera *, double, double, double)
Set/Get the optional scale translation to map world coordinates into the 3D physical space (meters...
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.
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 the optional scale translation to map world coordinates into the 3D physical space (meters...
static vtkRenderWindowInteractor * New()
platform-independent render window interaction including picking and frame rate control.
const char * GetClassName() const
Return the class name as a string.
virtual double * GetWorldEventPosition(int pointerIndex)
With VR we know the world coordinate positions and orientations of events.
a simple class to control print indentation
a virtual camera for 3D rendering
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 optional scale translation to map world coordinates into the 3D physical space (meters...
vtkEventDataDevice
platform-independent event data structures
virtual void SetPhysicalScale(double)
Set/Get the optional scale translation to map world coordinates into the 3D physical space (meters...
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.