Modifier

Partager via


GazeHandHelper Class

Definition

Caution

This component is no longer supported

This class must be instantiated by a script that implements the IMixedRealitySourceStateHandler, IMixedRealityInputHandler and IMixedRealityInputHandler<T>.

It must receive EventData arguments from OnInputDown(), OnInputUp(), OnInputChanged() and OnSourceLost().

This class manages the states of input necessary to calculate a proper grab position The eventData received on inputdown has the point on the target that was hit by the gaze; the mixedrealitypose - eventdata received on input changed contains the handposition in eventdata.inputdata.position It also contains useful retrieval functions.

public ref class GazeHandHelper
[System.Obsolete("This component is no longer supported", true)]
public class GazeHandHelper
[<System.Obsolete("This component is no longer supported", true)>]
type GazeHandHelper = class
Public Class GazeHandHelper
Inheritance
GazeHandHelper
Attributes

Constructors

GazeHandHelper()

Methods

AddSource(InputEventData)

This function must be called from the OnInputDown handler in a script implementing the IMixedRealityInputHandler<T>.

GetActiveHandCount()

This function returns the number of active hands.

GetAllHandPositions()

This function gets an array of all active hand positions

GetFirstHand()

This function retrieves the position of the first active hand.

GetHandPositionsDictionary()

This function retrieves a reference to the Dictionary that maps hand positions to sourceIds. This return value is NOT filtered for whether the hands are active. User should check first using GetActiveHandCount().

GetHandsCentroid()

This function gets the average of the positions of all active hands.

RemoveSource(InputEventData)

This function must be called from the OnInputUp handler in a script implementing the IMixedRealityInputHandler<T>.

RemoveSource(SourceStateEventData)

This function must be called from the OnSourceLost handler in a script implementing the IMixedRealitySourceStateHandler interface.

TryGetHandPosition(Handedness, Vector3)

TryGet style function to return HandPosition of a certain handedness if available.

TryGetHandPosition(UInt32, Vector3)

TryGet style function to return HandPosition of a certain sourceId if available.

TryGetHandsCentroid(Vector3)

TryGet style function to get the average of all active hand positions.

UpdateSource(InputEventData<MixedRealityPose>)

This function must be called from the OnInputChanged handler in a script implementing the IMixedRealityInputHandler<T>.

Applies to