void ReceiveEyeData(GazeData data)
        {
            if (data.Confidence < confidenceThreshold)
            {
                return;
            }

            if (data.IsEyeDataAvailable(0))
            {
                gazeNormalLeft = data.GazeNormal0;
                eyeCenterLeft  = data.EyeCenter0;
            }

            if (data.IsEyeDataAvailable(1))
            {
                gazeNormalRight = data.GazeNormal1;
                eyeCenterRight  = data.EyeCenter1;
            }
        }
Пример #2
0
    void Receive3dGaze(GazeData gazeData)
    {
        if (gazeData.Confidence < confidenceThreshold)
        {
            return;
        }

        localGazeDirection = gazeData.GazeDirection;

        if (gazeData.IsEyeDataAvailable(0))
        {
            gazeNormalLeft = gazeData.GazeNormal0;
            eyeCenterLeft  = gazeData.EyeCenter0;
        }
        if (gazeData.IsEyeDataAvailable(1))
        {
            gazeNormalRight = gazeData.GazeNormal1;
            eyeCenterRight  = gazeData.EyeCenter1;
        }
    }