mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-20 17:06:07 +00:00
Simplify
This commit is contained in:
parent
5c3b5c736e
commit
64906e8684
@ -15,9 +15,7 @@ pub fn export(mesh: &Mesh) -> anyhow::Result<()> {
|
||||
let mut triangles = Vec::new();
|
||||
|
||||
for triangle in mesh_triangles {
|
||||
let triangle_vertices = triangle;
|
||||
|
||||
let triangle_indices = triangle_vertices.map(|vertex| {
|
||||
let triangle_indices = triangle.map(|vertex| {
|
||||
*indices_by_vertex.entry(vertex).or_insert_with(|| {
|
||||
let index = vertices.len();
|
||||
vertices.push(vertex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user