[][src]Struct fastwfc::Overlapping

pub struct Overlapping {
    pub periodic_input: bool,
    pub periodic_output: bool,
    pub out_height: u64,
    pub out_width: u64,
    pub symmetry: u8,
    pub ground: bool,
    pub pattern_size: u64,
}

Generat a new image with the overlapping WFC algorithm

Fields

periodic_input: bool

Toric input, defaults to false

periodic_output: bool

Toric output, defaults to false

out_height: u64

The height of the output in pixels

out_width: u64

The width of the output in pixels

symmetry: u8

Number of symmetries from 0 to 8 If the pattern already exist, increase its number of appearance.

ground: bool

Output image contains ground

The lowest middle pattern is used as a floor (and ceiling when the input is toric) and is placed at the lowest possible pattern position in the output image, on all its width. The pattern cannot be used at any other place in the output image.

Defaults to false

pattern_size: u64

Width and height in pixel of the patterns

Methods

impl Overlapping[src]

pub fn new(out_height: u64, out_width: u64, pattern_size: u64) -> Self[src]

Create a new Overlapping WFC generator

pub fn symmetry(&mut self, value: u8) -> &mut Self[src]

Set number of symmetries.

pub fn ground(&mut self, value: bool) -> &mut Self[src]

Set whether the generated image contains ground

pub fn periodic_input(&mut self, value: bool) -> &mut Self[src]

Set whether input is toric

pub fn periodic_output(&mut self, value: bool) -> &mut Self[src]

Set whether output is toric

pub fn generate(&self, input: RgbaImage, tries: u32) -> Option<RgbaImage>[src]

Generate WFC based on input image

Trait Implementations

impl Clone for Overlapping[src]

impl Copy for Overlapping[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for 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.

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

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

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

impl<T> SetParameter for T