[−][src]Struct ncollide_geometry::partitioning::BVT
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]
leaves: Vec<(B, BV)>,
partitioner: &mut F
) -> BVT<B, BV>
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 BVTVisitor
trait.
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]
&self,
other: &BVT<B, BV>,
visitor: &mut Vis
)
Visits the bounding volume traversal tree implicitly formed with other
.
pub fn best_first_search<'a, N, BFS>(
&'a self,
algorithm: &mut BFS
) -> Option<(&'a B, BFS::UserData)> where
N: Real,
BFS: BVTCostFn<N, B, BV>,
[src]
&'a self,
algorithm: &mut BFS
) -> Option<(&'a B, BFS::UserData)> where
N: Real,
BFS: BVTCostFn<N, B, BV>,
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]
P: Point,
BV: BoundingVolume<P> + Clone,
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]
depth: usize,
leaves: Vec<(B, BV)>,
center: &mut F
) -> (BV, BinaryPartition<B, BV>) where
P: Point,
BV: BoundingVolume<P> + Clone,
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]
depth: usize,
leaves: Vec<(B, BV)>
) -> (BV, BinaryPartition<B, BV>) where
P: Point,
BV: BoundingVolume<P> + Clone,
Construction function for a kdree to be used with BVT::new_with_partitioner
.
Trait Implementations
Auto Trait Implementations
impl<B, BV> Send for BVT<B, BV> where
B: Send,
BV: Send,
B: Send,
BV: Send,
impl<B, BV> Sync for BVT<B, BV> where
B: Sync,
BV: Sync,
B: Sync,
BV: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T> Same for T
type Output = T
Should always be Self