ShiftTransformExt

Trait ShiftTransformExt 

Source
pub trait ShiftTransformExt: ShiftTransform {
    // Provided methods
    fn with_origin(
        &mut self,
        p: impl Locate<Self>,
        f: impl FnOnce(&mut Self),
    ) -> &mut Self { ... }
    fn move_anchor_to<A>(&mut self, anchor: A, point: DVec3) -> &mut Self
       where A: Locate<Self> { ... }
    fn move_to(&mut self, point: DVec3) -> &mut Self
       where AabbPoint: Locate<Self> { ... }
    fn move_next_to<T>(&mut self, target: &T, anchor: AabbPoint) -> &mut Self
       where T: Aabb + ?Sized,
             AabbPoint: Locate<Self> { ... }
    fn move_next_to_padded<T>(
        &mut self,
        target: &T,
        anchor: AabbPoint,
        padding: f64,
    ) -> &mut Self
       where T: Aabb + ?Sized,
             AabbPoint: Locate<Self> { ... }
}
Expand description

Useful extensions for shifting operations.

This trait is implemented automatically for types that implement ShiftTransform, you should not implement it yourself.

Provided Methods§

Source

fn with_origin( &mut self, p: impl Locate<Self>, f: impl FnOnce(&mut Self), ) -> &mut Self

Do something with the origin of the item.

See crate::anchor’s Locate for more details.

Source

fn move_anchor_to<A>(&mut self, anchor: A, point: DVec3) -> &mut Self
where A: Locate<Self>,

Put anchor at a given point.

See crate::anchor’s Locate for more details.

Source

fn move_to(&mut self, point: DVec3) -> &mut Self
where AabbPoint: Locate<Self>,

Put pivot at a given point.

Source

fn move_next_to<T>(&mut self, target: &T, anchor: AabbPoint) -> &mut Self
where T: Aabb + ?Sized, AabbPoint: Locate<Self>,

Put negative anchor of self on anchor of target

Source

fn move_next_to_padded<T>( &mut self, target: &T, anchor: AabbPoint, padding: f64, ) -> &mut Self
where T: Aabb + ?Sized, AabbPoint: Locate<Self>,

Put negative anchor of self on anchor of target, with a distance of padding

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§