pub enum SdfOp {
Union,
Intersection,
Subtraction,
SmoothUnion {
k: f64,
},
Offset {
d: f64,
},
}Expand description
Boolean / blending operations that combine two SDF values.
Variants§
Union
Take the minimum of two distance values (boolean union).
Intersection
Take the maximum of two distance values (boolean intersection).
Subtraction
Subtract the second shape from the first (max(d1, -d2)).
SmoothUnion
Polynomial smooth minimum blend.
Offset
Uniformly grow (positive d) or shrink (negative d) a shape.
Implementations§
Trait Implementations§
impl StructuralPartialEq for SdfOp
Auto Trait Implementations§
impl Freeze for SdfOp
impl RefUnwindSafe for SdfOp
impl Send for SdfOp
impl Sync for SdfOp
impl Unpin for SdfOp
impl UnsafeUnpin for SdfOp
impl UnwindSafe for SdfOp
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