Skip to main content
gamedev.net
🔒 Locked

Badouel's algorithm

Started by d4rksn0w Apr 11, 2002 at 12:59 AM 0 replies 900+ views
Original Post
d4rksn0w
d4rksn0w
I needed a fast triangle ray intersection algorithm for a collision detection. I found the subject here: http://www.acm.org/jgt/papers/MollerTrumbore97/badouel_code.html I have couple questions though. As I understand double *t, double *alpha, double *beta are parameters that are used just to return some additional info from the function, and they do not have to be initialized before calling the function. But what is the purpose of int i1, int i2 parameters? Are they just any number between 0 - 3 and i1 != i2 ??? Thanks.. "All things must change to something new, to something strange." -- Henry Wadsworth Longfellow
"All things must change to something new, to something strange."-- Henry Wadsworth Longfellow
coelurus
coelurus
It seems that they decide whether to use a pair of X, Y or Z coordinates to test the intersection point in the triangle. If you check the normal to the plane, i1 and i2 should be set to those two which have the smallest coordinates.

Or something like that

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.