Show / Hide Table of Contents

Struct DirectionSet

Wrapper around DirectionsType supplying some convenience data.

Implements
IEnumerable<Direction>
IEnumerable
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
Namespace: DeBroglie.Topo
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
Type Description
DirectionSet
| Edit this page View Source

Cartesian3d

The Directions associated with cubic grids.

Declaration
public static readonly DirectionSet Cartesian3d
Field Value
Type Description
DirectionSet
| 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
Type Description
DirectionSet
| 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
Type Description
DirectionSet

Properties

| Edit this page View Source

Count

Declaration
public int Count { get; }
Property Value
Type Description
int
| Edit this page View Source

DX

Declaration
public int[] DX { get; }
Property Value
Type Description
int[]
| Edit this page View Source

DY

Declaration
public int[] DY { get; }
Property Value
Type Description
int[]
| Edit this page View Source

DZ

Declaration
public int[] DZ { get; }
Property Value
Type Description
int[]
| Edit this page View Source

Type

Declaration
public DirectionSetType Type { get; }
Property Value
Type Description
DirectionSetType

Methods

| Edit this page View Source

GetDirection(int, int, int)

Declaration
public Direction GetDirection(int x, int y, int z = 0)
Parameters
Type Name Description
int x
int y
int z
Returns
Type Description
Direction
| Edit this page View Source

GetEnumerator()

Declaration
public IEnumerator<Direction> GetEnumerator()
Returns
Type Description
IEnumerator<Direction>
| 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
Type Name Description
Direction d
Returns
Type Description
Direction

Implements

IEnumerable<T>
IEnumerable
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX