void InitializeCellProjection()
{
if (initializedCellProjection)
return;
initializedCellProjection = true;
cellProjection = new CellLayer<PPos[]>(this);
inverseCellProjection = new CellLayer<List<MPos>>(this);
// Initialize collections
foreach (var cell in AllCells)
{
var uv = cell.ToMPos(Grid.Type);
cellProjection[uv] = new PPos[0];
inverseCellProjection[uv] = new List<MPos>();
}
// Initialize projections
foreach (var cell in AllCells)
UpdateProjection(cell);
}