VecVecPoint3f.generate constructor
VecVecPoint3f.generate(
- int length,
- VecPoint3f generator(
- int i
- bool dispose = true,
Implementation
factory VecVecPoint3f.generate(int length, VecPoint3f Function(int i) generator, {bool dispose = true}) {
final pp = calloc<cvg.VecVecPoint3f>()..ref.length = length;
pp.ref.ptr = calloc<cvg.VecPoint3f>(length);
for (var i = 0; i < length; i++) {
final v = generator(i);
pp.ref.ptr[i] = v.ref;
if (dispose) v.dispose();
}
return VecVecPoint3f.fromPointer(pp);
}