How to access 'WindowsPreview' namespace?

落爺英雄遲暮 提交于 2019-12-13 10:08:47

问题


I am trying to work with a kinect 2 in c++. All the code samples I have seen use the WindowsPreview namespace but I don't seem to have access to it. I have the SDK (code samples run fine). I have correctly linked to the Kinect.h and kinect20.lib files. Can someone help me out?


回答1:


WindowsPreview::Kinect is the namespace when using the Kinect API for the Windows Store, the other APIs use Microsoft::Kinect.

Found a mention of the namespaces in one of the videos: Kinect Data Sources and Programming Model (starts at 20:00)

Rob: In the store APIs, the namespace is WindowsPreview.Kinect?
Jesse: (Yes)
Rob: Can you talk about the other APIs?
Jesse: In the other APIs, the namespace is Microsoft.Kinect, the WindowsPreview namespace is indicating that we are previewing the WinRT APIs for further inclusion in some form of Windows down the road.

It appears to be listed as WindowsPreview.Kinect in the documentation but in my code (not targetting the Windows store) it shows up as Microsoft.Kinect:

In my opinion, this is something that could be more clearly documented, but it is possible I'm just not looking in the right places.

来源:https://stackoverflow.com/questions/31032467/how-to-access-windowspreview-namespace

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!