diff --git a/src/point_cloud/gpu_point_cloud_converter.rs b/src/point_cloud/gpu_point_cloud_converter.rs index 2d56e948ff..bf25250646 100644 --- a/src/point_cloud/gpu_point_cloud_converter.rs +++ b/src/point_cloud/gpu_point_cloud_converter.rs @@ -325,7 +325,7 @@ impl GpuPointCloudConverter { /// Set the XY table that will be used by future calls to Convert(). Get an XY table by calling /// GenerateXyTable(). - pub fn set_active_xy_table(&mut self, xy_table: &k4a_sys_wrapper::Image) -> Result<()> { + pub fn set_active_xy_table(&mut self, xy_table: &ImageProxy) -> Result<()> { let width = xy_table.get_width_pixels() as i32; let height = xy_table.get_height_pixels() as i32; diff --git a/src/point_cloud/point_cloud_renderer.rs b/src/point_cloud/point_cloud_renderer.rs index 73e8ceb199..2322a8fe19 100644 --- a/src/point_cloud/point_cloud_renderer.rs +++ b/src/point_cloud/point_cloud_renderer.rs @@ -17,7 +17,6 @@ use gl::types::*; use gl; use gui::mouse_camera_arcball::MouseCameraArcball; -use kinect::k4a_sys_wrapper; use opengl::compile_shader::compile_shader; use opengl::opengl_wrapper::Texture; use opengl::opengl_wrapper::{Buffer, gl_get_error, OpenGlError, VertexArray}; diff --git a/src/point_cloud/point_cloud_visualiser.rs b/src/point_cloud/point_cloud_visualiser.rs index fbe149dcf3..fb12bb5717 100644 --- a/src/point_cloud/point_cloud_visualiser.rs +++ b/src/point_cloud/point_cloud_visualiser.rs @@ -126,8 +126,8 @@ pub struct PointCloudVisualizer { /// Format is XYZA, where A (the alpha channel) is unused. pub xyz_textures: Vec, - color_xy_tables: Vec, - depth_xy_tables: Vec, + color_xy_tables: Vec, + depth_xy_tables: Vec, /// Near and far minima/maxima for the current depth sensor mode. depth_value_range: ValueRange, @@ -205,8 +205,8 @@ impl PointCloudVisualizer { k4a_sys::k4a_calibration_type_t_K4A_CALIBRATION_TYPE_DEPTH, ).unwrap(); - color_xy_tables.push(color_xy_table); - depth_xy_tables.push(depth_xy_table); + color_xy_tables.push(ImageProxy::consume_k4a_image(color_xy_table)); + depth_xy_tables.push(ImageProxy::consume_k4a_image(depth_xy_table)); } let mut debug_static_color_frames = Vec::new(); @@ -524,7 +524,8 @@ impl PointCloudVisualizer { } for point_cloud_converter in self.point_cloud_converters.iter_mut() { - point_cloud_converter.set_active_xy_table(&self.depth_xy_tables.get(camera_index).unwrap())?; // TODO: TEMP MULTI-CAMERA SUPPORT + let xy_table = self.depth_xy_tables.get(camera_index).unwrap(); + point_cloud_converter.set_active_xy_table(&xy_table)?; } }