Computes the mesh's vertex normals inplace using an area weighted average of the adjacent triangle faces The method will panic if the length of the output slice is different from the number of vertices of the mesh. The method does not make any assumptions about the values in the output slice.
(&self, normals: &mut [Unit<Vector3<R>>])
| 911 | /// |
| 912 | /// The method does not make any assumptions about the values in the output slice. |
| 913 | pub fn vertex_normals_inplace(&self, normals: &mut [Unit<Vector3<R>>]) { |
| 914 | assert_eq!(normals.len(), self.vertices.len()); |
| 915 | |
| 916 | for normal in normals.iter_mut() { |
| 917 | normal.as_mut_unchecked().fill(R::zero()); |
| 918 | } |
| 919 | |
| 920 | self.vertex_normals_inplace_assume_zeroed(normals); |
| 921 | } |
| 922 | |
| 923 | /// Computes the mesh's vertex normals using an area weighted average of the adjacent triangle faces |
| 924 | pub fn vertex_normals(&self) -> Vec<Unit<Vector3<R>>> { |
nothing calls this directly
no test coverage detected