Can anyone recommend an efficient port to CSharp of any of the public AABB/triangle intersection algorithms.
I\'ve been looking at Moller\'s approach, described abst
I noticed a small bug in this implementation which leads to false negatives. If your triangle has one edge parallel to one axis (for example (1, 0, 0)), then you will have a null vector when computing
triangleEdges[i].Cross(boxNormals[j])
This will lead to equality in the test below and give you a false negative.
replace <= and >= by < and > at line
if (boxMax <= triangleMin || boxMin >= triangleMax)
(strict comparers to remove those cases).
Works well except for that!
Thank you