예제 #1
0
        void ReceiveGaze(GazeData gazeData)
        {
            unityTime = timeSync.ConvertToUnityTime(gazeData.PupilTimestamp);

            if (gazeData.MappingContext != GazeData.GazeMappingContext.Binocular)
            {
                isBinocular = false;
            }
            else
            {
                isBinocular = true;
            }

            gazeConfidence = gazeData.Confidence;

            if (gazeData.IsEyeDataAvailable(0))
            {
                gazeNormalLeft = gazeData.GazeNormal0;
            }

            if (gazeData.IsEyeDataAvailable(1))
            {
                gazeNormalRight = gazeData.GazeNormal1;
            }
        }
예제 #2
0
        public double ConvertToUnityTime(double pupilTimestamp)
        {
            if (!IsConnected)
            {
                Debug.LogWarning("Not connected");
                return(0);
            }

            return(timeSync.ConvertToUnityTime(pupilTimestamp));
        }