Dela via


SpatialStationaryFrameOfReference Class

Definition

Represents a frame of reference that remains stationary relative to the user's surroundings at a point in time.

public ref class SpatialStationaryFrameOfReference 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 SpatialStationaryFrameOfReference 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 SpatialStationaryFrameOfReference
Public NotInheritable Class SpatialStationaryFrameOfReference
Inheritance
Object Platform::Object IInspectable SpatialStationaryFrameOfReference
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 SpatialStationaryFrameOfReference class represents a frame of reference that remains stationary relative to the user's surroundings as the user moves around. This frame of reference prioritizes keeping coordinates stable near the device. One key use of a SpatialStationaryFrameOfReference is to act as the underlying world coordinate system within a rendering engine when rendering seated-scale or world-scale experiences.

Holograms rendered at a coordinate in this frame stay generally in place as the user moves the device around. However, as the user walks around a large area and the device adjusts its understanding of their surroundings, these holograms may drift relative to the world. To avoid this drift and strongly anchor content to a point in the user's surroundings, create a SpatialAnchor. The system will then adjust the position of that SpatialAnchor relative to this and other frames of reference as required to keep that anchor precisely in place in the world.

To get a SpatialStationaryFrameOfReference, use the SpatialLocator class and call CreateStationaryFrameOfReferenceAtCurrentLocation.

To build a standing-scale or room-scale experience based on the floor plane or movement boundary defined by the user, an app can use the SpatialStageFrameOfReference class instead.

Properties

CoordinateSystem

Gets a stationary coordinate system with an origin at the position and orientation of the device at the time this frame was created.

Applies to