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

Function vertKey

js/meshValidation.js:339–345  ·  view source on GitHub ↗
(offset)

Source from the content-addressed store, hash-verified

337 const pos = geometry.attributes.position.array;
338 const triCount = pos.length / 9;
339
340 // Use a DataView to read float32 bits as uint32 for exact hashing
341 const dv = new DataView(pos.buffer, pos.byteOffset, pos.byteLength);
342
343 // Build a sortable key per vertex from raw float bits (exact, no quantization)
344 function vertKey(offset) {
345 // Read the 3 float32 values as uint32 bit patterns
346 const bx = dv.getUint32(offset, true);
347 const by = dv.getUint32(offset + 4, true);
348 const bz = dv.getUint32(offset + 8, true);

Callers 1

findOverlappingTrianglesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected