[−][src]Struct semeion::env::NeighborHood
The neighbor tiles of a specific entity.
Implementations
impl<'a, I: Eq + Hash + Debug, K, C, T, E> NeighborHood<'a, I, K, C, T, E>
[src]
pub fn bounds(&self) -> Bounds
[src]
Gets the bounds of this neighborhood.
pub fn tiles(&self) -> &Vec<TileView<'a, I, K, C, T, E>>
[src]
Gets the list of tiles included in this NeighborHood.
pub fn tile(&self, offset: Offset) -> &TileView<'a, I, K, C, T, E>
[src]
Gets the tile located at the given offset from the center of this NeighborHood. The NeighborHood is seen as a Torus from this method, therefore, out of bounds offsets will be translated considering that the NeighborHood edges are joined.
pub fn center(&self) -> &TileView<'a, I, K, C, T, E>
[src]
Gets the tile located in the center of this NeighborHood.
pub fn border(
&self,
offset: Offset,
scope: Scope
) -> Option<Vec<&TileView<'a, I, K, C, T, E>>>
[src]
&self,
offset: Offset,
scope: Scope
) -> Option<Vec<&TileView<'a, I, K, C, T, E>>>
Gets a list of tiles that surround the tile T of this NeighborHood, located at a given Offset from the center tile, and according to the given Scope, that represents the distance from the tile T. The tiles are returned in arbitrary order. Returns None if any of the border tiles is out of the NeighborHood bounds for the given Scope.
Trait Implementations
impl<'a, I: Debug + Eq + Hash, K: Debug, C: Debug, T: Debug, E: Debug> Debug for NeighborHood<'a, I, K, C, T, E>
[src]
impl<'a, I: Eq + Hash + Debug, K, C, T, E> From<Vec<TileView<'a, I, K, C, T, E>>> for NeighborHood<'a, I, K, C, T, E>
[src]
Auto Trait Implementations
impl<'a, I, K, C, T, E> !RefUnwindSafe for NeighborHood<'a, I, K, C, T, E>
impl<'a, I, K, C, T, E> !Send for NeighborHood<'a, I, K, C, T, E>
impl<'a, I, K, C, T, E> !Sync for NeighborHood<'a, I, K, C, T, E>
impl<'a, I, K, C, T, E> Unpin for NeighborHood<'a, I, K, C, T, E> where
I: Unpin,
I: Unpin,
impl<'a, I, K, C, T, E> !UnwindSafe for NeighborHood<'a, I, K, C, T, E>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,