[ODE] finding out if collided with trimesh

Megan Fox shalinor at gmail.com
Tue Sep 21 19:55:34 MST 2004


You'd seem to do a trimesh the same as any other geom - add some
handling for collision reporting in your collision callback.

If only trimesh geoms need to report this information, then give them
a special bit (or just check for trimesh geoms specifically) and only
bother recording collisions for those objects.


In my case, I decide ahead of time the max number of collisions I'll
allow to be reported per step, and save out an array per Body (that
actually cares about collision recording) of that size - which the
callback incrementally fills as it finds collisions, though the array
is unsorted as a result.

I don't know if this is optimal, but it seems to work fine, and the
memory impact is negligable.  Perf impact, well I've really no idea
(it seems ok), but it isn't particularly expensive given the other
fancy operations the callback gets to do - collision classification
(sliding/static/bounce/etc) gets particularly complicated.


Ciao
-Megan

----- Original Message -----
From: Rob <rob at redflame.net>
Date: Wed, 22 Sep 2004 00:05:43 +0100
Subject: [ODE] finding out if collided with trimesh
To: ode at q12.org


Hi there! 
 
How do we find out if trimesh has been collided with? I need to know
as I wish to perform a force when in contact with the level.
 
Regards,
Rob

_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode


More information about the ODE mailing list