Class GazeProvider
This class provides Gaze as an Input Source so users can interact with objects using their head.
Implements
IEventSystemHandler
Assembly: cs.temp.dll.dll
public class GazeProvider : InputSystemGlobalHandlerListener, IMixedRealityEyeGazeProvider, IMixedRealityGazeProvider, IMixedRealityInputHandler, IMixedRealityBaseInputHandler, IEventSystemHandler
Properties
Declaration
public bool Enabled { get; set; }
Property Value
Get the GameObject reference for this Gaze Provider.
Declaration
public GameObject GameObjectReference { get; }
Property Value
Type |
Description |
GameObject |
|
The Gaze Cursor for the provider.
Declaration
public IMixedRealityCursor GazeCursor { get; }
Property Value
The prefab to be instantiated as the gaze cursor.
Declaration
public GameObject GazeCursorPrefab { set; }
Property Value
Type |
Description |
GameObject |
|
Declaration
public Vector3 GazeDirection { get; }
Property Value
The Gaze Input Source for the provider.
Declaration
public IMixedRealityInputSource GazeInputSource { get; }
Property Value
Declaration
public Vector3 GazeOrigin { get; }
Property Value
The Gaze Pointer for the provider.
Declaration
public IMixedRealityPointer GazePointer { get; }
Property Value
The game object that is currently being gazed at, if any.
Declaration
public GameObject GazeTarget { get; }
Property Value
Type |
Description |
GameObject |
|
The current head movement direction.
Declaration
public Vector3 HeadMovementDirection { get; }
Property Value
The current head velocity.
Declaration
public Vector3 HeadVelocity { get; }
Property Value
HitInfo property gives access to information at the object being gazed at, if any.
Declaration
public MixedRealityRaycastHit HitInfo { get; }
Property Value
Normal of the point at which the gaze manager hit an object.
If no object is currently being hit, this will return the previous normal.
Declaration
public Vector3 HitNormal { get; }
Property Value
Position at which the gaze manager hit an object.
If no object is currently being hit, this will use the last hit distance.
Declaration
public Vector3 HitPosition { get; }
Property Value
Boolean to check whether the user went through the eye tracking calibration.
Initially the parameter will return null until it has received valid information from the eye tracking system.
Declaration
public bool? IsEyeCalibrationValid { get; }
Property Value
Whether eye gaze is valid. It may be invalid due to timeout or lack of tracking hardware or permissions.
Declaration
public bool IsEyeGazeValid { get; }
Property Value
DateTime in UTC when the signal was last updated.
Declaration
public DateTime Timestamp { get; }
Property Value
If true, eye-based tracking will be used when available.
Declaration
public bool UseEyeTracking { get; set; }
Property Value
Methods
Declaration
protected override void OnDisable()
Overrides
Declaration
protected override void OnEnable()
Overrides
Declaration
public void OnInputDown(InputEventData eventData)
Parameters
Declaration
public void OnInputUp(InputEventData eventData)
Parameters
Declaration
protected override void RegisterHandlers()
Overrides
Declaration
public void SetGazeCursor(GameObject cursor)
Parameters
Type |
Name |
Description |
GameObject |
cursor |
|
Declaration
protected override void Start()
Overrides
Declaration
protected override void UnregisterHandlers()
Overrides
Declaration
public void UpdateEyeGaze(IMixedRealityEyeGazeDataProvider provider, Ray eyeRay, DateTime timestamp)
Parameters
Declaration
public void UpdateEyeTrackingStatus(IMixedRealityEyeGazeDataProvider provider, bool userIsEyeCalibrated)
Parameters
Notifies this gaze provider of its new hit details.
Declaration
public void UpdateGazeInfoFromHit(MixedRealityRaycastHit raycastHit)
Parameters
Implements
IEventSystemHandler