pub struct Subtraction<S1, S2> {
pub sdf1: S1,
pub sdf2: S2,
}
Expand description
Get the subtracion of two SDFs. Note that this operation is not commutative,
i.e. Subtraction::new(a, b) =/= Subtraction::new(b, a)
.
Fields§
§sdf1: S1
§sdf2: S2
Implementations§
Source§impl<S1, S2> Subtraction<S1, S2>
impl<S1, S2> Subtraction<S1, S2>
Trait Implementations§
Source§impl<S1: Clone, S2: Clone> Clone for Subtraction<S1, S2>
impl<S1: Clone, S2: Clone> Clone for Subtraction<S1, S2>
Source§fn clone(&self) -> Subtraction<S1, S2>
fn clone(&self) -> Subtraction<S1, S2>
Returns a copy 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 moreSource§impl<T, V, S1, S2> SDF<T, V> for Subtraction<S1, S2>
impl<T, V, S1, S2> SDF<T, V> for Subtraction<S1, S2>
Source§fn normals(self, eps: T) -> EstimateNormalDefault<T, V, Self>
fn normals(self, eps: T) -> EstimateNormalDefault<T, V, Self>
Estimate the normals of this SDF using the default
NormalEstimator
. Read moreSource§fn normals_fast(self, eps: T) -> EstimateNormalFast<T, V, Self>where
TetrahedralEstimator<T, V>: NormalEstimator<T, V>,
fn normals_fast(self, eps: T) -> EstimateNormalFast<T, V, Self>where
TetrahedralEstimator<T, V>: NormalEstimator<T, V>,
Estimate the normals of this SDF using a fast,
TetrahedralEstimator
. Only
works for 3d SDFs. Read moreSource§fn normals_with<E: NormalEstimator<T, V>>(
self,
estimator: E,
) -> EstimateNormal<T, V, Self, E>
fn normals_with<E: NormalEstimator<T, V>>( self, estimator: E, ) -> EstimateNormal<T, V, Self, E>
Estimate the normals of this SDF using a provided
NormalEstimator
.Source§fn union<O: SDF<T, V>>(self, other: O) -> Union<T, Self, O, HardMin<T>>
fn union<O: SDF<T, V>>(self, other: O) -> Union<T, Self, O, HardMin<T>>
Get the union of this SDF and another one()using a standard
hard minimum, creating a sharp crease at the boundary between the
two fields.
Source§fn union_smooth<O: SDF<T, V>>(
self,
other: O,
softness: T,
) -> Union<T, Self, O, PolySmoothMin<T>>
fn union_smooth<O: SDF<T, V>>( self, other: O, softness: T, ) -> Union<T, Self, O, PolySmoothMin<T>>
Get the union of this SDF and another one, blended together
with a smooth minimum function. This uses a polynomial smooth min
function by default, and the smoothing factor is controlled by the
smoothness
parameter. For even more control, see union_with
.Source§fn union_with<O: SDF<T, V>, M: MinFunction<T>>(
self,
other: O,
min_function: M,
) -> Union<T, Self, O, M>
fn union_with<O: SDF<T, V>, M: MinFunction<T>>( self, other: O, min_function: M, ) -> Union<T, Self, O, M>
Get the union of this SDF and another one()using a provided
minimum function. See the documentation of
MinFunction
for more.Source§fn subtract<O: SDF<T, V>>(self, other: O) -> Subtraction<O, Self>
fn subtract<O: SDF<T, V>>(self, other: O) -> Subtraction<O, Self>
Get the subtracion of another SDF from this one. Note that this operation is not commutative,
i.e.
a.subtraction(b) =/= b.subtraction(a)
.Source§fn intersection<O: SDF<T, V>>(self, other: O) -> Intersection<Self, O>
fn intersection<O: SDF<T, V>>(self, other: O) -> Intersection<Self, O>
Get the intersection of this SDF and another one.
Source§fn elongate(
self,
axis: Axis,
elongation: T,
) -> Elongate<T, Self, <V as Vec<T>>::Dimension>
fn elongate( self, axis: Axis, elongation: T, ) -> Elongate<T, Self, <V as Vec<T>>::Dimension>
Elongate this SDF along one()axis. The elongation is symmetrical about the origin.
Source§fn elongate_multi_axis(
self,
elongation: V,
) -> ElongateMulti<V, Self, <V as Vec<T>>::Dimension>
fn elongate_multi_axis( self, elongation: V, ) -> ElongateMulti<V, Self, <V as Vec<T>>::Dimension>
Elongate this SDF along one()axis. The elongation is symmetrical about the origin.
impl<S1: Copy, S2: Copy> Copy for Subtraction<S1, S2>
Auto Trait Implementations§
impl<S1, S2> Freeze for Subtraction<S1, S2>
impl<S1, S2> RefUnwindSafe for Subtraction<S1, S2>where
S1: RefUnwindSafe,
S2: RefUnwindSafe,
impl<S1, S2> Send for Subtraction<S1, S2>
impl<S1, S2> Sync for Subtraction<S1, S2>
impl<S1, S2> Unpin for Subtraction<S1, S2>
impl<S1, S2> UnwindSafe for Subtraction<S1, S2>where
S1: UnwindSafe,
S2: UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)