Function veloren_world::sim::map::sample_pos

source ·
pub fn sample_pos(
    config: &MapConfig<'_>,
    sampler: &WorldSim,
    index: IndexRef<'_>,
    samples: Option<&[Option<ColumnSample<'_>>]>,
    pos: Vec2<i32>
) -> MapSample
Expand description

Samples a MapSample at a chunk.

You should generally pass a closure over this function into generate when constructing a map for the first time. However, if repeated construction is needed, or alternate base colors are to be used for some reason, one should pass a custom function to generate instead (e.g. one that just looks up the color in a cached array).