Exemple #1
0
 /// <summary>
 /// Gets the head pose.
 /// </summary>
 /// <param name="predictionTime">The prediction time.</param>
 /// <returns></returns>
 public Pose GetHeadPose(double predictionTime = 0d)
 {
     #if UNITY_ANDROID && !UNITY_EDITOR
     dpnQuarterion pose     = Composer.DpnuGetPredictedPose(predictionTime);
     dpnVector3    position = Composer.DpnuGetPredictedPosition(predictionTime);
     #else
     dpnQuarterion pose     = Composer.DpnuGetPose();
     dpnVector3    position = Composer.DpnuGetPosition();
     #endif
     return(new Pose
     {
         position = new Vector3(position.x, position.y, position.z),
         orientation = pose.ToQuaternion(),
     });
 }