Ejemplo n.º 1
0
 internal GazeData(GazeDataEventArgs originalGaze)
 {
     TimeStamp    = originalGaze.SystemTimeStamp;
     Left         = new GazeDataEye(originalGaze.LeftEye);
     Right        = new GazeDataEye(originalGaze.RightEye);
     OriginalGaze = originalGaze;
 }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 internal GazeData()
 {
     Left  = new GazeDataEye();
     Right = new GazeDataEye();
 }