Function three_d::renderer::ray_intersect[][src]

pub fn ray_intersect<S: Shadable>(
    context: &Context,
    position: Vec3,
    direction: Vec3,
    max_depth: f32,
    geometries: &[S]
) -> ThreeDResult<Option<Vec3>>
Expand description

Finds the closest intersection between a ray starting at the given position in the given direction and the given geometries. Returns None if no geometry was hit before the given maximum depth.