平台::阵列< CameraSpacePoint>到字节数据 [英] Platform::Array<CameraSpacePoint> to byte data

查看:88
本文介绍了平台::阵列< CameraSpacePoint>到字节数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


在WinRT之外,reinterpret_cast是一块蛋糕< void *>一大块CameraSpacePoints并将它们写入磁盘。


使用WinRT,我无法终身了解如何有效地获取坐标映射器返回的数据,  Platform :: Array< WindowsPreview :: Kinect :: CameraSpacePoint> ^,并将其转换为Platform :: Array< byte> ^,用于写入
Windows :: Storage :: FileIO :: WriteBytesAsync。


正确的方法是什么?



谢谢,

Najeeb




解决方案

你究竟想做什么?使用WinRT和异步模型,您可能无法执行不会优化的操作,尤其是在UI线程上执行此操作时。您可能需要查看api,它将查看文件api以将
数据转储到磁盘。


要获取指向缓​​冲区的指针,请使用Data对象在课堂上。 " somebuffer->数据"


Hi there,

Outside of WinRT it's a piece of cake to reinterpret_cast<void *> a big chunk of CameraSpacePoints and fwrite them to disk.

With WinRT, I can't for the life of me figure out how to efficiently take the data returned by the coordinate mapper,  Platform::Array<WindowsPreview::Kinect::CameraSpacePoint>^, and convert it into a Platform::Array<byte>^ for writing by Windows::Storage::FileIO::WriteBytesAsync.

What's the right way to go about this?

thanks,
Najeeb


解决方案

What exactly are you trying to do? With WinRT and the async model, you may not be doing something that won't be optimized, especially if you are doing it on the UI thread. You may want to look into api's that will take a look at the file api's to dump the data to disk.

To get a pointer to the buffer, use the Data object on the class. "somebuffer->Data"


这篇关于平台::阵列&LT; CameraSpacePoint&GT;到字节数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆