Module broccoli::node [−][src]
Expand description
Contains node-level building block structs and visitors used for a Tree
.
Structs
BBox | A bounding box container object that implements |
Node | A node in |
Range | 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 degenrate Ranges is unspecified. |
Rect | 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. |
VistrMut | Tree Iterator that returns a protected mutable reference to each node. |
Traits
Aabb | Trait to signify that this object has an axis aligned bounding box.
Multiple calls to |
Num | The underlying number type used for the tree. It is auto implemented by all types that satisfy the type constraints. Notice that no arithmatic is possible. The tree is constructed using only comparisons and copying. |
Type Definitions
Vistr | 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. |