예제 #1
0
 public static bool TryGetLatestHeadPose(out HeadPose headPose)
 {
     if (Is64BitProcess)
     {
         return(x64.GetLatestHeadPose(out headPose));
     }
     else
     {
         return(x86.GetLatestHeadPose(out headPose));
     }
 }
예제 #2
0
        private void OnHeadPose(Tobii.GameIntegration.Net.HeadPose headPose)
        {
            long eyetrackerCurrentUs = headPose.TimeStampMicroSeconds;             // TODO awaiting new API from tgi

            float timeStampUnityUnscaled = Time.unscaledTime - ((eyetrackerCurrentUs - headPose.TimeStampMicroSeconds) / 1000000f);
            var   rotation = Quaternion.Euler(-headPose.Rotation.Pitch * Mathf.Rad2Deg,
                                              headPose.Rotation.Yaw * Mathf.Rad2Deg,
                                              -headPose.Rotation.Roll * Mathf.Rad2Deg);

            Last = new HeadPose(
                new Vector3(headPose.Position.X, headPose.Position.Y, headPose.Position.Z),
                rotation,
                timeStampUnityUnscaled, headPose.TimeStampMicroSeconds);
        }
예제 #3
0
 internal static extern bool GetLatestHeadPose(out HeadPose headPose);