SpatialLocatorAttachedFrameOfReference Class

Definition

Represents a frame of reference that is positionally attached to the device.

C#
[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 SpatialLocatorAttachedFrameOfReference
Inheritance
Object SpatialLocatorAttachedFrameOfReference
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

The SpatialLocatorAttachedFrameOfReference class represents a device-relative frame of reference that tracks changes in the position reported by the device's SpatialLocator. This frame has a fixed heading relative to the user's surroundings that points in the direction the user was facing when the frame was created. From then on, all orientations in this frame of reference are relative to that fixed heading, even as the user rotates the device.

For a headset such as HoloLens, the origin of this frame's coordinate system is located at the center of rotation of the user's head, so that its position is not affected by head rotation.

To get a SpatialLocatorAttachedFrameOfReference, use the SpatialLocator class and call CreateAttachedFrameOfReferenceAtCurrentHeading.

Properties

RelativeOrientation

Gets or sets the orientation of this frame of reference's origin relative to the direction of the heading.

RelativePosition

Gets or sets the position of this frame of reference's origin relative to the SpatialLocator that it is tracking.

Methods

AdjustHeading(Double)

Adjusts the fixed heading of this frame of reference relative to its current heading.

GetStationaryCoordinateSystemAtTimestamp(PerceptionTimestamp)

Gets a coordinate system whose origin is the position of the device at the specified timestamp, oriented at this frame of reference's fixed heading. This coordinate system stays stationary and does not track any further movement of the device.

TryGetRelativeHeadingAtTimestamp(PerceptionTimestamp)

Computes the device's heading in radians for the specified timestamp, relative to this frame's fixed heading.

Applies to

Product Versions
WinRT Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

See also