Cage opened this issue on Dec 20, 2006 · 1232 posts
Spanki posted Fri, 07 March 2008 at 4:26 PM
Ok, I just ported that over to my plugin and... I can't say whether it's faster or not (not an issue in my plugin :) ), I can see how it could be faster, since in the worst-case, it does 8 total multiplies and one divide (once you remove the stuff that's already done in linecast_loop()). Verses 11 multiples and 2 divides. It can also fail faster and in more places, keeping many of those multiplies from happening (best-case is only 2 multiples, vs. 9 multiplies and one divide in the current code).
As for it's robustness, without any tolerance values added, it appears to work more reliably than the other routines do without any tolerance values added, but it's still missing some hits. It's currently not as reliable as my current implementation, with the epsilon/tolerance values I gave you the other day.
If this code is significantly faster than my current code (?), I can mess around with it and see if I can make it work better.
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.