pub struct Box<P: PointTrait> { /* private fields */ }Expand description
Axis-aligned bounding box.
Mirrors boost::geometry::model::box<P> from
boost/geometry/geometries/box.hpp:64-172. The two corners are
addressed by corner::MIN / corner::MAX, matching the
traits::indexed_access<box, min_corner|max_corner, D>
specialisations at boost/geometry/geometries/box.hpp:213-247.
Implementations§
Source§impl<P: PointTrait> Box<P>
impl<P: PointTrait> Box<P>
Sourcepub const fn from_corners(min: P, max: P) -> Self
pub const fn from_corners(min: P, max: P) -> Self
Construct a box from its minimum and maximum corners.
Mirrors the box(Point const& min_corner, Point const& max_corner)
constructor at boost/geometry/geometries/box.hpp:103-110.
Trait Implementations§
impl<P: PointMut> Box for Box<P>
Wire the Box concept up. The trait body is empty — the
concept is satisfied by the two super-bounds Geometry and
IndexedAccess already proven above.
impl<P: Copy + PointTrait> Copy for Box<P>
Source§impl<P: PointTrait> Geometry for Box<P>
Tag this concrete type as a Box. Mirrors the
traits::tag<model::box<...>> specialisation at
boost/geometry/geometries/box.hpp:189-192.
impl<P: PointTrait> Geometry for Box<P>
Tag this concrete type as a Box. Mirrors the
traits::tag<model::box<...>> specialisation at
boost/geometry/geometries/box.hpp:189-192.
Source§impl<P: PointMut> IndexedAccess for Box<P>
Two-axis access on the box. Collapses the
traits::indexed_access<box, min_corner|max_corner, D>
specialisations at boost/geometry/geometries/box.hpp:213-247
into one Rust impl: the I axis selects the corner, D then
dispatches to Point::get / Point::set on that corner.
impl<P: PointMut> IndexedAccess for Box<P>
Two-axis access on the box. Collapses the
traits::indexed_access<box, min_corner|max_corner, D>
specialisations at boost/geometry/geometries/box.hpp:213-247
into one Rust impl: the I axis selects the corner, D then
dispatches to Point::get / Point::set on that corner.