MCPcopy Create free account
hub / github.com/CNCKitchen/stlTexturizer / linkSlot

Function linkSlot

js/regularize.js:165–171  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

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];

Callers 2

regularizeMeshFunction · 0.85
tryCollapseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected