Trait ncollide3d::partitioning::BVH[][src]

pub trait BVH<T, BV> {
    type Node: Copy;
    fn root(&self) -> Option<Self::Node>;
fn num_children(&self, node: Self::Node) -> usize;
fn child(&self, i: usize, node: Self::Node) -> Self::Node;
fn content(&self, node: Self::Node) -> (&BV, Option<&T>); fn visit(&self, visitor: &mut impl Visitor<T, BV>) { ... }
fn visit_bvtt(
        &self,
        other: &impl BVH<T, BV>,
        visitor: &mut impl SimultaneousVisitor<T, BV>
    ) { ... }
fn best_first_search<N, BFS>(
        &self,
        visitor: &mut BFS
    ) -> Option<(Self::Node, BFS::Result)>
    where
        N: RealField,
        BFS: BestFirstVisitor<N, T, BV>
, { ... } }

Trait implemented by Bounding Volume Hierarchy.

Associated Types

type Node: Copy[src]

Type of a node identifiers on this BVH.

Loading content...

Required methods

fn root(&self) -> Option<Self::Node>[src]

The root of the BVH.

fn num_children(&self, node: Self::Node) -> usize[src]

The number of children of the given node.

fn child(&self, i: usize, node: Self::Node) -> Self::Node[src]

The i-th child of the given node.

fn content(&self, node: Self::Node) -> (&BV, Option<&T>)[src]

The bounding volume and data contained by the given node.

Loading content...

Provided methods

fn visit(&self, visitor: &mut impl Visitor<T, BV>)[src]

Traverses this BVH using a visitor.

fn visit_bvtt(
    &self,
    other: &impl BVH<T, BV>,
    visitor: &mut impl SimultaneousVisitor<T, BV>
)
[src]

Visits the bounding volume test tree implicitly formed with other.

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.

Loading content...

Implementors

impl<'a, N: RealField, T, BV> BVH<T, BV> for DBVT<N, T, BV>[src]

type Node = DBVTNodeId

impl<'a, T, BV> BVH<T, BV> for BVT<T, BV>[src]

type Node = BVTNodeId

Loading content...