We have had enough talk about the ideas and principles behind spatial mapping. It is time to put this to practice.
Let us start the way we always start. Start Visual Studio and create a new Universal / Holographic C# app with SharpDX as our library. You know the drill by now. Set the target as x86
if it is not already, and deploy this first version of the emulator or the device. This will be our starting point.
I have called my app SpatialDemo
.
Spatial surface detection is done by the depth sensor in cooperation with the HPU. This means we have to access these. Now, accessing a processing unit is not a problem in UWP apps, but accessing sensors is. You cannot simply get data from the microphone, the webcam, and other sensors in UWP apps. The apps are running as a sandbox, meaning you cannot do much more than render on a screen and get input from a keyboard, mouse, and in our case, gestures. That is all. As we have seen in the chapters...