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) This means that subdivision does not result in any floating point calculations. The start value must be <= the end value. There is no protection against “degenerate” Ranges where start>end. Behavior of any of the functions with degenerate Ranges is unspecified.

An axis aligned rectangle. Stored as two Ranges. It is a semi-closed rectangle. A point is considered inside the rectangle if it is in [start,end) for both x and y.

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.