pub struct TileSetPatternSource<'a, 'b, 'c> {
pub tile_map: &'a TileMap,
pub tile_set: &'b TileSet,
pub update: &'c MacroTilesUpdate,
pub property_id: TileSetPropertyNine,
}Expand description
An object that wraps a tile map, a tile set, an update, and the UUID of the property that is used to store the pattern of each tile, and then provides access to the pattern at any cell. It looks for the cell’s handle in the update, then in the tile map, and then uses the tile set to find the pattern.
Fields§
§tile_map: &'a TileMapThe tile map to get tile handles from.
tile_set: &'b TileSetThe tile set to get property values from.
update: &'c MacroTilesUpdateThe current set of modifications to the tile map.
When a cell has been modified, the updated handle will be used
instead of the handle stored in tile_map.
property_id: TileSetPropertyNineThe UUID of the property to use as the tile pattern.
Trait Implementations§
Source§impl PatternSource for TileSetPatternSource<'_, '_, '_>
impl PatternSource for TileSetPatternSource<'_, '_, '_>
Source§fn get(
&self,
position: &Vector2<i32>,
) -> TileConstraint<TileTerrainId, PatternBits> ⓘ
fn get( &self, position: &Vector2<i32>, ) -> TileConstraint<TileTerrainId, PatternBits> ⓘ
The constraint for the cell at the given position.
Source§type Position = Matrix<i32, Const<2>, Const<1>, ArrayStorage<i32, 2, 1>>
type Position = Matrix<i32, Const<2>, Const<1>, ArrayStorage<i32, 2, 1>>
The type of positions that need tiles.
Source§type Terrain = i8
type Terrain = i8
The type of the terrains that control which patterns are allowed at each position.
Source§type Pattern = PatternBits
type Pattern = PatternBits
The type of the patterns that the autotiler must choose for each position.
Source§fn get_terrain(&self, position: &Vector2<i32>) -> Option<TileTerrainId>
fn get_terrain(&self, position: &Vector2<i32>) -> Option<TileTerrainId>
The terrain of the pattern at the given position.
Auto Trait Implementations§
impl<'a, 'b, 'c> Freeze for TileSetPatternSource<'a, 'b, 'c>
impl<'a, 'b, 'c> !RefUnwindSafe for TileSetPatternSource<'a, 'b, 'c>
impl<'a, 'b, 'c> !Send for TileSetPatternSource<'a, 'b, 'c>
impl<'a, 'b, 'c> !Sync for TileSetPatternSource<'a, 'b, 'c>
impl<'a, 'b, 'c> Unpin for TileSetPatternSource<'a, 'b, 'c>
impl<'a, 'b, 'c> !UnwindSafe for TileSetPatternSource<'a, 'b, 'c>
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.