BijectModifier
Quick facts | |
---|---|
Class | BijectModifier |
CellType | Unchanged |
CellDir | Unchanged |
CellRotation | Unchanged |
Bound | Unchanged |
Properties | Unchanged |
Requirements | None |
This modifier re-labels the cell co-ordinates of the underlying grid. You must pass a pair of functions, one which to the underlying grid from the new convention, and one that converts from the new convention to the underlying grid.
For example,
new BijectModifier(squareGrid, x => new Cell((x.x + x.y) / 2, (x.x - x.y) / 2, x.z), x => new Cell(x.x - x.y, x.x + x.y, x.z))
➡
Cell co-ordinates
Cell co-ordinates are changed according to user specified functions.