h3GetFaces method

  1. @override
List<int> h3GetFaces(
  1. BigInt h3Index
)
override

Find all icosahedron faces intersected by a given H3 index

Implementation

@override
List<int> h3GetFaces(BigInt h3Index) {
  final h3IndexInt = h3Index.toInt();
  return using((arena) {
    final size = _h3c.maxFaceCount(h3IndexInt);
    final out = arena<Int32>(size);
    _h3c.h3GetFaces(h3IndexInt, out);
    return out.asTypedList(size).where((e) => e != -1).toList();
  });
}