Skip to content

Function: findExtremeVertices()

findExtremeVertices(arr): object

Defined in: packages/core/src/scene-understanding/scene-understanding-system.ts:540

From a flat [x,y,z, x,y,z, ...] vertex buffer, return the vertices with the smallest and largest coordinate sum (x + y + z).

Equivalent to the previous flatToVec3Array(...) -> findMinMaxEntries(...) pipeline, but it scans the typed array directly and allocates only the two result objects instead of one object per vertex (thousands per mesh).

Parameters

arr

Float32Array

Returns

object

maxEntry

maxEntry: Vec3

minEntry

minEntry: Vec3

Privacy | Terms