logo

Structs

A bounding box container object that implements Aabb and HasInner. Note that &mut BBox<N,T> also implements Aabb and HasInner.

BBox with a reference.

A node in Tree.

A 1D range. Internally represented as start and end. (as opposed to a start and length) If range A contains value x and range B contains value x, then A intersects B. There is no protection against “degenerate” Ranges where start>end.

An axis aligned rectangle. Stored as two Ranges.

Tree Iterator that returns a protected mutable reference to each node.

Traits

Trait to signify that this object has an axis aligned bounding box.

The underlying number type used for the tree. It is auto implemented by all types that satisfy the type constraints. Notice that no arithmetic is possible. The tree is constructed using only comparisons and copying.

Type Definitions

When we traverse the tree in read-only mode, we can simply return a reference to each node. We don’t need to protect the user from only mutating parts of the BBox’s since they can’t change anything.