29 #ifndef vtkRenderWindowInteractor3D_h 30 #define vtkRenderWindowInteractor3D_h 32 #include "vtkRenderingCoreModule.h" 83 return this->WorldEventPositions[pointerIndex];
91 return this->LastWorldEventPositions[pointerIndex];
99 return this->WorldEventOrientations[pointerIndex];
107 return this->LastWorldEventOrientations[pointerIndex];
125 <<
"): setting PhysicalEventPosition to (" 126 << x <<
"," << y <<
"," << z
127 <<
") for pointerIndex number " << pointerIndex);
128 if (this->PhysicalEventPositions[pointerIndex][0] != x ||
129 this->PhysicalEventPositions[pointerIndex][1] != y ||
130 this->PhysicalEventPositions[pointerIndex][2] != z ||
131 this->LastPhysicalEventPositions[pointerIndex][0] != x ||
132 this->LastPhysicalEventPositions[pointerIndex][1] != y ||
133 this->LastPhysicalEventPositions[pointerIndex][2] != z)
135 this->LastPhysicalEventPositions[pointerIndex][0] = this->PhysicalEventPositions[pointerIndex][0];
136 this->LastPhysicalEventPositions[pointerIndex][1] = this->PhysicalEventPositions[pointerIndex][1];
137 this->LastPhysicalEventPositions[pointerIndex][2] = this->PhysicalEventPositions[pointerIndex][2];
138 this->PhysicalEventPositions[pointerIndex][0] = x;
139 this->PhysicalEventPositions[pointerIndex][1] = y;
140 this->PhysicalEventPositions[pointerIndex][2] = z;
160 <<
"): setting WorldEventPosition to (" 161 << x <<
"," << y <<
"," << z
162 <<
") for pointerIndex number " << pointerIndex);
163 if (this->WorldEventPositions[pointerIndex][0] != x ||
164 this->WorldEventPositions[pointerIndex][1] != y ||
165 this->WorldEventPositions[pointerIndex][2] != z ||
166 this->LastWorldEventPositions[pointerIndex][0] != x ||
167 this->LastWorldEventPositions[pointerIndex][1] != y ||
168 this->LastWorldEventPositions[pointerIndex][2] != z)
170 this->LastWorldEventPositions[pointerIndex][0] = this->WorldEventPositions[pointerIndex][0];
171 this->LastWorldEventPositions[pointerIndex][1] = this->WorldEventPositions[pointerIndex][1];
172 this->LastWorldEventPositions[pointerIndex][2] = this->WorldEventPositions[pointerIndex][2];
173 this->WorldEventPositions[pointerIndex][0] = x;
174 this->WorldEventPositions[pointerIndex][1] = y;
175 this->WorldEventPositions[pointerIndex][2] = z;
187 <<
"): setting WorldEventOrientation to (" 188 << w <<
"," << x <<
"," << y <<
"," << z
189 <<
") for pointerIndex number " << pointerIndex);
190 if (this->WorldEventOrientations[pointerIndex][0] != w ||
191 this->WorldEventOrientations[pointerIndex][1] != x ||
192 this->WorldEventOrientations[pointerIndex][2] != y ||
193 this->WorldEventOrientations[pointerIndex][3] != z ||
194 this->LastWorldEventOrientations[pointerIndex][0] != w ||
195 this->LastWorldEventOrientations[pointerIndex][1] != x ||
196 this->LastWorldEventOrientations[pointerIndex][2] != y ||
197 this->LastWorldEventOrientations[pointerIndex][3] != z)
199 this->LastWorldEventOrientations[pointerIndex][0] = this->WorldEventOrientations[pointerIndex][0];
200 this->LastWorldEventOrientations[pointerIndex][1] = this->WorldEventOrientations[pointerIndex][1];
201 this->LastWorldEventOrientations[pointerIndex][2] = this->WorldEventOrientations[pointerIndex][2];
202 this->LastWorldEventOrientations[pointerIndex][3] = this->WorldEventOrientations[pointerIndex][3];
203 this->WorldEventOrientations[pointerIndex][0] = w;
204 this->WorldEventOrientations[pointerIndex][1] = x;
205 this->WorldEventOrientations[pointerIndex][2] = y;
206 this->WorldEventOrientations[pointerIndex][3] = z;
232 vtkSetVector2Macro(TouchPadPosition,
float);
233 vtkGetVector2Macro(TouchPadPosition,
float);
251 void SetTranslation3D(
double val[3]);
252 vtkGetVector3Macro(Translation3D,
double);
253 vtkGetVector3Macro(LastTranslation3D,
double);
259 vtkGetMacro(Done,
bool);
267 float TouchPadPosition[2];
268 double Translation3D[3];
269 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...
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 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...
virtual void SetPhysicalScale(double)
Set/Get the optional scale translation to map world coordinates into the 3D physical space (meters...
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.