[ODE] Triangle-box collider contribution

Jeffrey Smith jeffreys at Softimage.com
Wed Feb 25 15:00:17 MST 2004


I have fixed the problem John mentions, as well as added some of my own code
which combines potential contacts.  This results in many fewer contacts
being passed out of dCollideBTL, as well as reducing or eliminating the
asymmetry in some collisions (for example a trimesh box bouncing on a flat
bbox surface).  Search for "GenerateContacts" to see what I've changed.  (I
have left all the original code intact, merely ifdef'ing the appropriate lines 
out).

The file is available at:
             http://www.smokingrobot.com/collision_trimesh_box.cpp

-jeff



-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of John Miles
Sent: February 25, 2004 1:38 PM
To: asko; ode at q12.org
Subject: RE: [ODE] Triangle-box collider contribution


Thanks!  I'm extremely interested in any improvements to this code, and will be happy to help test and debug any submissions.

In this case, it looks like your code is trying to generate too many contact points.  When I compile it into my ODE build and run either test_moving_trimesh.exe or my own application, it tries to pass index values to the SAFECONTACT macro that equal or exceed (Index & 0xffff) in line 916.  This condition fails the assert in line 114 of collision_trimesh_internal.h.

It appears that you never check the low word of iFlags to determine the maximum number of contacts to generate.

-- jm
-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of asko
Sent: Wednesday, February 25, 2004 9:38 AM
To: ode at q12.org
Subject: [ODE] Triangle-box collider contribution


Hello everyone,

I've had the honour to port a piece of code, a mesh-box collider from the as of yet unreleased Serious Engine 2 to ODE. From what I've experienced it seems to be slightly more stabile, so it's worth a try if you have a lot of box-triangle action going on :)

I have uploaded the files to a zip:
http://www.cad-creations.net/asko/TriBox/TriBox.zip


Would be nice if someone with CVS access could add it to the contributions section.



More information about the ODE mailing list