Skip to main content

combine_aabbs

Macro combine_aabbs 

Source
macro_rules! combine_aabbs {
    ( $( $x:expr_2021 ),* ) => { ... };
}
Expand description

Combines the given Aabb arguments into a single Aabb encapsulating all

ยงExamples:

let aabb = combine_aabbs![
    &Aabb::new_from_2_points(Vec3::new(-1., 0., 0.), Vec3::new(1., 0., 0.)),
    &Aabb::new_from_2_points(Vec3::new(0., -2., 0.), Vec3::new(0., 2., 0.)),
    &Aabb::new_from_2_points(Vec3::new(0., 0., -3.), Vec3::new(0., 0.,  3.))
];
assert_eq!(aabb.x, Interval::new(-1., 1.));
assert_eq!(aabb.y, Interval::new(-2., 2.));
assert_eq!(aabb.z, Interval::new(-3., 3.));