pub struct TsdfVolume { /* private fields */ }Expand description
Axis-aligned truncated signed distance volume.
Implementations§
Source§impl TsdfVolume
impl TsdfVolume
Sourcepub fn try_new(
origin: Vec3<f32>,
voxel_size: f32,
dims: [usize; 3],
truncation: f32,
) -> SceneResult<Self>
pub fn try_new( origin: Vec3<f32>, voxel_size: f32, dims: [usize; 3], truncation: f32, ) -> SceneResult<Self>
Creates an empty TSDF volume initialized to truncation distance.
Sourcepub fn integrate_point(&mut self, point: Vec3<f32>, sensor_origin: Vec3<f32>)
pub fn integrate_point(&mut self, point: Vec3<f32>, sensor_origin: Vec3<f32>)
Integrates one metric depth sample at a world-space point.
Updates every voxel whose center lies within the truncation band, using a view-ray signed distance so the field has zero crossings for meshing.
Sourcepub fn integrate_xyz(
&mut self,
xyz: &[f32],
sensor_origin: Vec3<f32>,
) -> SceneResult<()>
pub fn integrate_xyz( &mut self, xyz: &[f32], sensor_origin: Vec3<f32>, ) -> SceneResult<()>
Integrates every XYZ triple from interleaved storage.
Sourcepub fn integrate_cloud(
&mut self,
cloud: &PointCloud,
sensor_origin: Vec3<f32>,
) -> SceneResult<usize>
pub fn integrate_cloud( &mut self, cloud: &PointCloud, sensor_origin: Vec3<f32>, ) -> SceneResult<usize>
Integrates XYZ columns directly from a point cloud without interleaving or allocating a temporary coordinate vector.
Returns the number of point samples visited. Invalid metric samples are
ignored by TsdfVolume::integrate_point with the same semantics as
TsdfVolume::integrate_xyz.
Sourcepub fn integrate_cloud_with_pose(
&mut self,
cloud: &PointCloud,
volume_t_sensor: Isometry3<f32>,
sensor_origin: Vec3<f32>,
) -> SceneResult<usize>
pub fn integrate_cloud_with_pose( &mut self, cloud: &PointCloud, volume_t_sensor: Isometry3<f32>, sensor_origin: Vec3<f32>, ) -> SceneResult<usize>
Integrates a point cloud after an explicit sensor-to-volume pose.
Both positions and the supplied sensor origin are transformed by
volume_t_sensor; no transformed point-cloud allocation is created.
Sourcepub fn extract_mesh(&self, min_weight: f32) -> TriangleMesh
pub fn extract_mesh(&self, min_weight: f32) -> TriangleMesh
Extracts the zero isolevel surface with marching tetrahedra.
Voxels with weight < min_weight are treated as free space (+truncation).
Trait Implementations§
Source§impl Clone for TsdfVolume
impl Clone for TsdfVolume
Source§fn clone(&self) -> TsdfVolume
fn clone(&self) -> TsdfVolume
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TsdfVolume
impl Debug for TsdfVolume
Source§impl PartialEq for TsdfVolume
impl PartialEq for TsdfVolume
Source§fn eq(&self, other: &TsdfVolume) -> bool
fn eq(&self, other: &TsdfVolume) -> bool
self and other values to be equal, and is used by ==.