[ODE] get triangle index of a trimesh
Jon Watte (ODE)
hplus-ode at mindcontrol.org
Fri Mar 10 15:08:03 MST 2006
Jaroslav Sinecky wrote:
> Yep, the problem of dTriCallback and dTriArrayCallback is that they are
> called for every potential intersecting triangle. I guess it's designed more
> to allow user say, that concrete triangle shouldn't be tested for collision.
> But in this callback, you don't know, if the triangle will finaly generate
> some contact or lot of them or noone so there's no way, how to relate them
> to contacts returned from dCollide.
Testing which one of 10 triangles actually caused a specific collision
point is a lot cheaper than testing which one of 10,000 triangles did it :-)
If you want to change ODE, you can add a feedback field for the contact
struct; set it to 0 in all collisions except for triangle meshes, where
you set it to the triangle in question. It wouldn't be that hard, and I
think it's useful enough that it should probably be submitted as a patch.
Cheers,
/ h+
More information about the ODE
mailing list