gkjohnson / three-bvh-csg

A flexible, memory compact, fast and dynamic CSG implementation on top of three-mesh-bvh
MIT License
602 stars 46 forks source link

TriangleSplitter: track triangle side for discarding #44

Closed gkjohnson closed 2 years ago

gkjohnson commented 2 years ago

Fix #35

TODO

gkjohnson commented 2 years ago

Some moderate improvements - it doesn't seem immediately obvious how to consistently determine triangle sided-ness based on just the set of intersecting triangles.

Saves a few milliseconds in the "simple" example (~14ms -> 12ms in worst box / sphere case, ~12-> 8.5ms in a sphere / sphere case -- ~15-30% improvement) and about half a second in the "complex" example (~2500ms -> ~2000ms or 20% improvement)