Class GazePointerVisibilityStateMachine
Helper class for managing the visibility of the gaze pointer to match windows mixed reality and HoloLens 2 When application starts, gaze pointer is visible. Then when articulate hands / motion controllers appear, hide the gaze cursor. Whenever user says "select", make the gaze cursor appear.
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
public class GazePointerVisibilityStateMachine : IMixedRealitySpeechHandler, IMixedRealityBaseInputHandler, IEventSystemHandler
Remarks
Has different behavior depending on whether or not eye gaze or head gaze in use - see comments on GazePointerState for more details.
Properties
IsGazePointerActive
Whether the state machine is currently in a state where the gaze pointer should be active.
Declaration
public bool IsGazePointerActive { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsGazePointerActive
Whether the state machine is currently in a state where the gaze pointer should be active.
Declaration
public bool IsGazePointerActive { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
OnSpeechKeywordRecognized(SpeechEventData)
Flags user intention to re activate eye or head based gaze cursor
Declaration
public void OnSpeechKeywordRecognized(SpeechEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
SpeechEventData | eventData |
OnSpeechKeywordRecognized(SpeechEventData)
Flags user intention to re activate eye or head based gaze cursor
Declaration
public void OnSpeechKeywordRecognized(SpeechEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
SpeechEventData | eventData |
UpdateState(Int32, Int32, Int32, Boolean)
Updates the state machine based on the number of near pointers, the number of far pointers, and whether or not eye gaze is valid.
Declaration
public void UpdateState(int numNearPointersActive, int numFarPointersActive, int numFarPointersWithoutCursorActive, bool isEyeGazeValid)
Parameters
Type | Name | Description |
---|---|---|
Int32 | numNearPointersActive | |
Int32 | numFarPointersActive | |
Int32 | numFarPointersWithoutCursorActive | |
Boolean | isEyeGazeValid |
UpdateState(Int32, Int32, Int32, Boolean)
Updates the state machine based on the number of near pointers, the number of far pointers, and whether or not eye gaze is valid.
Declaration
public void UpdateState(int numNearPointersActive, int numFarPointersActive, int numFarPointersWithoutCursorActive, bool isEyeGazeValid)
Parameters
Type | Name | Description |
---|---|---|
Int32 | numNearPointersActive | |
Int32 | numFarPointersActive | |
Int32 | numFarPointersWithoutCursorActive | |
Boolean | isEyeGazeValid |