Skip to main content

TileTerrain

Trait TileTerrain 

Source
pub trait TileTerrain {
    type Pattern;

    // Required method
    fn all_patterns(&self) -> impl Iterator<Item = &Self::Pattern>;
}
Expand description

For autotiling, tiles are grouped into patterns, and patterns are grouped into terrains. Each cell that is to be autotiled is given a terrain, and the autotiler must choose a pattern from within that terrain.

Required Associated Types§

Source

type Pattern

The type of the patterns within this terrain.

Required Methods§

Source

fn all_patterns(&self) -> impl Iterator<Item = &Self::Pattern>

Iterate through the patterns within the terrain in the order of priority. The autotiler will proceed through this iterator until it finds a pattern that is legal according to the constraints, then ignore any remaining patterns.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§