[][src]Struct isosurface::LinearHashedMarchingCubes

pub struct LinearHashedMarchingCubes { /* fields omitted */ }

Convert isosurfaces to meshes using marching cubes over a linear hashed octree.

This is a loose implementation of the paper Fast Generation of Pointerless Octree Duals.

Pros:

  • Faster than standard marching cubes.
  • Accurately reproduces grid-aligned sharp edges in the underlying isosurface.

Cons:

  • Still can't accurately reproduce sharp edges which are not grid-aligned.

Implementations

impl LinearHashedMarchingCubes[src]

pub fn new(max_depth: usize) -> Self[src]

Create a new LinearHashedMarchingCubes.

The depth of the internal octree will be at most max_depth, causing the tree to span the equivalent of a cubic grid at most 2.pow(max_depth) in either direction. Distances will be evaluated in Euclidean space.

pub fn extract<S, E>(&mut self, source: &S, extractor: &mut E) where
    S: Sample<Signed> + ScalarSource,
    E: Extractor
[src]

Extracts a mesh from the given Sample.

The Source will be sampled in the range (0,0,0) to (1,1,1), with the number of steps determined by the size provided to the constructor.

The resulting vertex and face data will be returned via the provided Extractor.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.