wasm-spatial-core
    Preparing search index...

    Function flipNormals

    • Flip normals to ensure consistent orientation toward the centroid.

      For each normal, checks if its dot product with the vector from the centroid to the point is positive. If not, the normal is negated.

      Arguments

      • normals — Flat Float32Array [nx0,ny0,nz0, ...].
      • positions — Flat Float32Array [x0,y0,z0, ...].

      Returns

      Float32Array with consistently oriented normals.

      Parameters

      • normals: Float32Array
      • positions: Float32Array

      Returns Float32Array