[ODE] Trimesh collision: not all triangles are colliding

Brian Clarkson brianclarkson at btconnect.com
Wed Jan 14 08:20:28 MST 2004

-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of
Sazzad Karim
Sent: 14 January 2004 05:26
To: fmarmond at eprocess.fr
Cc: ode at q12.org
Subject: Re: [ODE] Trimesh collision: not all triangles are colliding

Frederic Marmond wrote:

>  We are working 'only' on windows platform. We have managed to solve our
>problem using the SimpleTrimesh assignment function, but the normal one
>takes vertices, indices and strides didn't work (we are sure about it).

We are using ODE 0.39 and Directx. Can confirm that the OPCODE trimesh build
strides is not able to work with the sizeof directx indices. The input to
draw primitives requires them to be a short. (2 bytes on win platform). This
a stride for opcode of 6 bytes for the indices. There is an inbuilt check
that the
stride for indices is a minimum of 12 bytes. I don't know why Pierre has
the strides to 12 bytes. This is not a problem for D3DVERTEX which is much

So use the OPCODE trimesh build using strides you will need to do a pre
convert your
indices to a list of 4 byte ints so your stride becomes 12 bytes. You can
then discard
the list after the build.

Can you comment. Its a pity we have to do this. Its not a problem for me
now, I have it
working like a train, but I bet this bites everyone using directx at first.


More information about the ODE mailing list