Closed poke1024 closed 6 years ago
I'm not convinced that this buffer should be a member of TPPLPartition. If you want to reuse the buffer between calls, an alternate approach could be to provide it as an (optional) argument to Triangulate_EC.
Hm, it's this is only one allocation per Triangulate_EC
, and there's still one alloc per output triangle via TPPLPoly
, so I think it's not worth the API change. I feel this is kind of a hack myself. Closing this.
Saves an allocation inside
Triangulate_EC
by reusing the partition vertex buffer (and keeping it inside theTPPLPartition
, i.e. the buffer gets reused untilTPPLPartition
gets destroyed).