pub enum SdfCombine {
Union(SdfShape, SdfShape),
Intersection(SdfShape, SdfShape),
Subtraction(SdfShape, SdfShape),
SmoothUnion(SdfShape, SdfShape, f64),
}Expand description
Boolean CSG operations combining two SdfShape primitives.
Variants§
Union(SdfShape, SdfShape)
Union: min(d_a, d_b).
Intersection(SdfShape, SdfShape)
Intersection: max(d_a, d_b).
Subtraction(SdfShape, SdfShape)
Subtraction of b from a: max(d_a, -d_b).
SmoothUnion(SdfShape, SdfShape, f64)
Smooth union with blending factor k.
Implementations§
Source§impl SdfCombine
impl SdfCombine
Sourcepub fn signed_distance(&self, p: [f64; 3]) -> f64
pub fn signed_distance(&self, p: [f64; 3]) -> f64
Signed distance from point p to this combined shape.
Trait Implementations§
Source§impl Clone for SdfCombine
impl Clone for SdfCombine
Source§fn clone(&self) -> SdfCombine
fn clone(&self) -> SdfCombine
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SdfCombine
impl RefUnwindSafe for SdfCombine
impl Send for SdfCombine
impl Sync for SdfCombine
impl Unpin for SdfCombine
impl UnsafeUnpin for SdfCombine
impl UnwindSafe for SdfCombine
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more