Struct DirectionSet
Wrapper around DirectionsType supplying some convenience data.
Assembly: DeBroglie.dll
Syntax
public struct DirectionSet : IEnumerable<Direction>, IEnumerable
Fields
|
Edit this page
View Source
Cartesian2d
The Directions associated with square grids.
Declaration
public static readonly DirectionSet Cartesian2d
Field Value
|
Edit this page
View Source
Cartesian3d
The Directions associated with cubic grids.
Declaration
public static readonly DirectionSet Cartesian3d
Field Value
|
Edit this page
View Source
Hexagonal2d
The Directions associated with hexagonal grids.
Conventially, x is treated as moving right, and y as moving down and left,
But the same Directions object will work just as well will several other conventions
as long as you are consistent.
Declaration
public static readonly DirectionSet Hexagonal2d
Field Value
|
Edit this page
View Source
Hexagonal3d
The Directions associated with grids of hexagon prisms.
x is right, and z as moving down and left, y is up (prism axis), and w is the same as one unity of x and z.
Note due to some stupid design descisions, you cannot use Direction.WPlus right now.
Declaration
public static readonly DirectionSet Hexagonal3d
Field Value
Properties
|
Edit this page
View Source
Count
Declaration
public int Count { get; }
Property Value
|
Edit this page
View Source
DX
Declaration
Property Value
|
Edit this page
View Source
DY
Declaration
Property Value
|
Edit this page
View Source
DZ
Declaration
Property Value
|
Edit this page
View Source
Type
Declaration
public DirectionSetType Type { get; }
Property Value
Methods
|
Edit this page
View Source
GetDirection(int, int, int)
Declaration
public Direction GetDirection(int x, int y, int z = 0)
Parameters
Returns
|
Edit this page
View Source
GetEnumerator()
Declaration
public IEnumerator<Direction> GetEnumerator()
Returns
|
Edit this page
View Source
Inverse(Direction)
Given a direction index, returns the direction index that makes the reverse movement.
Declaration
public Direction Inverse(Direction d)
Parameters
Returns
Implements