pub struct ScaledShape<S> {
pub shape: S,
pub scale: Fix128,
}Expand description
Uniformly scaled shape wrapper
Wraps any Support-implementing shape with a uniform scale factor. The
scale is about the world origin, not about the inner shape’s centre: a
sphere centred at c with radius r scaled by s > 0 is the sphere
centred at s·c with radius s·r.
The support in d is s · inner.support(d) for s >= 0. A negative
scale mirrors the shape through the origin, whose furthest point in d
is s · inner.support(-d).
Fields§
§shape: SInner shape
scale: Fix128Uniform scale factor
Implementations§
Trait Implementations§
Source§impl<S: Clone> Clone for ScaledShape<S>
impl<S: Clone> Clone for ScaledShape<S>
impl<S: Copy> Copy for ScaledShape<S>
Source§impl<S: Debug> Debug for ScaledShape<S>
impl<S: Debug> Debug for ScaledShape<S>
impl<S: Eq> Eq for ScaledShape<S>
Source§impl<S: PartialEq> PartialEq for ScaledShape<S>
impl<S: PartialEq> PartialEq for ScaledShape<S>
impl<S: PartialEq> StructuralPartialEq for ScaledShape<S>
Auto Trait Implementations§
impl<S> Freeze for ScaledShape<S>where
S: Freeze,
impl<S> RefUnwindSafe for ScaledShape<S>where
S: RefUnwindSafe,
impl<S> Send for ScaledShape<S>where
S: Send,
impl<S> Sync for ScaledShape<S>where
S: Sync,
impl<S> Unpin for ScaledShape<S>where
S: Unpin,
impl<S> UnsafeUnpin for ScaledShape<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for ScaledShape<S>where
S: 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§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