29 #ifndef vtkRenderWindowInteractor3D_h 30 #define vtkRenderWindowInteractor3D_h 32 #include "vtkRenderingCoreModule.h" 86 return this->WorldEventPositions[pointerIndex];
94 return this->LastWorldEventPositions[pointerIndex];
102 return this->WorldEventOrientations[pointerIndex];
110 return this->LastWorldEventOrientations[pointerIndex];
112 virtual void GetWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
113 virtual void GetLastWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
130 <<
"): setting PhysicalEventPosition to (" 131 << x <<
"," << y <<
"," << z
132 <<
") for pointerIndex number " << pointerIndex);
133 if (this->PhysicalEventPositions[pointerIndex][0] != x ||
134 this->PhysicalEventPositions[pointerIndex][1] != y ||
135 this->PhysicalEventPositions[pointerIndex][2] != z ||
136 this->LastPhysicalEventPositions[pointerIndex][0] != x ||
137 this->LastPhysicalEventPositions[pointerIndex][1] != y ||
138 this->LastPhysicalEventPositions[pointerIndex][2] != z)
140 this->LastPhysicalEventPositions[pointerIndex][0] = this->PhysicalEventPositions[pointerIndex][0];
141 this->LastPhysicalEventPositions[pointerIndex][1] = this->PhysicalEventPositions[pointerIndex][1];
142 this->LastPhysicalEventPositions[pointerIndex][2] = this->PhysicalEventPositions[pointerIndex][2];
143 this->PhysicalEventPositions[pointerIndex][0] = x;
144 this->PhysicalEventPositions[pointerIndex][1] = y;
145 this->PhysicalEventPositions[pointerIndex][2] = z;
149 virtual void SetPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
158 virtual void GetPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
159 virtual void GetLastPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
160 virtual void GetStartingPhysicalEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
177 <<
"): setting WorldEventPosition to (" 178 << x <<
"," << y <<
"," << z
179 <<
") for pointerIndex number " << pointerIndex);
180 if (this->WorldEventPositions[pointerIndex][0] != x ||
181 this->WorldEventPositions[pointerIndex][1] != y ||
182 this->WorldEventPositions[pointerIndex][2] != z ||
183 this->LastWorldEventPositions[pointerIndex][0] != x ||
184 this->LastWorldEventPositions[pointerIndex][1] != y ||
185 this->LastWorldEventPositions[pointerIndex][2] != z)
187 this->LastWorldEventPositions[pointerIndex][0] = this->WorldEventPositions[pointerIndex][0];
188 this->LastWorldEventPositions[pointerIndex][1] = this->WorldEventPositions[pointerIndex][1];
189 this->LastWorldEventPositions[pointerIndex][2] = this->WorldEventPositions[pointerIndex][2];
190 this->WorldEventPositions[pointerIndex][0] = x;
191 this->WorldEventPositions[pointerIndex][1] = y;
192 this->WorldEventPositions[pointerIndex][2] = z;
204 <<
"): setting WorldEventOrientation to (" 205 << w <<
"," << x <<
"," << y <<
"," << z
206 <<
") for pointerIndex number " << pointerIndex);
207 if (this->WorldEventOrientations[pointerIndex][0] != w ||
208 this->WorldEventOrientations[pointerIndex][1] != x ||
209 this->WorldEventOrientations[pointerIndex][2] != y ||
210 this->WorldEventOrientations[pointerIndex][3] != z ||
211 this->LastWorldEventOrientations[pointerIndex][0] != w ||
212 this->LastWorldEventOrientations[pointerIndex][1] != x ||
213 this->LastWorldEventOrientations[pointerIndex][2] != y ||
214 this->LastWorldEventOrientations[pointerIndex][3] != z)
216 this->LastWorldEventOrientations[pointerIndex][0] = this->WorldEventOrientations[pointerIndex][0];
217 this->LastWorldEventOrientations[pointerIndex][1] = this->WorldEventOrientations[pointerIndex][1];
218 this->LastWorldEventOrientations[pointerIndex][2] = this->WorldEventOrientations[pointerIndex][2];
219 this->LastWorldEventOrientations[pointerIndex][3] = this->WorldEventOrientations[pointerIndex][3];
220 this->WorldEventOrientations[pointerIndex][0] = w;
221 this->WorldEventOrientations[pointerIndex][1] = x;
222 this->WorldEventOrientations[pointerIndex][2] = y;
223 this->WorldEventOrientations[pointerIndex][3] = z;
227 virtual void SetWorldEventPose(
vtkMatrix4x4* poseMatrix,
int pointerIndex);
271 void SetTranslation3D(
double val[3]);
272 vtkGetVector3Macro(Translation3D,
double);
273 vtkGetVector3Macro(LastTranslation3D,
double);
279 vtkGetMacro(Done,
bool);
287 double Translation3D[3];
288 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.
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 double * GetLastWorldEventPosition(int pointerIndex)
With VR we know the world coordinate positions and orientations of events.
virtual void TerminateApp(void)
This function is called on 'q','e' keypress if exitmethod is not specified and should be overridden b...
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.