Trait avian3d::collision::collider::ScalableCollider

source ·
pub trait ScalableCollider: AnyCollider {
    // Required methods
    fn scale(&self) -> Vector;
    fn set_scale(&mut self, scale: Vector, detail: u32);

    // Provided method
    fn scale_by(&mut self, factor: Vector, detail: u32) { ... }
}
Expand description

A trait for colliders that support scaling.

Required Methods§

source

fn scale(&self) -> Vector

Returns the global scaling factor of the collider.

source

fn set_scale(&mut self, scale: Vector, detail: u32)

Sets the global scaling factor of the collider.

If the scaling factor is not uniform and the resulting scaled shape can not be represented exactly, the given detail is used for an approximation.

Provided Methods§

source

fn scale_by(&mut self, factor: Vector, detail: u32)

Scales the collider by the given scaling factor.

If the scaling factor is not uniform and the resulting scaled shape can not be represented exactly, the given detail is used for an approximation.

Object Safety§

This trait is not object safe.

Implementors§