imglib / imglib2-mesh

Proposal for a Java mesh library built from code from imagej-mesh and imagej-ops.
BSD 2-Clause "Simplified" License
4 stars 0 forks source link

Function that tests whether a 3D point is inside a mesh. #2

Closed tinevez closed 1 year ago

tinevez commented 1 year ago

Because we use the perturbation in Z trick, it is not strictly an interior test. It tries to have decent performance, without using AABB meshes, by using an fast face retrieval:

This algo can deal with border cases where the ray crosses an edge between two triangles that may or may not correspond to crossing the mesh.

Its absolute performance was not judged as fantastic by Ella with 0.2ms / point :) but we don't know yet how other implementations fare. https://imagesc.zulipchat.com/#narrow/stream/391996-.5B2023-06.5D-scenery.2Bsciview-hackathon-dresden/topic/Half-edge.20data.20structure.20in.20Java

tinevez commented 1 year ago

Done! Careful again, I git-push-forced.