[ODE] Trimesh collision: not all triangles are colliding

Flavien Brebion f.brebion at vrcontext.com
Wed Jan 14 10:25:10 MST 2004


Don't know, it makes sense to me. 12 bytes = 4 bytes per index multiplied
by 3 indices per triangle, as opposed to 6 bytes = 2 * 3.

A choice had to be made, i don't think there is an easy and clean
way to support shorts and integers for indices, without duplicating the
code. I'm guessing Pierre just told himself: if someone needs short
ints, he'll just do the convertion. That's 10 lines of code. Sounds
fair to me.

F. Brebion



-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Brian
Clarkson
Sent: Wednesday, January 14, 2004 9:20 AM
To: ode at q12.org
Subject: RE: [ODE] Trimesh collision: not all triangles are colliding




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



_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode



More information about the ODE mailing list