[−][src]Struct oxygengine_procedural::world_2d::World2d
Implementations
impl World2d
[src]
pub fn new(
config: &World2dConfig,
simulation: Box<dyn World2dSimulation>
) -> Self
[src]
config: &World2dConfig,
simulation: Box<dyn World2dSimulation>
) -> Self
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]
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,
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]
T: World2dSimulation,
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]
&self,
range: Range<(usize, usize)>,
f: F
) -> Grid2d<T> where
F: FnMut(usize, usize, Scalar, Scalar, Scalar, Scalar) -> T,
T: Clone + Send + Sync,
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]
&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,
Trait Implementations
impl<S, '_> From<&'_ World2d> for World2dData<S> where
S: World2dSimulation + Clone,
[src]
S: World2dSimulation + Clone,
impl<S, '_> From<&'_ World2dData<S>> for World2d where
S: World2dSimulation + Clone,
[src]
S: World2dSimulation + Clone,
fn from(data: &World2dData<S>) -> Self
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,