Jump to content

Talk:Möller–Trumbore intersection algorithm

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

The pseudocode section is pretty bad. If you need to pass objects by reference in your code and use preprocessor macros, it's not pseudocode and it's not useful for describing the algorithm to a general audience. — Preceding unsigned comment added by 108.20.56.242 (talk) 16:24, 25 March 2017 (UTC)[reply]

@MaxS 33:: I'm not sure I understand your changes to the pseudo code. A feature of the Möller-Trumbore algorithm is that it returns the barycentric coordinates of the intersection on the triangle. But after your changes to it, it doesn't do that anymore. ImTheIP (talk) 09:50, 17 September 2017 (UTC)[reply]

@ImTheIP:: I put the intersection point calculation back. I previously took it out just to play it safe because I am using the Lighthouse3D implementation as a reference and didn't want to see complaints about deviating too much from the reference implementation. The Lighthouse3D version mentions t in a comment, but only returns true or false. I tested this implementation, including the intersection point calculation, as part of a bigger ray casting program. MaxS_33

I see. I think that our example code should stay as true to the original implementation given in the paper as possible. We can list alternatives that we find too, preferably from published sources. ImTheIP (talk) 22:01, 17 September 2017 (UTC)[reply]