SpatialInteractionSourceLocation Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the grip pose and pointer pose of a hand or motion controller.
public ref class SpatialInteractionSourceLocation 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 SpatialInteractionSourceLocation 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 SpatialInteractionSourceLocation
Public NotInheritable Class SpatialInteractionSourceLocation
- Inheritance
- 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
Windows Mixed Reality supports motion controllers in a variety of form factors, with each controller's design differing in its relationship between the user's hand position and the natural "forward" direction that apps should use for pointing when rendering the controller.
To better represent these controllers, there are two kinds of poses you can investigate for each interaction source.
The grip pose represents the location of either the palm of a hand detected by a HoloLens, or the palm holding a motion controller. On immersive headsets, this pose is best used to render the user's hand or an object held in the user's hand, such as a sword or gun. The grip pose is represented by the position, orientation and velocity properties directly within this type.
The pointer pose represents the tip of a motion controller pointing forward. This pose is best used to raycast when pointing at UI when you are rendering the controller model itself. The pointer pose can be accessed through the SourcePointerPose property.
Version history
Windows version | SDK version | Value added |
---|---|---|
1607 | 14393 | Orientation |
1709 | 16299 | AngularVelocity |
1709 | 16299 | PositionAccuracy |
1709 | 16299 | SourcePointerPose |
Properties
AngularVelocity |
Gets the angular velocity of a hand or motion controller. |
Orientation |
Gets the grip pose orientation, representing the orientation of the user's hand as it holds a motion controller. |
Position |
Gets the grip pose position, representing the position of the user's hand, either directly or where it holds a motion controller. |
PositionAccuracy |
Gets the accuracy of an interaction source's positional tracking. |
SourcePointerPose |
Gets the pointer pose for a particular spatial interaction source, such as a motion controller, at a given timestamp. |
Velocity |
Gets the velocity of a hand or motion controller. |