Share via


SpatialLocatorAttachedFrameOfReference Class

Definition

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

public ref class SpatialLocatorAttachedFrameOfReference 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 SpatialLocatorAttachedFrameOfReference 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 SpatialLocatorAttachedFrameOfReference
Public NotInheritable Class SpatialLocatorAttachedFrameOfReference
Inheritance
Object Platform::Object IInspectable 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

See also