Trait parry2d::partitioning::QbvhDataGenerator

source ·
pub trait QbvhDataGenerator<LeafData> {
    // Required methods
    fn size_hint(&self) -> usize;
    fn for_each(&mut self, f: impl FnMut(LeafData, Aabb));
}
Expand description

Trait used for generating the content of the leaves of the Qbvh acceleration structure.

Required Methods§

source

fn size_hint(&self) -> usize

Gives an idea of the number of elements this generator contains.

This is primarily used for pre-allocating some arrays for better performances.

source

fn for_each(&mut self, f: impl FnMut(LeafData, Aabb))

Iterate through all the elements of this generator.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<LeafData, F> QbvhDataGenerator<LeafData> for F
where F: ExactSizeIterator<Item = (LeafData, Aabb)>,