static string getEyeClosedString(Fove.Eye eye) { var closedEyes = FoveManager.CheckEyesClosed(); var eyeClosed = (eye & closedEyes) != 0; return(eyeClosed.ToString()); }
private void UpdateEyeTexts(Fove.ResearchGaze gaze, Fove.Eye eye) { var isLeft = eye == Fove.Eye.Left; var infoTexts = isLeft ? leftEyeInfoTexts : rightEyeInfoTexts; var eyeData = isLeft ? gaze.eyeDataLeft : gaze.eyeDataRight; // eye closed or open infoTexts.closedText.text = getEyeClosedString(eye); // Eye radiuses infoTexts.eyeText.text = toMilliString(eyeData.eyeballRadius); infoTexts.irisText.text = toMilliString(eyeData.irisRadius); infoTexts.pupilText.text = toMilliString(eyeData.pupilRadius); }
private void UpdateEyeTexts(Fove.Eye eye) { var isLeft = eye == Fove.Eye.Left; var infoTexts = isLeft ? leftEyeInfoTexts : rightEyeInfoTexts; // eye closed or open infoTexts.stateText.text = getEyeStateString(eye); // Eye radius infoTexts.eyeText.text = toMilliString(FoveManager.GetEyeballRadius(eye)); infoTexts.irisText.text = toMilliString(FoveManager.GetIrisRadius(eye)); infoTexts.pupilText.text = toMilliString(FoveManager.GetPupilRadius(eye)); var torsion = FoveManager.GetEyeTorsion(eye); var torsionText = torsion.Failed ? torsion.error.ToString() : torsion.value.ToString("F2"); infoTexts.torsionText.text = torsionText; }
void UpdateEyeShape(Fove.Eye eye) { var shapeResult = FoveManager.GetEyeShape(eye); if (shapeResult.Failed) { Debug.LogWarning("Failed to retrieve eye shape"); return; } var shapes = shapeResult.value; var eyePoints = eye == Fove.Eye.Left ? eyePointsLeft : eyePointsRight; int i = 0; foreach (var point in shapes.Outline) { eyePoints[i++].transform.localPosition = new Vector3(point.x, point.y, 0); } }
static string getEyeStateString(Fove.Eye eye) { var state = FoveManager.GetEyeState(eye).value; return(state.ToString()); }