pub struct Transition { /* private fields */ }Expand description
One transition of a terrain.
Implementations§
Source§impl Transition
impl Transition
Sourcepub fn draw_at(&self, shows: u8, hash: u64) -> Option<&str>
pub fn draw_at(&self, shows: u8, hash: u64) -> Option<&str>
The tile this transition draws on a tile whose neighbours, as bits
N 1, NE 2, … NW 128, show its terrain where set, for variant hash
hash; None where its table has no tile for the pattern.
Sourcepub fn draws(&self, shows: u8) -> bool
pub fn draws(&self, shows: u8) -> bool
Whether this transition draws anything on a tile whose neighbours
show its terrain as the bits of shows do.
Sourcepub const fn terrain(&self) -> usize
pub const fn terrain(&self) -> usize
The index of its terrain in Transitions::terrains.
pub const fn draw(&self) -> Draw
pub const fn model(&self) -> Model
Sourcepub const fn layer(&self) -> usize
pub const fn layer(&self) -> usize
The index in the profile’s ground layers of the layer its tiles go into: never the terrain layer, which keeps the painted terrain.
Sourcepub fn blends_with(&self, terrain: usize) -> bool
pub fn blends_with(&self, terrain: usize) -> bool
Whether it blends with the terrain at index terrain: the terrains
an outside transition draws onto, or the neighbours an inside one
draws an edge against.
pub const fn seed(&self) -> u32
Trait Implementations§
Source§impl Clone for Transition
impl Clone for Transition
Source§impl Debug for Transition
impl Debug for Transition
impl Eq for Transition
Source§impl PartialEq for Transition
impl PartialEq for Transition
impl StructuralPartialEq for Transition
Auto Trait Implementations§
impl Freeze for Transition
impl RefUnwindSafe for Transition
impl Send for Transition
impl Sync for Transition
impl Unpin for Transition
impl UnsafeUnpin for Transition
impl UnwindSafe for Transition
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