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 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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TsdfVolume
Auto Trait Implementations§
impl Freeze for TsdfVolume
impl RefUnwindSafe for TsdfVolume
impl Send for TsdfVolume
impl Sync for TsdfVolume
impl Unpin for TsdfVolume
impl UnsafeUnpin for TsdfVolume
impl UnwindSafe for TsdfVolume
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more