Skip to content

Commit

Permalink
flatten geometry after decimation
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed Dec 17, 2024
1 parent e2f20bd commit e01eefd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mittsu/mesh_analysis/modifiers/decimator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ def decimate(target_face_count, vertex_splits: false)
loop do
break if @geometry.faces.count <= target_face_count
edge = edge_collapses.shift
splits.unshift @geometry.collapse(edge[:edge_index])
splits.unshift @geometry.collapse(edge[:edge_index], flatten: false)
end
# Return vertex splits if requested
@geometry.flatten!
if vertex_splits
[@geometry, splits]
else
Expand Down

0 comments on commit e01eefd

Please sign in to comment.