Q3Tracker_GetPosition
You can use theQ3Tracker_GetPositionfunction to get the position of a tracker.
TQ3Status Q3Tracker_GetPosition ( TQ3TrackerObject trackerObject, TQ3Point3D *position, TQ3Vector3D *delta, TQ3Boolean *changed, unsigned long *serialNumber);
trackerObject- A tracker object.
position- On exit, the current position of the specified tracker.
delta- On exit, the change in position since the last call to
Q3Tracker_GetPosition.changed- On exit, a Boolean value that indicates whether the
positionordeltaparameter was changed (kQ3True) or not (kQ3False).serialNumber- On entry, a tracker serial number, or
NULL. On output, the current tracker serial number.DESCRIPTION
TheQ3Tracker_GetPositionfunction returns, in thepositionparameter, the current position of the tracker specified by thetrackerObjectparameter. In addition, it can return, in thedeltaparameter, the relative change in position since the previous call toQ3Tracker_GetPosition.On entry, if the value of
deltaisNULL, the relative contribution is combined into the reported position. If the value ofdeltais notNULL, thendeltais set to the relative motion that has been accumulated since the previous call toQ3Tracker_GetPosition. In either case, the position accumulator is set to (0, 0, 0) by this function.If the value of the
serialNumberparameter isNULL,Q3Tracker_GetPositionfills in thepositionanddeltaparameters and returns the valuekQ3Truein thechangedparameter. Otherwise, the value specified in theserialNumberparameter is compared with the tracker's current serial number. If the two serial numbers are identical,Q3Tracker_GetPositionleaves the two coordinate parameters and theserialNumberparameter unchanged and returns the valuekQ3Falsein thechangedparameter. If the two serial number differ,Q3Tracker_GetPositionfills in the two coordinate parameters, updates theserialNumberparameter, and returns the valuekQ3Truein thechangedparameter.If the specified tracker is inactive, then the
positionparameter is set to the point (0, 0, 0), thedeltaparameter is set to (0, 0, 0) if it is non-NULL, and thechangedparameter is set tokQ3Falseif it is non-NULL.