redblobgames / dual-mesh

Dual polygon-triangle mesh code used in redblobgames's projects

Home Page:https://redblobgames.github.io/dual-mesh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Separate boundary/ghost phases from poisson disk creation

redblobgames opened this issue · comments

The create module combines:

  1. poisson disk point selection
  2. boundary point selection
  3. sanity checks
  4. ghost region/side/triangle creation

But all of these aren't always needed.

  • If using a pre-selected set of points, they need ghost creation but not the rest
  • Sometimes boundary points aren't needed with the poisson disk points
  • Sometimes boundary points are needed with the pre-selected points, but the module also inserts poisson disk points when there are boundary points

These should be split up so that the caller can choose which are needed.

Fixed by a5f5a8f