Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 2.71 KB

File metadata and controls

26 lines (22 loc) · 2.71 KB

README

Overview

The SpectatorViewPoseProvider application runs on the spectator view HoloLens to provide pose data and spatial mapping information to the spectator view compositor.

Lifecycle

  • The application launches and observes spatial mapping data for 10 seconds against a SpatialCoordinateSystem relative to its startup location.
  • The application listens on a known port for a connected client (the Unity compositor).
  • Once a connection has been established, the application will send the connected compositor its pose information relative to its current coordinate system.
  • The application will also start listening on the socket for information from the compositor about the anchor in the shared experience.
  • Once the application receives anchor information, it creates a StreamSocket to connect to the HoloLens device that is sharing its anchor.
  • When an anchor is downloaded over this socket, the application imports the anchor, and sends poses relative to this coordinate system if it can be located.
  • If a new anchor is located, old spatial mapping surfaces will be discarded and new ones will be found relative to the new anchor's coordinate system.
  • The application also listens for messages that it should send spatial mapping information to the compositor. When this happens, the spatial mapping surface observer will activate for another 10 seconds and send mesh information relative to the anchor.
  • If the compositor disconnects, the application will start listening for a new compositor.

Anchor

This application imports anchors over a StreamSocket on a known port to match the way anchors are created and shared in the Mixed Reality 250 Academy course.

If your shared experience does sharing differently, you will need to modify the ConnectToServer function in AnchorImporter.cpp or the ConnectToAnchorOwner function in SpectatorViewPoseProviderMain.cpp to localize in your way.

Additional Documentation