[ODE] General collision detection question
skjold@cistron.nl
skjold at cistron.nl
Tue Feb 18 18:52:02 2003
Hi Pierre,
Thanks a lot for your reply, it cleared up my confusion. :)
Greets,
Mark
> > Why would I use Opcode for CD, instead of ODE
>
> Because they don't do the same thing. ODE only supports collision detection
> between primitives (e.g. cube-vs-cube, cube-vs-sphere, etc). With ODE alone
> you can't do sphere-vs-mesh, for example. And if you want to add support for
> meshes, you must write something like Opcode. So you really don't use one
> instead of the other, you use both.
>
> > other than the fact that the tri-collider was written for Opcode (for that
> matter, why was tri-collider written for Opcode instead of ODE)?
>
> The so called tri-collider is just a small piece of code, the missing link
> between ODE and Opcode (it creates correct contact data out of Opcode). You
> can't use ODE alone, which lacks collision detection between primitives and
> meshes. You can't use Opcode alone, which lacks physics-compliant results
> (it's only "naked" CD, if you want).
>
> > In short: What makes some of you prefer Opcode over ODE when it comes to
> collision detection?
>
> There's no overlap between the two. They don't do the same thing. So you
> don't "prefer" one or the other, actually.
>
> > And the other question is, is there a tri-collider that can be used just
> with ODE?
>
> Yep, Opcode :) Phagocyt relevant code into ODE, done. But then you'll miss
> the new optimizations / features in next Opcode versions (or you'll have to
> re-do the refactoring instead of just recompiling).
>
> To make it clearer, there are three very different tasks involved :
> 1) Collision detection
> 2) Contact generation
> 3) Rigid body simulation
>
> Opcode does 1) for primitive-vs-mesh
> Erwin's tri collider does 2) for primitive-vs-mesh
> ODE does 3) and also 1) and 2) for primitive-vs-primitive
>
> The hardest part is 2) IMHO.
>
> - Pierre
> www.codercorner.com
>
>
>