Function geometry_tools::vectors::calculate_smooth_normals[][src]

pub fn calculate_smooth_normals(
    positions: &[Vec3A],
    indices: &[i32]
) -> Vec<Vec3A>
Expand description

Calculates smooth per-vertex normals by calculating normals for each face and averaging over the vertices. indices is assumed to contain triangle indices for positions, so indices.len() should be a multiple of 3. If either of positions or indices is empty, the result is empty.