internal GazeData(GazeDataEventArgs originalGaze) { TimeStamp = originalGaze.SystemTimeStamp; Left = new GazeDataEye(originalGaze.LeftEye); Right = new GazeDataEye(originalGaze.RightEye); OriginalGaze = originalGaze; }
internal VRGazeData(HMDGazeDataEventArgs originalGaze, EyeTrackerOriginPose pose) { Pose = pose; var eyeTrackerOrigin = VRUtility.TemporaryTransformWithAppliedPose(pose); Left = new GazeDataEye(originalGaze.LeftEye, eyeTrackerOrigin); Right = new GazeDataEye(originalGaze.RightEye, eyeTrackerOrigin); var combinedDirection = ((Left.GazeDirection + Right.GazeDirection) / 2f).normalized; var combinedOrigin = (Left.GazeOrigin + Right.GazeOrigin) / 2f; CombinedGazeRayWorld = new Ray(eyeTrackerOrigin.TransformPoint(combinedOrigin), eyeTrackerOrigin.TransformDirection(combinedDirection)); CombinedGazeRayWorldValid = Left.GazeRayWorldValid && Right.GazeRayWorldValid; OriginalGaze = originalGaze; }
internal GazeData() { Left = new GazeDataEye(); Right = new GazeDataEye(); }