[−][src]Function collision::dbvt::query_ray_closest
pub fn query_ray_closest<'a, S, T: 'a, P>(
tree: &'a DynamicBoundingVolumeTree<T>,
ray: Ray<S, P, P::Diff>
) -> Option<(&'a T, P)> where
S: BaseFloat,
T: TreeValue,
P: EuclideanSpace<Scalar = S>,
P::Diff: VectorSpace<Scalar = S> + InnerSpace,
T::Bound: Clone + Contains<T::Bound> + SurfaceArea<Scalar = S> + Union<T::Bound, Output = T::Bound> + Continuous<Ray<S, P, P::Diff>, Result = P> + Discrete<Ray<S, P, P::Diff>>,
Query the given tree for the closest value that intersects the given ray.
Parameters:
tree
: DBVT to query.ray
: Ray to find the closest intersection for.
Returns
Optionally returns the value that had the closest intersection with the ray, along with the actual intersection point.