pub struct IsosurfaceExtraction {
pub isovalue: f64,
}Expand description
Isosurface extraction via the Marching Cubes algorithm.
Implements the full 256-case lookup table for robust triangle generation at the specified isovalue.
Fields§
§isovalue: f64Isovalue defining the surface (default: 0.0 for signed distance fields).
Implementations§
Source§impl IsosurfaceExtraction
impl IsosurfaceExtraction
Sourcepub fn new(isovalue: f64) -> Self
pub fn new(isovalue: f64) -> Self
Create a new IsosurfaceExtraction with the given isovalue.
§Arguments
isovalue– the scalar value defining the isosurface
Sourcepub fn extract(&self, field: &LevelSetField) -> Vec<McTriangle>
pub fn extract(&self, field: &LevelSetField) -> Vec<McTriangle>
Extract the isosurface from a LevelSetField as a list of triangles.
Iterates over all cells in the grid, classifies each cube, and uses the Marching Cubes lookup table to generate triangles.
Sourcepub fn count_triangles(&self, field: &LevelSetField) -> usize
pub fn count_triangles(&self, field: &LevelSetField) -> usize
Count the number of triangles in the isosurface.
Auto Trait Implementations§
impl Freeze for IsosurfaceExtraction
impl RefUnwindSafe for IsosurfaceExtraction
impl Send for IsosurfaceExtraction
impl Sync for IsosurfaceExtraction
impl Unpin for IsosurfaceExtraction
impl UnsafeUnpin for IsosurfaceExtraction
impl UnwindSafe for IsosurfaceExtraction
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
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.