Trait bevy_math::bounding::BoundedExtrusion

source ·
pub trait BoundedExtrusion: Primitive2d + Bounded2d {
    // Provided methods
    fn extrusion_aabb_3d(
        &self,
        half_depth: f32,
        translation: Vec3,
        rotation: Quat,
    ) -> Aabb3d { ... }
    fn extrusion_bounding_sphere(
        &self,
        half_depth: f32,
        translation: Vec3,
        rotation: Quat,
    ) -> BoundingSphere { ... }
}
Expand description

A trait implemented on 2D shapes which determines the 3D bounding volumes of their extrusions.

Since default implementations can be inferred from 2D bounding volumes, this allows a Bounded2d implementation on some shape MyShape to be extrapolated to a Bounded3d implementation on Extrusion<MyShape> without supplying any additional data; e.g.: impl BoundedExtrusion for MyShape {}

Provided Methods§

source

fn extrusion_aabb_3d( &self, half_depth: f32, translation: Vec3, rotation: Quat, ) -> Aabb3d

Get an axis-aligned bounding box for an extrusion with this shape as a base and the given half_depth, transformed by the given translation and rotation.

source

fn extrusion_bounding_sphere( &self, half_depth: f32, translation: Vec3, rotation: Quat, ) -> BoundingSphere

Get a bounding sphere for an extrusion of the base_shape with the given half_depth with the given translation and rotation

Object Safety§

This trait is not object safe.

Implementors§