[][src]Struct ncollide_geometry::partitioning::BVT

pub struct BVT<B, BV> { /* fields omitted */ }

A Bounding Volume Tree.

Methods

impl<B, BV> BVT<B, BV>[src]

pub fn new_with_partitioner<F: FnMut(usize, Vec<(B, BV)>) -> (BV, BinaryPartition<B, BV>)>(
    leaves: Vec<(B, BV)>,
    partitioner: &mut F
) -> BVT<B, BV>
[src]

Builds a bounding volume tree using an user-defined construction function.

pub fn visit<Vis: BVTVisitor<B, BV>>(&self, visitor: &mut Vis)[src]

Traverses this tree using an object implementing the BVTVisitortrait.

This will traverse the whole tree and call the visitor .visit_internal(...) (resp. .visit_leaf(...)) method on each internal (resp. leaf) node.

pub fn visit_bvtt<Vis: BVTTVisitor<B, BV>>(
    &self,
    other: &BVT<B, BV>,
    visitor: &mut Vis
)
[src]

Visits the bounding volume traversal tree implicitly formed with other.

Performs a best-fist-search on the tree.

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

pub fn root_bounding_volume<'r>(&'r self) -> Option<&'r BV>[src]

Reference to the bounding volume of the tree root.

pub fn depth(&self) -> usize[src]

Computes the depth of this tree.

impl<B, BV> BVT<B, BV>[src]

pub fn new_balanced<P>(leaves: Vec<(B, BV)>) -> BVT<B, BV> where
    P: Point,
    BV: BoundingVolume<P> + Clone
[src]

Creates a balanced BVT.

pub fn median_partitioner_with_centers<P, F: FnMut(&B, &BV) -> P>(
    depth: usize,
    leaves: Vec<(B, BV)>,
    center: &mut F
) -> (BV, BinaryPartition<B, BV>) where
    P: Point,
    BV: BoundingVolume<P> + Clone
[src]

Construction function for a kdree to be used with BVT::new_with_partitioner.

pub fn median_partitioner<P>(
    depth: usize,
    leaves: Vec<(B, BV)>
) -> (BV, BinaryPartition<B, BV>) where
    P: Point,
    BV: BoundingVolume<P> + Clone
[src]

Construction function for a kdree to be used with BVT::new_with_partitioner.

Trait Implementations

impl<B: Clone, BV: Clone> Clone for BVT<B, BV>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<B, BV> Send for BVT<B, BV> where
    B: Send,
    BV: Send

impl<B, BV> Sync for BVT<B, BV> where
    B: Sync,
    BV: Sync

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self