jagua_rs::util::polygon_simplification

Function simplify_shape

Source
pub fn simplify_shape(
    shape: &SimplePolygon,
    mode: PolySimplMode,
    max_area_delta: fsize,
) -> SimplePolygon
Expand description

Simplifies a shape (removing vertices) strictly inflating or deflating based on the mode. The number of edges is reduced by one at a time, until either the change in area would exceed the max_area_delta or the number of edges would become less than 4.