pub trait ScaleTransformExt: ScaleTransform {
// Provided methods
fn calc_scale_ratio(&self, hint: ScaleHint) -> DVec3
where Self: Aabb { ... }
fn scale_to(&mut self, hint: ScaleHint) -> &mut Self
where Self: Aabb { ... }
fn scale_to_min(&mut self, hints: &[ScaleHint]) -> &mut Self
where Self: Aabb { ... }
fn scale_to_max(&mut self, hints: &[ScaleHint]) -> &mut Self
where Self: Aabb { ... }
}Expand description
Useful extensions for scaling operations.
This trait is implemented automatically for types that implement ScaleTransform, you should not implement it yourself.
Provided Methods§
Sourcefn calc_scale_ratio(&self, hint: ScaleHint) -> DVec3where
Self: Aabb,
fn calc_scale_ratio(&self, hint: ScaleHint) -> DVec3where
Self: Aabb,
Calculate the scale ratio for a given hint.
See ScaleHint for more details.
Sourcefn scale_to(&mut self, hint: ScaleHint) -> &mut Selfwhere
Self: Aabb,
fn scale_to(&mut self, hint: ScaleHint) -> &mut Selfwhere
Self: Aabb,
Scale the item to a given hint (at origin).
See ScaleHint for more details.
Sourcefn scale_to_min(&mut self, hints: &[ScaleHint]) -> &mut Selfwhere
Self: Aabb,
fn scale_to_min(&mut self, hints: &[ScaleHint]) -> &mut Selfwhere
Self: Aabb,
Scale the item to the minimum scale ratio of each axis from the given hints.
See ScaleHint for more details.
Sourcefn scale_to_max(&mut self, hints: &[ScaleHint]) -> &mut Selfwhere
Self: Aabb,
fn scale_to_max(&mut self, hints: &[ScaleHint]) -> &mut Selfwhere
Self: Aabb,
Scale the item to the maximum scale ratio of each axis from the given hints.
See ScaleHint 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.