OBB and SAT Question

Started by
19 comments, last by Sawiner 13 years, 1 month ago
I apologize ahead for bringing this thread up again, however I am facing with similar function and I think it will fit the best into here.

much like Raeldor (I think) , I am failing to understand how the projected radiuses of the cross product vectors are found;
I didn't saw any response to it on this thread too.

According to 'jyk' and 'Christer Ericson' , the general formula is:
[color=#1C2837][font=CourierNew, monospace][size=2]r = e[sub]0[/sub]|A[sub]0[/sub].N| + e[sub]1[/sub]|A[sub]1[/sub].N| + e[sub]2[/sub]|A[sub]2[/sub].N|[/font]
[color=#1C2837][font=CourierNew, monospace][size=2]
[/font]
[font="Arial"][color="#1C2837"]for the cross product of vectors uA0 and uA1, regarding the projected radius of a;[/font]
[font="Arial"][color="#1C2837"]
[/font]
[font="Arial"][color="#1C2837"]ra =[/font]
[font="Arial"][color="#1C2837"] eA0 * |dot(uA0, N)| + [/font]
[font="Arial"][color="#1C2837"] eA1 * |dot(uA1, N)| +[/font]
[font="Arial"][color="#1C2837"] eA2 * |dot(uA2, N)|;[/font]
[font="Arial"][color="#1C2837"]
[/font]
[font="Arial"][color="#1C2837"]

I believe the first line can be removed since N has a 90º angle with uA0 and cos(90) = 0 ...[/font]
[font="Arial"][color="#1C2837"]


[/font]
[font="Arial"][color="#1C2837"]

regarding the second line:[/font]
[font="Arial"][color="#1C2837"]
[/font]
[font="Arial"][color="#1C2837"]N is (right handed cross product):[/font]
[font="Arial"][color="#1C2837"]
N.x = (uA0.y*uA1.z) - (uA0.z*uA1.y);
N.y = (uA0.z*uA1.x) - (uA0.x*uA1.z);
N.z = (uA0.x*uA1.y) - (uA0.y*uA1.z);

so further expanding the second line (ignoring the third one, for now)
eA1 * dot(uA1, N) = eA1 * (
uA1.x * (uA0.y*uA1.z) - (uA0.z*uA1.y) +
uA1.y * (uA0.z*uA1.x) - (uA0.x*uA1.z) +
uA1.z * (uA0.x*uA1.y) - (uA0.y*uA1.z)
);

To be honest, I even opened it further on, on a paper; I won't do it here though, since I didn't end up nowhere.
I do know in the table it listed that: ra = eA1 * |r20| + eA2*|r10|
hence the expanded value of dot(uA1, cross(uA0, uB0)) should be equal to r20.
however, in r20, we actually have dot(uA2, uB0);

I believe i'm missing something, but I can't find a direct connection between the 2 terms.
What am I missing then?

p.s.
I apologize for my notation in here; I'm not familiar with any better way to do so, not in a forum post anyway.[/font]

This topic is closed to new replies.

Advertisement