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: Aabb + ?Sized>(
&mut self,
target: &T,
anchor: AabbPoint,
) -> &mut Self
where AabbPoint: Locate<Self> { ... }
fn move_next_to_padded<T: Aabb + ?Sized>(
&mut self,
target: &T,
anchor: AabbPoint,
padding: f64,
) -> &mut Self
where 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§
Sourcefn with_origin(
&mut self,
p: impl Locate<Self>,
f: impl FnOnce(&mut Self),
) -> &mut Self
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.
Sourcefn move_anchor_to<A>(&mut self, anchor: A, point: DVec3) -> &mut Selfwhere
A: Locate<Self>,
fn move_anchor_to<A>(&mut self, anchor: A, point: DVec3) -> &mut Selfwhere
A: Locate<Self>,
Put anchor at a given point.
See crate::anchor’s Locate for more details.
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.