pub trait BVH<T, BV> {
type Node: Copy;
// Required methods
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>);
// Provided methods
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 + Copy,
BFS: BestFirstVisitor<N, T, BV> { ... }
}
Expand description
Trait implemented by Bounding Volume Hierarchy.
Required Associated Types§
Required Methods§
Sourcefn num_children(&self, node: Self::Node) -> usize
fn num_children(&self, node: Self::Node) -> usize
The number of children of the given node.
Provided Methods§
Sourcefn visit_bvtt(
&self,
other: &impl BVH<T, BV>,
visitor: &mut impl SimultaneousVisitor<T, BV>,
)
fn visit_bvtt( &self, other: &impl BVH<T, BV>, visitor: &mut impl SimultaneousVisitor<T, BV>, )
Visits the bounding volume test tree implicitly formed with other
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.