Function veloren_world::sim::util::get_oceans

source ยท
pub fn get_oceans<F: Float>(
    map_size_lg: MapSizeLg,
    oldh: impl Fn(usize) -> F + Sync,
) -> BitBox
Expand description

Find all ocean tiles from a height map, using an inductive definition of ocean as one of:

  • posi is at the side of the world (map_edge_factor(posi) == 0.0)
  • posi has a neighboring ocean tile, and has a height below sea level (oldh(posi) <= 0.0).