[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
that
>takes vertices, indices and strides didn't work (we are sure about it).

Frederic
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
directx
draw primitives requires them to be a short. (2 bytes on win platform). This
makes
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
limited
the strides to 12 bytes. This is not a problem for D3DVERTEX which is much
bigger.

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.

Pierre
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.

Brian..





More information about the ODE mailing list