pointsAdjacentToPoint method

Set<int> pointsAdjacentToPoint(
  1. int i
)

Returns the indices of points adjacent to point i.

Implementation

Set<int> pointsAdjacentToPoint(int i) {
  final result = <int>{};

  for (int e = 0; e < triangleIndices.length; e++) {
    if (triangleIndices[e] == i) {
      result.add(triangleIndices[_nextEdge(e)]);
      result.add(triangleIndices[_prevEdge(e)]);
    }
  }

  return result;
}