pub fn log_depth_image(
rec: &RecordingStream,
cam: &Camera,
use_multi_threading: bool,
) -> Result<(), SimulationError>
Expand description
Log depth image data to the rerun recording stream
When the depth value is f32::INFINITY
, the pixel is considered invalid and logged as black
When the resolution is larger than 32x24, multi-threading can accelerate the rendering
§Arguments
rec
- The rerun::RecordingStream instancecam
- The Camera instanceuse_multi_threading
- Whether to use multithreading to log the depth image
§Errors
- If the data cannot be logged to the recording stream
§Example
use peng_quad::{log_depth_image, Camera};
let rec = rerun::RecordingStreamBuilder::new("peng").spawn().unwrap();
let camera = Camera::new((640, 480), 0.1, 100.0, 60.0);
let use_multi_threading = false;
log_depth_image(&rec, &camera, use_multi_threading).unwrap();
let use_multi_threading = true;
log_depth_image(&rec, &camera, use_multi_threading).unwrap();