Page 1 of 1
Question in Bullet source code.
Posted: Wed Jan 21, 2015 2:16 pm
by ljb
I'm reading Bullet source code.The function dBoxBox2() is complicated to me,who can explain it to me!How to get peneration depth,contact point?
The Function dBoxBox2() is in btBoxBoxDetector.cpp
Re: Question in Bullet source code.
Posted: Sun Jan 25, 2015 2:46 am
by ljb
I got vertex face contact.But edge-edge contact is diffult.I 'm think why we don't use quadratic programming(David Eberly use it)to get distance between two rigid box.
Re: Question in Bullet source code.
Posted: Sun Jan 25, 2015 3:10 am
by ljb
I can't undetstand function dLineClosestApproach() in btBoxboxdetector.cpp.There is not explain.Who can help me!
Re: Question in Bullet source code.
Posted: Sun Jul 07, 2019 6:41 am
by hyyou
(necro this old thread)
I am curious, so I begin to dig into the source (
https://github.com/bulletphysics/bullet ... tector.cpp).
First, it uses separation theorem.
Then, it selects the direction (in separation theorem) that yield the least overlapping distance.
After that, it projects a face of body A, and a face of body B - using the direction as Normal. (and B A vice versa)
There might be 6*6 = 36 cases. I am not sure.
Using the projection result, It calls "intersectRectQuad2()" to check whether an overlapping occur.
That would be enough for vertex case.
For the edge vs edge, I believe the same procedure could be used : just use Normal = edge from A (cross) edge from B.
I didn't check it yet.