Cage opened this issue on Feb 24, 2010 · 592 posts
Spanki posted Mon, 29 March 2010 at 2:34 PM
Quote - > Quote - #-----------------------------------------------------------------------------------
# looks like we still need the math error fix (also on the test above), though I'm
# guessing that this only happens when testing identical meshes. Hopefully it doesn't
# come back to bite us.
#
#if (t < -0.00000022) or ((s+t) - 1.0 > 0.00000006): continue # point is outside T
if (t < -0.00000022) or ((s+t) - 1.0 > 0.00000006):
#print vi,(t < -0.00000022),((s+t) - 1.0 > 0.00000006)
continue # point is outside T
#-----------------------------------------------------------------------------------
#if (t < 0.0) or ((s+t) - 1.0 > 0.0): continue # point is outside TIs the above something we may still need to worry about, in this port of the ray-casting back to PPy?
Uhm.. that code is already inside the code_snippet that I posted - it's basically part of the point_in_triangle() test, which is built-right in to that routine, for speed. I provided the fastest (and most correct) version of that code in the snippet. In other words, I removed the associated comments, because the code, as it is in there, is correct. If you prefer some other point_in_triangle() routine, you'd be replacing that code anyway.
Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.