2019-08-23 19:56:21 +00:00
|
|
|
mod town;
|
|
|
|
|
|
|
|
// Reexports
|
2019-08-23 21:33:14 +00:00
|
|
|
pub use self::town::{TownGen, TownState};
|
2019-08-23 19:56:21 +00:00
|
|
|
|
2019-08-24 13:23:42 +00:00
|
|
|
use crate::{column::ColumnSample, util::Sampler};
|
2019-08-23 19:56:21 +00:00
|
|
|
use common::terrain::Block;
|
|
|
|
use vek::*;
|
|
|
|
|
2019-08-23 21:33:14 +00:00
|
|
|
pub trait Generator<'a, T: 'a>:
|
2019-08-24 13:23:42 +00:00
|
|
|
Sampler<'a, Index = (&'a T, Vec3<i32>, &'a ColumnSample<'a>), Sample = Option<Block>>
|
2019-08-23 21:33:14 +00:00
|
|
|
{
|
2019-08-24 13:23:42 +00:00
|
|
|
fn get_z_limits(&self, state: &'a T, wpos: Vec2<i32>, sample: &ColumnSample) -> (f32, f32);
|
2019-08-23 21:33:14 +00:00
|
|
|
}
|