getVoronoiFacetList method

(VecVecPoint2f, VecPoint2f) getVoronoiFacetList(
  1. VecI32 idx
)

Implementation

(VecVecPoint2f facetList, VecPoint2f facetCenters) getVoronoiFacetList(VecI32 idx) {
  return using<(VecVecPoint2f, VecPoint2f)>((arena) {
    final pf = calloc<cimgproc.VecVecPoint2f>();
    final pfc = calloc<cimgproc.VecPoint2f>();
    cvRun(() => cimgproc.Subdiv2D_GetVoronoiFacetList(ref, idx.ref, pf, pfc));
    return (VecVecPoint2f.fromPointer(pf), VecPoint2f.fromPointer(pfc));
  });
}