gkjohnson / three-bvh-csg

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

Use only a single ray query for whole triangles #152

Closed gkjohnson closed 10 months ago

gkjohnson commented 10 months ago

Must ensure we have a triangle intersect function that will not allow rays to slip through gaps, though.

Related to #99, as well, since we can use this for clipped triangles, as well, if we know already that triangles are intersecting in a coplanar way.

gkjohnson commented 10 months ago

Potentially a savings of almost ~10% for the geometry example when using 1 sample for all geometry in addition to using a non-normal ray for sampling.