[−][src]Enum beehive::Direction
All hex directions in sequential order.
- Starting from North-east in clockwise order in in pointy grids where +X = East and +Y = North-east.
- Starting from North in clockwise order in in flat grids where +X = North-east and +Y = North.
Variants
Methods
impl Direction
[src]
pub fn clockwise(self) -> Direction
[src]
Returns the direction rotated "clockwise" around the W axis. UP
and
DOWN
are returned unchanged.
pub fn counter_clockwise(self) -> Direction
[src]
Returns the direction rotated "counter-clockwise" around the W axis.
UP
and DOWN
are returned unchanged.
pub fn iter() -> Directions
[src]
Returns an iterator through all Direction
s, including UP
and DOWN
.
pub fn iter_planar() -> PlanarDirections
[src]
Returns an iterator through planar Direction
s, excluding UP
and DOWN
.
Trait Implementations
impl<T> Add<Direction> for Point<T> where
T: Zero + One + Add + Neg<Output = T>,
[src]
T: Zero + One + Add + Neg<Output = T>,
type Output = Point<T>
The resulting type after applying the +
operator.
fn add(self, rhs: Direction) -> Self::Output
[src]
impl<T> Add<Direction> for PointAxial<T> where
T: Zero + One + Add + Neg<Output = T>,
[src]
T: Zero + One + Add + Neg<Output = T>,
type Output = PointAxial<T>
The resulting type after applying the +
operator.
fn add(self, rhs: Direction) -> Self::Output
[src]
impl<T> Add<Direction> for Vector<T> where
T: Zero + One + Add + Neg<Output = T>,
[src]
T: Zero + One + Add + Neg<Output = T>,
type Output = Vector<T>
The resulting type after applying the +
operator.
fn add(self, rhs: Direction) -> Self::Output
[src]
impl<T> Add<Direction> for VectorAxial<T> where
T: Zero + One + Add + Neg<Output = T>,
[src]
T: Zero + One + Add + Neg<Output = T>,
type Output = VectorAxial<T>
The resulting type after applying the +
operator.
fn add(self, rhs: Direction) -> Self::Output
[src]
impl<T> AddAssign<Direction> for Point<T> where
T: Zero + One + AddAssign<T> + Neg<Output = T>,
[src]
T: Zero + One + AddAssign<T> + Neg<Output = T>,
fn add_assign(&mut self, rhs: Direction)
[src]
impl<T> AddAssign<Direction> for PointAxial<T> where
T: Zero + One + AddAssign<T> + Neg<Output = T>,
[src]
T: Zero + One + AddAssign<T> + Neg<Output = T>,
fn add_assign(&mut self, rhs: Direction)
[src]
impl<T> AddAssign<Direction> for Vector<T> where
T: Zero + One + AddAssign<T> + Neg<Output = T>,
[src]
T: Zero + One + AddAssign<T> + Neg<Output = T>,
fn add_assign(&mut self, rhs: Direction)
[src]
impl<T> AddAssign<Direction> for VectorAxial<T> where
T: Zero + One + AddAssign<T> + Neg<Output = T>,
[src]
T: Zero + One + AddAssign<T> + Neg<Output = T>,
fn add_assign(&mut self, rhs: Direction)
[src]
impl Clone for Direction
[src]
impl Copy for Direction
[src]
impl Debug for Direction
[src]
impl<'de> Deserialize<'de> for Direction
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Direction
[src]
impl Hash for Direction
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> Index<Direction> for DirectionMap<T>
[src]
impl<T> IndexMut<Direction> for DirectionMap<T>
[src]
impl Neg for Direction
[src]
impl PartialEq<Direction> for Direction
[src]
impl Serialize for Direction
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Direction
[src]
impl StructuralPartialEq for Direction
[src]
impl<T> Sub<Direction> for Point<T> where
T: Zero + One + Sub<Output = T> + Neg<Output = T>,
[src]
T: Zero + One + Sub<Output = T> + Neg<Output = T>,
type Output = Point<T>
The resulting type after applying the -
operator.
fn sub(self, rhs: Direction) -> Self::Output
[src]
impl<T> Sub<Direction> for PointAxial<T> where
T: Zero + One + Sub<Output = T> + Neg<Output = T>,
[src]
T: Zero + One + Sub<Output = T> + Neg<Output = T>,
type Output = PointAxial<T>
The resulting type after applying the -
operator.
fn sub(self, rhs: Direction) -> Self::Output
[src]
impl<T> Sub<Direction> for Vector<T> where
T: Zero + One + Sub<Output = T> + Neg<Output = T>,
[src]
T: Zero + One + Sub<Output = T> + Neg<Output = T>,
type Output = Vector<T>
The resulting type after applying the -
operator.
fn sub(self, rhs: Direction) -> Self::Output
[src]
impl<T> Sub<Direction> for VectorAxial<T> where
T: Zero + One + Sub<Output = T> + Neg<Output = T>,
[src]
T: Zero + One + Sub<Output = T> + Neg<Output = T>,
type Output = VectorAxial<T>
The resulting type after applying the -
operator.
fn sub(self, rhs: Direction) -> Self::Output
[src]
impl<T> SubAssign<Direction> for Point<T> where
T: Zero + One + SubAssign<T> + Neg<Output = T>,
[src]
T: Zero + One + SubAssign<T> + Neg<Output = T>,
fn sub_assign(&mut self, rhs: Direction)
[src]
impl<T> SubAssign<Direction> for PointAxial<T> where
T: Zero + One + SubAssign<T> + Neg<Output = T>,
[src]
T: Zero + One + SubAssign<T> + Neg<Output = T>,
fn sub_assign(&mut self, rhs: Direction)
[src]
impl<T> SubAssign<Direction> for Vector<T> where
T: Zero + One + SubAssign<T> + Neg<Output = T>,
[src]
T: Zero + One + SubAssign<T> + Neg<Output = T>,
fn sub_assign(&mut self, rhs: Direction)
[src]
impl<T> SubAssign<Direction> for VectorAxial<T> where
T: Zero + One + SubAssign<T> + Neg<Output = T>,
[src]
T: Zero + One + SubAssign<T> + Neg<Output = T>,
fn sub_assign(&mut self, rhs: Direction)
[src]
impl TryFrom<u8> for Direction
[src]
type Error = NotDirection
The type returned in the event of a conversion error.
fn try_from(num: u8) -> Result<Self, NotDirection>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Direction
impl Send for Direction
impl Sync for Direction
impl Unpin for Direction
impl UnwindSafe for Direction
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,