Skip to main content

Box

Trait Box 

Source
pub trait Box: Geometry<Kind = BoxTag> + IndexedAccess { }
Expand description

An axis-aligned bounding box.

Models doc/concept/box.qbk — equivalent in C++ to the trait specialisations on model::box in boost/geometry/geometries/box.hpp:187-247. Implementers provide IndexedAccess for I ∈ {corner::MIN, corner::MAX}. The two corner points can but need not be materialised as Point values; box_min / box_max reconstruct them from the indexed accessors on demand.

§Examples

use geometry_trait::Box;
// A generic helper that accepts any `Box` impl.
fn _accepts_box<B: Box>(_b: &B) {}

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§