[ODE] Problem with Box-TriMesh collisions with dTriList
David McClurg
dmcclurg at pandemicstudios.com.au
Thu Feb 13 15:39:02 2003
yes. i ran into that too. in the nearCallback, you need to up the number of contacts you can handle...
enum { MAX_CONTACTS = 64 };
dContact contact[MAX_CONTACTS];
// <snip>
if (int numc = dCollide (o1,o2,MAX_CONTACTS,&contact[0].geom,sizeof(dContact))) {
-----Original Message-----
From: Russ [mailto:arrellr@yahoo.com]
Sent: Friday, 14 February 2003 8:07 AM
To: ode@q12.org
Subject: [ODE] Problem with Box-TriMesh collisions with dTriList
I'm using OPCODE 1.2 which I've compiled into a static
library. I'm using ODE 0.035 and the old collision
system and dRay from the contrib folder. I downloaded
the dTriList package that gl posted to the mailing
list, and compiled this in with ODE. Every thing
compiles fine, and the simulation seems to work for
spheres colliding with a mesh, but when I try to
collide a box with the mesh the assertion in the
following function fails:
// Fetches a contact
inline dContactGeom* CONTACT(int Flags, dContactGeom*
Contacts, int Index, int Stride){
dIASSERT(Index >= 0 && Index < (Flags & 0x0ffff));
return ((dContactGeom*)(((char*)Contacts) + (Index
*Stride)));
}
This function is in dxTriList.h
It fails because both Index and Flags are 3.
It's called from
dCollideBTL
>>dContactGeom* Contact = CONTACT(Flags, Contacts,
OutTriCount, Stride);
If you've seen this problem before, or have any advice
I'd greatly appreciate it.