Share via


SpatialStageFrameOfReference Class

Definition

Represents a spatial stage, defined by the user to establish the physical space in which they intend to use a Mixed Reality headset.

public ref class SpatialStageFrameOfReference sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class SpatialStageFrameOfReference final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class SpatialStageFrameOfReference
Public NotInheritable Class SpatialStageFrameOfReference
Inheritance
Object Platform::Object IInspectable SpatialStageFrameOfReference
Attributes

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

A spatial stage consists minimally of a floor-level coordinate system whose origin is chosen by the user, representing the logical center of the area in which they intend to use their Mixed Reality headset. This floor-level coordinate system enables apps to present standing-scale experiences.

Optionally, the user may also define a movement boundary, representing the open area in which they intend to walk while using the headset. This movement boundary enables apps to present room-scale experiences.

If the user has not defined a spatial stage, an app may call the RequestNewStageAsync method to guide the user through system UI that will allow them to define one.

On HoloLens, an app may also build standing-scale or room-scale experiences using spatial mapping. Spatial mapping enables the developer to analyze the user's surroundings and determine the locations of the user's walls and floors using the SpatialSurfaceObserver type, even if the user has not defined a stage manually. Inspect the SpatialSurfaceObserver.IsSupported property to determine if the current device supports spatial mapping.

Coordinate systems returned by the stage are right-handed, with +y up, +x to the right, and -z forward.

Properties

CoordinateSystem

Gets a floor-level coordinate system located at the stage origin defined by the user.

Current

Gets the current spatial stage, if one has been defined by the user.

LookDirectionRange

Gets the extent to which the user can look around with their headset.

MovementRange

Gets the extent to which the user can move while wearing their headset.

Methods

GetCoordinateSystemAtCurrentLocation(SpatialLocator)

Gets a floor-level coordinate system at the user's current position and orientation.

RequestNewStageAsync()

Shows system UI to guide the user in defining a new stage to replace the current stage.

TryGetMovementBounds(SpatialCoordinateSystem)

Gets the boundary vertices of the open area defined by the user where they intend to move while using their headset.

Events

CurrentChanged

Occurs when the user changes or redefines the current spatial stage.

Applies to

See also