pub fn patch_border_edge(
target: &mut ElevationGrid,
neighbor: &ElevationGrid,
dx: i32,
dy: i32,
)Expand description
Overwrite one border strip of target with edge data from
neighbor, in place.
dx and dy describe the relative position of the neighbour
with respect to the target tile:
| (dx, dy) | meaning | border written |
|---|---|---|
| ( 0, -1) | neighbour is north | top row |
| ( 0, 1) | neighbour is south | bottom row |
| (-1, 0) | neighbour is west | left column |
| ( 1, 0) | neighbour is east | right column |
| (-1, -1) | neighbour is NW | NW corner |
| ( 1, -1) | neighbour is NE | NE corner |
| (-1, 1) | neighbour is SW | SW corner |
| ( 1, 1) | neighbour is SE | SE corner |
Both grids must be in expanded form ((W+2) x (H+2)) and have the
same interior dimensions. If they differ, the call is a no-op.
After patching, target.min_elev / max_elev are updated if the
newly written samples extend the range.