pub struct Translation<S, T> {
pub shape: S,
pub offset: Vector2D<T, WorldSpace>,
}Fields§
§shape: S§offset: Vector2D<T, WorldSpace>Trait Implementations§
Source§impl<S, P> BoundingBox<P> for Translation<S, P>
impl<S, P> BoundingBox<P> for Translation<S, P>
fn bounding_box(&self) -> Box2D<P, WorldSpace>
Source§impl<S: Clone, T: Clone> Clone for Translation<S, T>
impl<S: Clone, T: Clone> Clone for Translation<S, T>
Source§fn clone(&self) -> Translation<S, T>
fn clone(&self) -> Translation<S, T>
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 moreSource§impl<B, S, P> Draw<P, B> for Translation<S, P>where
Translation<S, P>: Shape<P>,
Available on crate feature drawing only.
impl<B, S, P> Draw<P, B> for Translation<S, P>where
Translation<S, P>: Shape<P>,
Available on crate feature
drawing only.Source§impl<S, P> SDF<P> for Translation<S, P>
impl<S, P> SDF<P> for Translation<S, P>
fn sdf(&self, pixel: Point2D<P, WorldSpace>) -> P
impl<S: Copy, T: Copy> Copy for Translation<S, T>
Auto Trait Implementations§
impl<S, T> Freeze for Translation<S, T>
impl<S, T> RefUnwindSafe for Translation<S, T>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for Translation<S, T>
impl<S, T> Sync for Translation<S, T>
impl<S, T> Unpin for Translation<S, T>
impl<S, T> UnwindSafe for Translation<S, T>where
S: UnwindSafe,
T: 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> Pointable for T
impl<T> Pointable for T
Source§impl<T, Sh> Shape<T> for Shwhere
Sh: SDF<T> + BoundingBox<T>,
impl<T, Sh> Shape<T> for Shwhere
Sh: SDF<T> + BoundingBox<T>,
fn translate(self, offset: V2<T, WorldSpace>) -> Translation<Self, T>where
Self: Sized,
Source§fn rotate(self, angle: Angle<T>) -> Rotation<Self, T>where
Self: Sized,
fn rotate(self, angle: Angle<T>) -> Rotation<Self, T>where
Self: Sized,
Rotate around the center of shape’s bounding box
Source§fn scale(self, scale: T) -> Scale<Self, T>where
Self: Sized,
fn scale(self, scale: T) -> Scale<Self, T>where
Self: Sized,
Scale around the center of shape’s bounding box
Source§fn subtraction<U>(self, other: U) -> Subtraction<Self, U>where
Self: Sized,
fn subtraction<U>(self, other: U) -> Subtraction<Self, U>where
Self: Sized,
Subtracion of two SDFs. Note that this operation is not commutative,
i.e.
Subtraction {a, b} =/= Subtraction {b, a}.Source§fn intersection<U>(self, other: U) -> Intersection<Self, U>where
Self: Sized,
fn intersection<U>(self, other: U) -> Intersection<Self, U>where
Self: Sized,
Intersection of two SDFs.