pub struct ImplicitBlend {
pub k: f64,
}Expand description
Smooth union/intersection/subtraction of two implicit SDFs.
Uses polynomial smooth-min for C¹ continuous blending.
Fields§
§k: f64Blend radius for smooth operations.
Implementations§
Source§impl ImplicitBlend
impl ImplicitBlend
Sourcepub fn smooth_union(&self, a: f64, b: f64) -> f64
pub fn smooth_union(&self, a: f64, b: f64) -> f64
Smooth union: min(a, b) with smooth blend.
Sourcepub fn smooth_intersection(&self, a: f64, b: f64) -> f64
pub fn smooth_intersection(&self, a: f64, b: f64) -> f64
Smooth intersection: max(a, b) with smooth blend.
Sourcepub fn smooth_subtraction(&self, a: f64, b: f64) -> f64
pub fn smooth_subtraction(&self, a: f64, b: f64) -> f64
Smooth subtraction: a − b.
Sourcepub fn intersection(a: f64, b: f64) -> f64
pub fn intersection(a: f64, b: f64) -> f64
Hard intersection (standard max).
Sourcepub fn subtraction(a: f64, b: f64) -> f64
pub fn subtraction(a: f64, b: f64) -> f64
Hard subtraction.
Trait Implementations§
Source§impl Clone for ImplicitBlend
impl Clone for ImplicitBlend
Source§fn clone(&self) -> ImplicitBlend
fn clone(&self) -> ImplicitBlend
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ImplicitBlend
impl RefUnwindSafe for ImplicitBlend
impl Send for ImplicitBlend
impl Sync for ImplicitBlend
impl Unpin for ImplicitBlend
impl UnsafeUnpin for ImplicitBlend
impl UnwindSafe for ImplicitBlend
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.