Aabb

Trait Aabb 

Source
pub trait Aabb {
    // Required method
    fn aabb(&self) -> [DVec3; 2];

    // Provided methods
    fn aabb_size(&self) -> DVec3 { ... }
    fn aabb_center(&self) -> DVec3 { ... }
}
Expand description

Axis-Aligned Bounding Box

This is the basic trait for an item.

Required Methods§

Source

fn aabb(&self) -> [DVec3; 2]

Get the Axis-aligned bounding box represent in [<min>, <max>].

Provided Methods§

Source

fn aabb_size(&self) -> DVec3

Get the size of the Aabb.

Source

fn aabb_center(&self) -> DVec3

Get the center of the Aabb.

Implementations on Foreign Types§

Source§

impl Aabb for Sphere

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for MeshItem

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for Arc

Source§

fn aabb(&self) -> [DVec3; 2]

Note that the arc’s bounding box is actually same as the circle’s bounding box.

Source§

impl Aabb for ArcBetweenPoints

Source§

fn aabb(&self) -> [DVec3; 2]

Note that the arc’s bounding box is actually same as the circle’s bounding box.

Source§

impl Aabb for Circle

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for Ellipse

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for EllipticArc

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for Line

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for Parallelogram

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for Polygon

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for Rectangle

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for RegularPolygon

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for Square

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for VItem

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for SvgItem

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for TextItem

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for TypstText

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl Aabb for DVec3

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl<T> Aabb for [T]
where T: Aabb,

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl<T> Aabb for VisualizeAabbItem<T>
where T: Aabb,

Source§

fn aabb(&self) -> [DVec3; 2]

Source§

impl<T> Aabb for Vec<T>
where T: Aabb,

Source§

fn aabb(&self) -> [DVec3; 2]

Implementors§