pick

Function pick 

Source
pub fn pick(
    context: &Context,
    camera: &Camera,
    pixel: impl Into<PhysicalPoint> + Copy,
    geometries: impl IntoIterator<Item = impl Geometry>,
) -> Option<IntersectionResult>
Expand description

Finds the closest intersection between a ray from the given camera in the given pixel coordinate and the given geometries. The pixel coordinate must be in physical pixels, where (viewport.x, viewport.y) indicate the bottom left corner of the viewport and (viewport.x + viewport.width, viewport.y + viewport.height) indicate the top right corner. Returns None if no geometry was hit between the near (z_near) and far (z_far) plane for this camera.