[−][src]Struct fastwfc::Overlapping
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]
fn clone(&self) -> Overlapping
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Overlapping
[src]
Auto Trait Implementations
impl Sync for Overlapping
impl Send for Overlapping
impl Unpin for Overlapping
impl UnwindSafe for Overlapping
impl RefUnwindSafe for Overlapping
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,