Method GetAdjacentCells
- Namespace
- GeometryHelper.Meshing
- Assembly
- GeometryHelper.dll
GetAdjacentCells(int)
Gets the cells that share part of a face with a cell: its neighbours along the grid's axes, where no joint stands between and their material meets over some area.
public int[] GetAdjacentCells(int index)
Parameters
Returns
Remarks
Two pieces of one cell never share a face, and pieces of neighbouring cells only where they meet: across the notch of a U, the piece of one arm meets only the cell beside it in that arm. A neighbour is found where it meets the cell, not by its indexes: a cut moved onto a corner can leave the next cell along an axis empty and the one after meeting this one, and the slabs and bars, each cut to its own corners, can leave a cell meeting one beside the next.
Exceptions
- ArgumentOutOfRangeException
Thrown when there is no such cell.