pub struct Tile<T, const N: usize> {
pub additional: T,
pub weight: u32,
pub mask: [[Vec<bool>; N]; N],
}Expand description
Stucture for holding the maching rules and assocatied data for a tile type. T: assocatied data tye N: the pattern size. MUST BE ODD
Fields§
§additional: TAdditional data type, such as pixel value for image generation.
weight: u32The freqency the tile should appear at, as a fraction of the sum of the weights of all tiles.
mask: [[Vec<bool>; N]; N]A table of allowable ageccent tyles 0 : allowed 1 : disllowed
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T, const N: usize> Freeze for Tile<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for Tile<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for Tile<T, N>where
T: Send,
impl<T, const N: usize> Sync for Tile<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for Tile<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for Tile<T, N>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more