private void UpdateFrameViewer(MotionFrame frame)
{
if (pointCloudFrameViewer != null)
{
currentConfiguration = new DeviceConfiguration()
{
DepthBufferFormat = new BufferFormat(frame.DepthFrame.Width, frame.DepthFrame.Height, frame.DepthFrame.PixelFormat),
VideoBufferFormat = new BufferFormat(frame.RGBFrame.Width, frame.RGBFrame.Height, frame.RGBFrame.PixelFormat),
};
pointCloudFrameViewer.UpdateMotionFrame(currentConfiguration, frame);
}
}