Trait ncollide2d::partitioning::BVTCostFn
source · pub trait BVTCostFn<N, B, BV> {
type UserData;
fn compute_bv_cost(&mut self, _: &BV) -> Option<N>;
fn compute_b_cost(&mut self, _: &B) -> Option<(N, Self::UserData)>;
}
Expand description
Trait implemented by cost functions used by the best-first search on a BVT
.
Required Associated Types§
Required Methods§
sourcefn compute_bv_cost(&mut self, _: &BV) -> Option<N>
fn compute_bv_cost(&mut self, _: &BV) -> Option<N>
Computes the cost of a bounding volume.
sourcefn compute_b_cost(&mut self, _: &B) -> Option<(N, Self::UserData)>
fn compute_b_cost(&mut self, _: &B) -> Option<(N, Self::UserData)>
Computes the cost of an object, and the result to be returned if it is the best one.