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

Function sharedFaceCount

js/decimation.js:324–333  ·  view source on GitHub ↗
(faces, vfHead, slotFace, slotNext, v1, v2)

Source from the content-addressed store, hash-verified

322function buildLinkedAdj(faces, faceCount, vertCount) {
323 const S = faceCount * 3;
324 const vfHead = new Int32Array(vertCount).fill(-1);
325 const slotFace = new Int32Array(S);
326 const slotVert = new Int32Array(S);
327 const slotNext = new Int32Array(S).fill(-1);
328 const slotPrev = new Int32Array(S).fill(-1);
329 const faceSlot = new Int32Array(S).fill(-1);
330 for (let f = 0; f < faceCount; f++) {
331 if (faces[f * 3] < 0) continue;
332 for (let k = 0; k < 3; k++) {
333 const v = faces[f * 3 + k];
334 const s = f * 3 + k;
335 slotFace[s] = f;
336 slotVert[s] = v;

Callers 1

decimateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected