[ODE] New User - Contrib OPCODE Sample

Nate W coding at natew.com
Fri May 24 11:35:02 2002


On Fri, 24 May 2002, Dominic Morris wrote:

> Does anybody have quick-n-dirty triangle geometry code
> they could share? I need to get ODE working with
> triangle CD; I've looked at the contrib. sample but it
> seems still tightly coupled with an external library,
> which I aint got code for (e.g. dcCore.h, etc.).

The external library, OPCODE does most of the work - the tri-collider is
basically just glue that binds OPCODE and ODE.  OPCODE is free, you can
download it at http://www.codercorner.com/Opcode.htm

> Additionally, the tri-list functionality in there, though cool, is
> overkill for my purposes; I only need to CD against a few triangles at
> a time, so that would probably work just fine as a few seperate ODE
> geom. objects.

On one hand, I wonder if, for small sets of triangles, you could get
faster CD than OPCODE if you implemented ODE's AABB testing callback for
your triangle sets, and then did collision testing only when ODE reports
that something is in a triangle set's AABB.  If memory serves, the
tri-collider reports infinite AABBs, so there might be room for
optimization there.

On the other hand, I'm just barely knowledgeable enough about collision
detection to even wonder about things like that. :-)  Other people on this
list could probably say with more confidence than I can.

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com