SpatialLocatorAttachedFrameOfReference SpatialLocatorAttachedFrameOfReference SpatialLocatorAttachedFrameOfReference SpatialLocatorAttachedFrameOfReference SpatialLocatorAttachedFrameOfReference Class

Definition

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

public : sealed class SpatialLocatorAttachedFrameOfReference
struct winrt::Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference
public sealed class SpatialLocatorAttachedFrameOfReference
Public NotInheritable Class SpatialLocatorAttachedFrameOfReference
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

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

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 RelativeOrientation RelativeOrientation RelativeOrientation RelativeOrientation

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

RelativePosition RelativePosition RelativePosition RelativePosition RelativePosition

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

Methods

AdjustHeading(Double) AdjustHeading(Double) AdjustHeading(Double) AdjustHeading(Double) AdjustHeading(Double)

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

GetStationaryCoordinateSystemAtTimestamp(PerceptionTimestamp) GetStationaryCoordinateSystemAtTimestamp(PerceptionTimestamp) GetStationaryCoordinateSystemAtTimestamp(PerceptionTimestamp) GetStationaryCoordinateSystemAtTimestamp(PerceptionTimestamp) 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) TryGetRelativeHeadingAtTimestamp(PerceptionTimestamp) TryGetRelativeHeadingAtTimestamp(PerceptionTimestamp) TryGetRelativeHeadingAtTimestamp(PerceptionTimestamp) TryGetRelativeHeadingAtTimestamp(PerceptionTimestamp)

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

See also