How to get access to the Holographic Space from a 2D windows universal app?

时间:2016-07-11 19:18:54

标签: uwp msdn hololens

I have a windows universal app I would like to place in a HolographicSpace such that I can have the 2D View but I can also interact with 3d models at the same time which will be coming alive from my 2D view. I would like to know which is the best way to do so ? I saw the Holograms application in the hololens example apps but I don't know how do you load the 2D view and call the 3D widgets as models from the 2D View.

2 个答案:

答案 0 :(得分:2)

Your application cannot mix 2D and 3D mode at the same time.

You can have a 2D window in the shell Holographic Space but when you want to see a 3D model, you need to switch your app in 3D mode which takes over the entire Holographic space. from there, you could switch back to 2D mode.

It's a bit unclear on how to achieve this as it's not really well documented, but I recommend you start on the hololens documentation pages and go from there.

答案 1 :(得分:0)

如上所述,混合是不可能的。但是您可以在应用程序中创建一个具有调度程序的新核心窗口。有了它你可以切换到它。新窗口应该与microsoft提供的holographicapp类似。

这就是我切换回2D应用程序的方式:

this.Dispatcher.TryRunIdleAsync(async p =>
        {
            //Switch to the other window
            await Windows.UI.ViewManagement.ApplicationViewSwitcher.SwitchAsync(parentWindowId);
        });

我希望我能帮助你了解它是如何运作的。但就像上面已经说过的那样,文档是一个很好的开始。