Platform::Array<CameraSpacePoint> to byte data RRS feed

  • Question

  • 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?


    • Edited by NajeebT Saturday, August 30, 2014 4:35 PM
    Saturday, August 30, 2014 4:34 PM

All replies

  • 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"

    Carmine Sirignano - MSFT

    Tuesday, September 2, 2014 6:42 PM