[][src]Struct parry2d::partitioning::SimdQuadTree

pub struct SimdQuadTree<T> { /* fields omitted */ }

A quad-tree with SIMD acceleration.

Implementations

impl<T: IndexedData> SimdQuadTree<T>[src]

pub fn new() -> Self[src]

Initialize an empty quad-tree.

pub fn root_aabb(&self) -> &AABB[src]

The AABB of the root of this tree.

pub fn leaf_data(&mut self, node_id: NodeIndex) -> Option<T>[src]

Returns the data associated to a given leaf.

Returns None if the provided node ID does not identify a leaf.

pub fn clear_and_rebuild(
    &mut self,
    data: impl ExactSizeIterator<Item = (T, AABB)>,
    dilation_factor: Real
)
[src]

Clears this quad-tree and rebuilds it from a new set of data and AABBs.

pub fn pre_update(&mut self, data: T)[src]

Marks a piece of data as dirty so it can be updated during the next call to self.update.

pub fn update<F>(&mut self, aabb_builder: F, dilation_factor: Real) where
    F: Fn(&T) -> AABB
[src]

Update all the nodes that have been marked as dirty by self.pre_update.

pub fn intersect_aabb(&self, aabb: &AABB, out: &mut Vec<T>)[src]

Retrieve all the data of the nodes with AABBs intersecting the given AABB:

pub fn traverse_depth_first(&self, visitor: &mut impl SimdVisitor<T, SimdAABB>)[src]

Performs a depth-first traversal on the BVH.

pub fn traverse_depth_first_with_stack(
    &self,
    visitor: &mut impl SimdVisitor<T, SimdAABB>,
    stack: &mut Vec<u32>
)
[src]

Performs a depth-first traversal on the BVH.

pub fn traverse_best_first<BFS>(
    &self,
    visitor: &mut BFS
) -> Option<(NodeIndex, BFS::Result)> where
    BFS: SimdBestFirstVisitor<T, SimdAABB>,
    BFS::Result: Clone
[src]

Performs a best-first-search on the BVH.

Returns the content of the leaf with the smallest associated cost, and a result of user-defined type.

Trait Implementations

impl<T: Clone> Clone for SimdQuadTree<T>[src]

impl<T: Debug> Debug for SimdQuadTree<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for SimdQuadTree<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for SimdQuadTree<T> where
    T: Send
[src]

impl<T> Sync for SimdQuadTree<T> where
    T: Sync
[src]

impl<T> Unpin for SimdQuadTree<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for SimdQuadTree<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<Src, Dst> LosslessTryInto<Dst> for Src where
    Dst: LosslessTryFrom<Src>, 
[src]

impl<Src, Dst> LossyInto<Dst> for Src where
    Dst: LossyFrom<Src>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,