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.
normals
Float32Array
[nx0,ny0,nz0, ...]
positions
[x0,y0,z0, ...]
Float32Array with consistently oriented normals.
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— FlatFloat32Array[nx0,ny0,nz0, ...].positions— FlatFloat32Array[x0,y0,z0, ...].Returns
Float32Arraywith consistently oriented normals.