pub fn compute_sdf(obstacles: &DMatrix<bool>) -> DMatrix<f64>Expand description
Compute the signed distance field (SDF) from a boolean obstacle grid.
Positive values indicate distance to the nearest obstacle (free space), negative values indicate distance to the nearest free space (inside obstacle).
§Arguments
obstacles- A 2D matrix wheretruerepresents an obstacle cell andfalserepresents free space.
§Returns
A matrix of signed Euclidean distances.