pub struct Octree<T: Collider> { /* private fields */ }
Expand description
An octree is a DAG that can quickly search for points in 3D space.
The bounding box of the root node contains all points in the octree. If a point outside the bounding box is added, a new root node is created which contains the old root as one of its octants. This process is repeated until the point is contained.
The nodes are stored in a vector, and are indexed using a 32-bit node ID. This saves memory over using pointers on 64-bit systems. Node ID 1 is the first node in the vector.
Implementations
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Octree<T> where
T: RefUnwindSafe,
impl<T> Send for Octree<T> where
T: Send,
impl<T> Sync for Octree<T> where
T: Sync,
impl<T> Unpin for Octree<T> where
T: Unpin,
impl<T> UnwindSafe for Octree<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more