Skip to main content

world_cast_shape

Function world_cast_shape 

Source
pub fn world_cast_shape(
    world: &mut World,
    origin: Pos,
    proxy: &ShapeProxy,
    translation: Vec2,
    filter: QueryFilter,
    fcn: impl FnMut(ShapeId, Pos, Vec2, f32) -> f32,
) -> TreeStats
Expand description

Cast a shape through the world. Similar to a cast ray except that a shape is cast instead of a point. The callback contract matches world_cast_ray. (b2World_CastShape + static ShapeCastCallback)