Enum SquareEdgeDirection
Identifies which of the two canonical edge orientations a SquareEdgeCoord represents relative to its anchor cell.
Namespace: Scylla.Core.Structures
Assembly: ScyllaCore.dll
Syntax
public enum SquareEdgeDirection
Remarks
Each interior edge in a square grid is shared by exactly two adjacent cells. To avoid storing the same edge twice (once per cell), the canonical representation assigns every edge to a unique owner cell and a direction:
- The N edge of cell (c, r) is the horizontal edge at the top of that cell. The same physical edge is the south edge of cell (c, r-1); it is not given its own canonical entry - queries for the south edge of (c, r) should look up the N edge of (c, r+1).
- The W edge of cell (c, r) is the vertical edge at the left of that cell. The same physical edge is the east edge of cell (c-1, r); queries for the east edge of (c, r) should look up the W edge of (c+1, r).
This two-direction encoding keeps the edge address space compact and is used by SquareEdgeCoord, SquareEdgeMap<TData>, and the static topology helpers on SquareEdgeCoord and SquareCornerCoord.
Fields
| Name | Description |
|---|---|
| N | The top horizontal edge of the anchor cell, shared with the cell directly above (row - 1). Equivalent to the south edge of cell (c, r-1). |
| W | The left vertical edge of the anchor cell, shared with the cell directly to the left (col - 1). Equivalent to the east edge of cell (c-1, r). |