Code center > Darwinbots3
Collision detection tests
Numsgil:
Hey Peter, are you still interested in helping? I'll need some tests in the next few days. If you decided it's too difficult or time intensive to help, no worries :) I just need to know if I should start speccing it out or if you have this under control and I should just be patient.
Peter:
I am! :)
It's not that's it's too difficult or time intensive. Just that I haven't spend much time on it. I hope you weren't waiting for me. :x
I'll do my best to create a patch today. Although don't expect there to be a lot of tests in there. If you then could take a look and confirm they work properly. (and with that likely take more of your time then if you would've written then yourselves :wacko:)
Peter:
In SafeStepForward and SafeStepBackward, what is currRoot and nextRoot?
Numsgil:
--- Quote ---I hope you weren't waiting for me.
--- End quote ---
Nope; I've been working on fleshing out all the code to look approximately like I want. I have dozens of tests that are failing right now, so I haven't exhausted my to do list just yet. But I hope to get things working in the next few days, and then I'll need some new tests to push the code with.
--- Quote from: Peter on August 05, 2013, 02:52:33 PM ---I'll do my best to create a patch today. Although don't expect there to be a lot of tests in there. If you then could take a look and confirm they work properly. (and with that likely take more of your time then if you would've written then yourselves :wacko:)
--- End quote ---
Yeah, I'll definitely look it over. To be honest it's not even an issue of the time it takes. It's just exhausting thinking through the setups. Especially the more complex ones involving both bodies rotating and moving.
--- Quote ---In SafeStepForward and SafeStepBackward, what is currRoot and nextRoot?
--- End quote ---
I'm probably going to remove both of those functions, so I wouldn't worry about writing tests for it. They aren't necessary for the new collision algorithm.
But to answer your question, the idea is that there's an intersection at some given time (the currRoot), and we want to step forward some amount of time until the derivative is non 0, and we haven't passed the next intersection (nextRoot).
Peter:
Added 2 tests. Gotta start somewhere. ;)
In polygon vs. polygon. Does the test EdgeEdgeSolidHit work as it should?
I see CheckEqual(4, output.TOI); From the code behind it I assume it's the same as timeOfImpact. I also assume the polygon position is based on the center of the polygon. That makes from the distance of 10 at the center a effective distance of 8. That would mean the actual time of impact would be ~3.6 instead of 4. If not how does it define the start location of the polygon?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version