Design question

Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Design question

Post by Dirk Gregorius »

Hey Erwin,

I looked at your code and I have a small question regarding the design of Bullet. You dispach the contacts in the collision library - that means you apply the impulses directly there. I always thought that for a physic engine there should be a clear border between the collision system, which is a pure geomtrical problem and the physic system. How does this fit into continuous physics? You need at least the angular and linear velocities in the collision system in order to predict the TOI. Wouldn't it be clearer to apply the impulses in the physic part of Bullet anyway in order to avoid mixing physical and geometrical code? Or is such a seperation not possible anymore?

Regards,

-Dirk
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

>You dispach the contacts in the collision library - that means you apply the impulses directly there.

The separation is there:
There is no rigidbody class in the collision detection, so no impulses can be applied there.
Can you verify this ?

The Bullet folder contains only collision detection,
BulletDynamics contains the rigidbody and solver code.
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Post by Dirk Gregorius »

I will have a look again. In which order do you process:

Collision first, iterate over contact manifolds and apply impulses and finally solve the geometric constraints?

-Dirk