Mr.Freeze

02-18-2002, 08:18 PM

Hi,

I programmed an static OOB collision detection routine based on the separating axis' theorem. I want now to extend that routine to a dynamic collision detection routine but am not exactly sure about how to proceed. Can someone confirm/correct the following?? :

I want to detect if there was a collision between t=0 and t=T (and also be able to say when the first collision occured). Every rigid body has a translational speed and rotational speed. If I take T small enough, I can linearize the translational and rotational speed.

I have now to examine what's happening on every (every if I want to find the first collision) of my separating axis. Basically everything stays the same as with the static collision detection except that:

1. I have to extend the two boxes' projection (on a potential separating axis) by their translational speed multiplied by t (or only one by the difference of their transl. speed)

2. The two boxes' projection will also have to be extended/reduced by some amount and here's where I am not sure: Let's take one of these boxes with its axis vA0, vA1 and vA2 (v for vector). r0, r1 and r2 is the rotational speed around vA0, vA1 and vA2 (the order in which the rotations are performed is not important since r0, r1 and r2 are very small). We transform vA0,vA1 and vA2 in the following way:

vA0 is (1,0,0) and becomes (1,r0*t*r1*t+r2*t,r0*t*r2*t-r1*t)

vA1 is (0,1,0) and becomes (-r2*t,1-r0*t*r1*t*r2*t,r0*t-r1*t*r2*t)

vA2 is (0,0,1) and becomes (r1*t,-r0*t,1)

and I can use the same static collision detection routine! Is that right?

Thanks for your help http://www.opengl.org/discussion_boards/ubb/smile.gif

I programmed an static OOB collision detection routine based on the separating axis' theorem. I want now to extend that routine to a dynamic collision detection routine but am not exactly sure about how to proceed. Can someone confirm/correct the following?? :

I want to detect if there was a collision between t=0 and t=T (and also be able to say when the first collision occured). Every rigid body has a translational speed and rotational speed. If I take T small enough, I can linearize the translational and rotational speed.

I have now to examine what's happening on every (every if I want to find the first collision) of my separating axis. Basically everything stays the same as with the static collision detection except that:

1. I have to extend the two boxes' projection (on a potential separating axis) by their translational speed multiplied by t (or only one by the difference of their transl. speed)

2. The two boxes' projection will also have to be extended/reduced by some amount and here's where I am not sure: Let's take one of these boxes with its axis vA0, vA1 and vA2 (v for vector). r0, r1 and r2 is the rotational speed around vA0, vA1 and vA2 (the order in which the rotations are performed is not important since r0, r1 and r2 are very small). We transform vA0,vA1 and vA2 in the following way:

vA0 is (1,0,0) and becomes (1,r0*t*r1*t+r2*t,r0*t*r2*t-r1*t)

vA1 is (0,1,0) and becomes (-r2*t,1-r0*t*r1*t*r2*t,r0*t-r1*t*r2*t)

vA2 is (0,0,1) and becomes (r1*t,-r0*t,1)

and I can use the same static collision detection routine! Is that right?

Thanks for your help http://www.opengl.org/discussion_boards/ubb/smile.gif