I've read Tomas Moller's "A Fast Triangle-Triangle Intersection Test" article and I'm using his code, but if the two triangles share a single vertex the function always returns true.
I need to be able to test if two triangles sharing a single vertex are intersecting.
Re: Triangle-Triangle intersection
yes i had the sample problem, (nature of computer precision etc) anyways of the 15 or so tri-tri intersection tests i have seen only a couple actually work 100% the rest fall down (as in they will report sometimes hit or sometimes miss) when u get to shared edges/points. one was based on Tomas Moller's code (by a finnish guy who worked on some visual determination software) sorry i cant be more helpful, but search here
from about a couple of years ago.
personally i cant believe this is a bigger issue eg not tri-tri but tri-ray
ok here we have a quad divided into 2 triangles right, sharing the same edge. say u have a ray aimed at the quad passing through the shared edge 90% of tri-ray tests will report it didnt hit either of the tris (in some cases).
another possible method u could use (safer but slower) is to do a tri-tri distance test dave eberly's magicsoftware has lots of code for this