[][src]Struct amethyst_tiles::TileMap

pub struct TileMap<T: Tile, E: CoordinateEncoder = MortonEncoder2D> { /* fields omitted */ }

Concrete implementation of a generic 3D TileMap component. Accepts a Tile type and CoordinateEncoder type, creating a flat 1D array storage which is spatially partitioned utilizing the provided encoding scheme.

The default encoding scheme is MortonEncoder2D, which allows for arbitrary X, Y and Z coordinate sizes while still spatially partitioning each z-level. For more efficient Z-order encoding, use MortonEncoder which requires cubic map dimensions but provides for much greater spatial efficiency.


impl<T: Tile, E: CoordinateEncoder> TileMap<T, E>[src]

pub fn version(&self) -> u64[src]

Versioning for change cache management

pub fn new(
    dimensions: Vector3<u32>,
    tile_dimensions: Vector3<u32>,
    sprite_sheet: Option<Handle<SpriteSheet>>
) -> Self

Create a new instance of TileMap.

Trait Implementations

impl<T: Tile, E: CoordinateEncoder> Asset for TileMap<T, E>[src]

type Data = Self

The Data type the asset can be created from.

type HandleStorage = HashMapStorage<Handle<Self>>

The ECS storage type to be used. You'll want to use DenseVecStorage in most cases.

impl<T: Clone + Tile, E: Clone + CoordinateEncoder> Clone for TileMap<T, E>[src]

impl<T: Tile, E: CoordinateEncoder> Component for TileMap<T, E>[src]

type Storage = HashMapStorage<Self>

Associated storage type for this component.

impl<T: Debug + Tile, E: Debug + CoordinateEncoder> Debug for TileMap<T, E>[src]

impl<'de, T: Tile, E: CoordinateEncoder> Deserialize<'de> for TileMap<T, E> where
    T: Deserialize<'de>,
    E: Default

impl<T: Tile, E: CoordinateEncoder> Map for TileMap<T, E>[src]

impl<T: Tile, E: CoordinateEncoder> MapStorage<T> for TileMap<T, E>[src]

impl<T: PartialEq + Tile, E: PartialEq + CoordinateEncoder> PartialEq<TileMap<T, E>> for TileMap<T, E>[src]

impl<T: Tile, E: CoordinateEncoder> Serialize for TileMap<T, E> where
    T: Serialize

impl<T: Tile, E: CoordinateEncoder> StructuralPartialEq for TileMap<T, E>[src]

Auto Trait Implementations

impl<T, E> RefUnwindSafe for TileMap<T, E> where
    E: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, E> Send for TileMap<T, E>

impl<T, E> Sync for TileMap<T, E>

impl<T, E> Unpin for TileMap<T, E> where
    E: Unpin,
    T: Unpin

impl<T, E> UnwindSafe for TileMap<T, E> where
    E: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Clone for T where
    T: Clone

impl<T> Config for T where
    T: for<'a> Deserialize<'a> + Serialize

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 

impl<T> Event for T where
    T: Send + Sync + 'static, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ProcessableAsset for T where
    T: Asset<Data = T>, 

impl<T> Resource for T where
    T: Any + Send + Sync

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Serialize for T where
    T: Serialize + ?Sized

impl<T> SetParameter for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> Supports<T> for T

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,