Struct space_partitioning::QuadTree[][src]

pub struct QuadTree<ElementId = u32> where
    ElementId: ElementIdType, 
{ /* fields omitted */ }
Expand description

A QuadTree implementation as described in Efficient Quadtrees.

Remarks

This tree uses integral coordinates only in order to speed up box-box intersection tests.

Implementations

Removes the specified element.

Remarks

The element is located using its bounding box and identified using the ID. Because of that, the bounding box of the element must not change until is was removed from the tree.

Arguments

  • [element] - The element to remove.

Prunes unused child nodes from the tree.

Remarks

The tree is never pruned automatically for performance reasons. Call this method after all elements were removed or updated.

Returns the set of IDs that occupy space within the specified bounding box.

Arguments

  • [rect] - The rectangle to test for.

Calls a function for each ID that occupies space within the specified bounding box. The function may be called multiple times for the same ID.

Arguments

  • [rect] - The rectangle to test for.
  • [candidate_fn] - The function called for each candidate element’s ID.

Returns the set of IDs that occupy space within the specified bounding box.

Arguments

  • [element] - The element to test for.

Calls a function for each ID that occupies space within the specified bounding box. The function may be called multiple times for the same ID.

Arguments

  • [element] - The element to test for.
  • [candidate_fn] - The function called for each candidate element’s ID.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.