pub struct Isovolume<const D: usize> { /* private fields */ }Expand description
Encloses {p : f(p) <= 0} within the sampled domain; Self::clipped detects contact with its boundary.
Implementations§
Source§impl<const D: usize> Isovolume<D>
impl<const D: usize> Isovolume<D>
Sourcepub fn extract(
min: [f32; D],
max: [f32; D],
resolution: usize,
sdf: impl Fn([f32; D]) -> f32,
) -> Self
pub fn extract( min: [f32; D], max: [f32; D], resolution: usize, sdf: impl Fn([f32; D]) -> f32, ) -> Self
Requires a 1-Lipschitz signed distance; resolution counts cells along the longest axis.
pub fn piece_count(&self) -> usize
pub fn occupied_cells(&self) -> usize
pub fn cell_size(&self) -> f32
Sourcepub fn enclosure_margin(&self) -> f32
pub fn enclosure_margin(&self) -> f32
Upper bound on how far the cover extends past the true surface.
Sourcepub fn volume(&self) -> f32
pub fn volume(&self) -> f32
Exact volume of the union of the pieces: that union is the marked cell set.
Trait Implementations§
Auto Trait Implementations§
impl<const D: usize> Freeze for Isovolume<D>
impl<const D: usize> RefUnwindSafe for Isovolume<D>
impl<const D: usize> Send for Isovolume<D>
impl<const D: usize> Sync for Isovolume<D>
impl<const D: usize> Unpin for Isovolume<D>
impl<const D: usize> UnsafeUnpin for Isovolume<D>
impl<const D: usize> UnwindSafe for Isovolume<D>
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