GazeData.cs 1.03 KB
Newer Older
1 2 3 4 5 6
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

7
namespace TrackerBridge
8
{
9
    public struct GazeData
10 11 12 13 14 15
    {
        public readonly float leftX;
        public readonly float leftY;
        public readonly float rightX;
        public readonly float rightY;

16 17 18 19
        public readonly long trackerTimeStamp;
        public readonly long systemTimeStamp;

        public GazeData(float leftX, float leftY, float rightX, float rightY, long trackerTimeStamp, long systemTimeStamp)
20 21 22 23 24
        {
            this.leftX = leftX;
            this.leftY = leftY;
            this.rightX = rightX;
            this.rightY = rightY;
25 26 27
            this.trackerTimeStamp = trackerTimeStamp;
            this.systemTimeStamp = systemTimeStamp;
        }   
28 29 30

        public override string ToString()
        {
31 32
            FormattableString message = $"{leftX};{leftY};{rightX};{rightY};{trackerTimeStamp};{systemTimeStamp}";
            return FormattableString.Invariant(message);
33 34 35
        }
    }
}