/// When the user clicks, we see if the model is hit. If it is, we compute the morph weights from the picking point.
When the user clicks, we see if the model is hit. If it is, we compute the morph weights from the picking point.
When the user clicks we see if the model is hit . If it is we compute the morph weights from the picking point .
fn on_click(mesh: &Mesh, ray_start_point: &Vec3, ray_direction: &Vec3) -> Option<HashMap<VertexID, Vec3>>
{
    if let Some((vertex_id, point)) = pick(&mesh,&ray_start_point, &ray_direction) {
        Some(compute_weights(mesh, vertex_id, &point))
    }
    else {None}
}
fn on_click ( mesh : & Mesh , ray_start_point : & Vec3 , ray_direction : & Vec3 ) -> Option < HashMap < VertexID , Vec3 > > { if let Some ( ( vertex_id , point ) ) = pick ( & mesh , & ray_start_point , & ray_direction ) { Some ( compute_weights ( mesh , vertex_id , & point ) ) } else { None } }
When the user clicks, we see if the model is hit.
When the user clicks we see if the model is hit .
mesh
&Mesh
ray_start_point
&Vec3
ray_direction
&Vec3