Struct parry2d_f64::partitioning::QBVH [−][src]
pub struct QBVH<T> { /* fields omitted */ }
A quaternary bounding-volume-hierarchy.
This is a bounding-volume-hierarchy where each node has either four children or none.
Implementations
impl<T: IndexedData> QBVH<T>
[src]
impl<T: IndexedData> QBVH<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_gen: impl QBVHDataGenerator<T>,
dilation_factor: Real
)
[src]
&mut self,
data_gen: impl QBVHDataGenerator<T>,
dilation_factor: Real
)
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]
F: Fn(&T) -> AABB,
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]
&self,
visitor: &mut impl SimdVisitor<T, SimdAABB>,
stack: &mut Vec<u32>
)
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]
&self,
visitor: &mut BFS
) -> Option<(NodeIndex, BFS::Result)> where
BFS: SimdBestFirstVisitor<T, SimdAABB>,
BFS::Result: Clone,
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
Auto Trait Implementations
impl<T> RefUnwindSafe for QBVH<T> where
T: RefUnwindSafe,
impl<T> RefUnwindSafe for QBVH<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for QBVH<T> where
T: UnwindSafe,
impl<T> UnwindSafe for QBVH<T> where
T: UnwindSafe,
Blanket Implementations
impl<T> CheckedAs for T
[src]
impl<T> CheckedAs for T
[src]pub fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
[src]
T: CheckedCast<Dst>,
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]pub fn lossless_try_into(self) -> Option<Dst>
[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]pub fn lossy_into(self) -> Dst
[src]
impl<T> OverflowingAs for T
[src]
impl<T> OverflowingAs for T
[src]pub fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
[src]
T: OverflowingCast<Dst>,
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SaturatingAs for T
[src]
impl<T> SaturatingAs for T
[src]pub fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
[src]
T: SaturatingCast<Dst>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<T> UnwrappedAs for T
[src]
impl<T> UnwrappedAs for T
[src]pub fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
[src]
T: UnwrappedCast<Dst>,
impl<T> WrappingAs for T
[src]
impl<T> WrappingAs for T
[src]pub fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
[src]
T: WrappingCast<Dst>,