Using the spatial anchors in DirectX

It is time to look at what this is and how it all works. We will, as we have always done, start with a new application, based on the template Universal DirectX Holographic app in C#.

Before we begin our coding, let me remind you that spatial anchors depend on the information the depth sensors give us. Therefore, we need to set the right capabilities in our app. If you do not do this, the whole thing simply will not work. So, open the Package.appxmanifest file and add the correct capabilities. Just as a reminder, we do so by adding the correct namespace to the Package element:

 <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" ...

Get Microsoft HoloLens Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.