Struct ncollide2d::query::ray_internal::RayIntersectionCostFn
source · pub struct RayIntersectionCostFn<'a, N: 'a + Real> { /* private fields */ }
Expand description
A search thet selects the objects that has the smallest time of impact with a given ray.
Implementations§
source§impl<'a, N: Real> RayIntersectionCostFn<'a, N>
impl<'a, N: Real> RayIntersectionCostFn<'a, N>
sourcepub fn new(ray: &'a Ray<N>, solid: bool) -> RayIntersectionCostFn<'a, N>
pub fn new(ray: &'a Ray<N>, solid: bool) -> RayIntersectionCostFn<'a, N>
Creates a new BestRayInterferenceSearch
.
Trait Implementations§
source§impl<'a, N, B, BV> BVTCostFn<N, B, BV> for RayIntersectionCostFn<'a, N>where
N: Real,
B: RayCast<N>,
BV: RayCast<N>,
impl<'a, N, B, BV> BVTCostFn<N, B, BV> for RayIntersectionCostFn<'a, N>where
N: Real,
B: RayCast<N>,
BV: RayCast<N>,
§type UserData = RayIntersection<N>
type UserData = RayIntersection<N>
User-defined data attached to each BVT leaf.
source§fn compute_bv_cost(&mut self, bv: &BV) -> Option<N>
fn compute_bv_cost(&mut self, bv: &BV) -> Option<N>
Computes the cost of a bounding volume.
source§fn compute_b_cost(&mut self, b: &B) -> Option<(N, RayIntersection<N>)>
fn compute_b_cost(&mut self, b: &B) -> Option<(N, RayIntersection<N>)>
Computes the cost of an object, and the result to be returned if it is the best one.
Auto Trait Implementations§
impl<'a, N> RefUnwindSafe for RayIntersectionCostFn<'a, N>where
N: RefUnwindSafe,
impl<'a, N> Send for RayIntersectionCostFn<'a, N>
impl<'a, N> Sync for RayIntersectionCostFn<'a, N>
impl<'a, N> Unpin for RayIntersectionCostFn<'a, N>
impl<'a, N> UnwindSafe for RayIntersectionCostFn<'a, N>where
N: RefUnwindSafe,
Blanket Implementations§
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.