Skip to content

Commit

Permalink
スナップ処理後の頂点がpoly_bufに反映されるように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
yud0uhu committed Nov 7, 2024
1 parent 8b4acae commit ad4563b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nusamai/src/sink/cesiumtiles/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ fn slice_polygon(
max_y: 1.0,
};

let rings: Vec<_> = poly_buf.rings().collect();
let rings: Vec<_> = poly_buf.rings().map(|r| r.to_owned()).collect();

for ring in rings {
if ring.raw_coords().is_empty() {
Expand All @@ -423,6 +423,7 @@ fn slice_polygon(
let snapped_vertex = snap_to_tile_boundary(vertex, &tile_bounds);
ring_buffer.push(snapped_vertex);
}
poly_buf.add_ring(ring_buffer.drain(..));
}

send_polygon(key, &poly_buf);
Expand Down

0 comments on commit ad4563b

Please sign in to comment.