浏览代码

merged files

/4.0
Alexandra Serralta 5 年前
当前提交
f2a69bb9
共有 5 个文件被更改,包括 6 次插入7 次删除
  1. 2
      Assets/Scripts/CpuImageSample.cs
  2. 3
      Assets/Scripts/EyePoseVisualizer.cs
  3. 2
      Assets/Scripts/EyeTrackingUI.cs
  4. 3
      Assets/Scripts/FixationPoint2DVisualizer.cs
  5. 3
      Assets/Scripts/FixationPoint3DVisualizer.cs

2
Assets/Scripts/CpuImageSample.cs


/// This is done as an example; do not use this technique simply
/// to render the camera image on screen.
/// </summary>
public class TestCameraImage : MonoBehaviour
public class CpuImageSample : MonoBehaviour
{
[SerializeField]
[Tooltip("The ARCameraManager which will produce frame events.")]

3
Assets/Scripts/EyePoseVisualizer.cs


}
}
if (faceManager != null && faceManager.subsystem != null && faceManager.subsystem.SubsystemDescriptor.supportsEyeTracking)
if (faceManager != null && faceManager.subsystem != null && faceManager.descriptor.supportsEyeTracking)
{
m_FaceSubsystem = (XRFaceSubsystem)faceManager.subsystem;
SetVisible((m_Face.trackingState == TrackingState.Tracking) && (ARSession.state > ARSessionState.Ready));

2
Assets/Scripts/EyeTrackingUI.cs


{
m_Manager = FindObjectOfType<ARFaceManager>();
}
if (m_Manager != null && m_Manager.subsystem != null && m_Manager.subsystem.SubsystemDescriptor.supportsEyeTracking)
if (m_Manager != null && m_Manager.subsystem != null && m_Manager.descriptor.supportsEyeTracking)
{
var infoGO = GetComponent<Text>();
infoGO.text = "This device supports eye tracking.";

3
Assets/Scripts/FixationPoint2DVisualizer.cs


void OnEnable()
{
var faceManager = FindObjectOfType<ARFaceManager>();
if (faceManager != null && faceManager.subsystem != null && faceManager.subsystem.SubsystemDescriptor.supportsEyeTracking)
if (faceManager != null && faceManager.subsystem != null && faceManager.descriptor.supportsEyeTracking)
{
m_FaceSubsystem = (XRFaceSubsystem)faceManager.subsystem;
SetVisible((m_Face.trackingState == TrackingState.Tracking) && (ARSession.state > ARSessionState.Ready));

m_FixationReticleGameObject.GetComponent<RectTransform>().anchoredPosition3D = mainCamera.ViewportToScreenPoint(mirrorFixationInView);
}
}
}
}

3
Assets/Scripts/FixationPoint3DVisualizer.cs


void OnEnable()
{
var faceManager = FindObjectOfType<ARFaceManager>();
if (faceManager != null && faceManager.subsystem != null && faceManager.subsystem.SubsystemDescriptor.supportsEyeTracking)
if (faceManager != null && faceManager.subsystem != null && faceManager.descriptor.supportsEyeTracking)
{
m_FaceSubsystem = (XRFaceSubsystem)faceManager.subsystem;
m_Face.updated += OnUpdated;

m_FixationRayGameObject.transform.LookAt(m_Face.fixationPoint.position);
}
}
}
}
正在加载...
取消
保存