[][src]Struct sdfu::util::TetrahedralEstimator

pub struct TetrahedralEstimator<T, V> {
    pub eps: T,
    // some fields omitted
}

Estimates the normal of an SDF by estimating the gradient of the SDF.

The gradient is estimated by taking four samples of the SDF in a tetrahedron around the point of interest. By doing so, it only needs to take four instead of 6 samples of the SDF, like the CentralDifferenceEstimator does, so it is slightly faster. However, it only works for 3d SDFs and it is slightly less robust than the traditional way.

See this article for more.

Fields

eps: T

Implementations

impl<T, V: Vec<T>> TetrahedralEstimator<T, V>[src]

pub fn new(eps: T) -> Self[src]

Creates a TetrahedralEstimator with a given epsilon value.

Trait Implementations

impl<V: Vec<f32>> Default for TetrahedralEstimator<f32, V>[src]

impl<V: Vec<f64>> Default for TetrahedralEstimator<f64, V>[src]

impl<T, V> NormalEstimator<T, V> for TetrahedralEstimator<T, V> where
    T: Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + One + Copy + Display,
    V: Vec3<T>, 
[src]

Auto Trait Implementations

impl<T, V> RefUnwindSafe for TetrahedralEstimator<T, V> where
    T: RefUnwindSafe,
    V: RefUnwindSafe

impl<T, V> Send for TetrahedralEstimator<T, V> where
    T: Send,
    V: Send

impl<T, V> Sync for TetrahedralEstimator<T, V> where
    T: Sync,
    V: Sync

impl<T, V> Unpin for TetrahedralEstimator<T, V> where
    T: Unpin,
    V: Unpin

impl<T, V> UnwindSafe for TetrahedralEstimator<T, V> where
    T: UnwindSafe,
    V: UnwindSafe

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.