Dela via


SpatialInteractionSource Class

Definition

Represents one detected instance of a hand, motion controller, or speech source that can cause interactions and gestures.

public ref class SpatialInteractionSource sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 131072)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class SpatialInteractionSource final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 131072)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class SpatialInteractionSource
Public NotInheritable Class SpatialInteractionSource
Inheritance
Object Platform::Object IInspectable SpatialInteractionSource
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v2.0)

Remarks

For hands and controllers, each detected hand or motion controller will get its own ID. For as long as the system can track that a hand is the same hand that was previously detected, it will share an ID.

For speech, a single ID will be used for all speech input.

Version history

Windows version SDK version Value added
1703 15063 Controller
1703 15063 IsGraspSupported
1703 15063 IsMenuSupported
1703 15063 IsPointingSupported
1703 15063 TryGetStateAtTimestamp
1709 16299 Handedness
1903 18362 TryCreateHandMeshObserver
1903 18362 TryCreateHandMeshObserverAsync

Properties

Controller

Represents the specifics of a detected motion controller.

Handedness

Gets whether the interaction source represents the user's left hand or right hand.

Id

Gets the identifier for the hand, motion controller, or speech source.

IsGraspSupported

Gets whether the source supports grasps.

IsMenuSupported

Gets whether the source supports Menu presses.

IsPointingSupported

Gets whether the source can provide pointer poses.

Kind

Gets the interaction source type.

Methods

TryCreateHandMeshObserver()

Synchronously requests a HandMeshObserver to provide mesh updates for each frame that tracks the detected shape of a hand.

TryCreateHandMeshObserverAsync()

Requests a HandMeshObserver to provide mesh updates for each frame that tracks the detected shape of a hand.

TryGetStateAtTimestamp(PerceptionTimestamp)

Get the state of this source as of the specified timestamp.

Applies to

See also