Coordinate System Synchronization with Holographic Remoting and the OpenXR API

With the OpenXR API, the user coordinate system is wrapped into a reference space of type XR_REMOTING_REFERENCE_SPACE_TYPE_USER_MSFT.

Tip

A simple example can be found in the remote and player samples inside the Holographic Remoting samples github repository. Uncomment #define ENABLE_USER_COORDINATE_SYSTEM_SAMPLE inside the OpenXrProgramm.cpp and SamplePlayerMain.h files to enable the sample code.

Important

To learn about the Holographic Remoting OpenXR extension API, check out the specification which can be found in the Holographic Remoting samples github repository.

Set and Update the User Coordinate System in the Player App

Holographic Remoting currently only supports writing a custom player with the Windows Mixed Reality API. A player written with the Windows Mixed Reality API can be used with a OpenXR remote! Therefore, you have to set the User Coordinate System from the Windows Mixed Reality player. For more information, see Coordinate System Synchronization with Holographic Remoting and the Windows Mixed Reality API.

Get the User Coordinate System in the Remote App

To create the user coordinate system in the remote app call xrCreateReferenceSpace with the XR_REMOTING_REFERENCE_SPACE_TYPE_USER_MSFT argument:

xr::SpaceHandle space;
XrReferenceSpaceCreateInfo createInfo{XR_TYPE_REFERENCE_SPACE_CREATE_INFO};
createInfo.referenceSpaceType = static_cast<XrReferenceSpaceType>(XR_REMOTING_REFERENCE_SPACE_TYPE_USER_MSFT);
createInfo.poseInReferenceSpace = xr::math::Pose::Translation({0.0f, 0.0f, 0.0f});
CHECK_XRCMD(xrCreateReferenceSpace(m_session.Get(), &createInfo, space.Put()));

See Also