Replaced old implementation of greedy mesher