[][src]Struct oxygengine_procedural::world_2d::World2d

pub struct World2d { /* fields omitted */ }

Implementations

impl World2d[src]

pub fn new(
    config: &World2dConfig,
    simulation: Box<dyn World2dSimulation>
) -> Self
[src]

pub fn generate<FA, FT, FH, FSW>(
    size: usize,
    simulation: Box<dyn World2dSimulation>,
    altitude_generator: FA,
    temperature_generator: FT,
    humidity_generator: FH,
    surface_water_generator: FSW
) -> Self where
    FA: FnMut(usize, usize) -> Scalar,
    FT: FnMut(usize, usize) -> Scalar,
    FH: FnMut(usize, usize) -> Scalar,
    FSW: FnMut(usize, usize) -> Scalar
[src]

pub fn stats(&self) -> &World2dStats[src]

pub fn size(&self) -> usize[src]

pub fn altitude(&self) -> &Grid2d<Scalar>[src]

pub fn temperature(&self) -> &Grid2d<Scalar>[src]

pub fn humidity(&self) -> &Grid2d<Scalar>[src]

pub fn surface_water(&self) -> &Grid2d<Scalar>[src]

pub fn simulation(&self) -> &dyn World2dSimulation[src]

pub fn as_simulation<T>(&self) -> Option<&T> where
    T: World2dSimulation
[src]

pub fn process(&mut self)[src]

pub fn remap_region<F, T>(
    &self,
    range: Range<(usize, usize)>,
    f: F
) -> Grid2d<T> where
    F: FnMut(usize, usize, Scalar, Scalar, Scalar, Scalar) -> T,
    T: Clone + Send + Sync
[src]

pub fn resample_region<F, T>(
    &self,
    range: Range<(usize, usize)>,
    margin: usize,
    f: F
) -> Grid2d<T> where
    F: FnMut(usize, usize, Grid2d<&Scalar>, Grid2d<&Scalar>, Grid2d<&Scalar>, Grid2d<&Scalar>) -> T,
    T: Clone + Send + Sync
[src]

Trait Implementations

impl<S, '_> From<&'_ World2d> for World2dData<S> where
    S: World2dSimulation + Clone
[src]

impl<S, '_> From<&'_ World2dData<S>> for World2d where
    S: World2dSimulation + Clone
[src]

Auto Trait Implementations

impl !RefUnwindSafe for World2d

impl Send for World2d

impl Sync for World2d

impl Unpin for World2d

impl !UnwindSafe for World2d

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.