(s)
| 163 | // vertex → incident triangles, as intrusive doubly-linked lists of corner |
| 164 | // slots over typed arrays (replaces one JS Set per vertex — far lighter on |
| 165 | // multi-million-vertex meshes and allocation-free per collapse). |
| 166 | // Slot s = corner index (t*3+k); the vertex owning slot s is corners[s]. |
| 167 | // Deleted wings and moved corners are unlinked, so each vertex's list |
| 168 | // contains exactly its alive incident corners. |
| 169 | const vfHead = new Int32Array(nextVid).fill(-1); |
| 170 | const slotNext = new Int32Array(triCount * 3); |
| 171 | const slotPrev = new Int32Array(triCount * 3); |
| 172 | function linkSlot(s) { |
| 173 | const v = corners[s]; |
| 174 | const h = vfHead[v]; |
no outgoing calls
no test coverage detected