[ODE] Problem with Trimesh

Flavien Brebion f.brebion at vrcontext.com
Mon Nov 17 18:16:51 MST 2003


Two things come to my mind (by the way, i haven't looked at that
part of the code for some time, so i'm not 100% sure of what i'm
going to say:)

1. When you specify the vertex array for the tri-mesh, make sure
you aren't deleting the memory afterwards. I don't think ODE keeps
a safe copy of the vertex array, so the pointer must still be valid
at run-time.

2. Maybe more probable: invalid stride parameter ? If your vertex
array is made of 3 floats per vertex, the stride should be 12 bytes.

F. Brebion



-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of
Stuart O Anderson
Sent: Monday, November 17, 2003 3:47 PM
To: ode at q12.org
Subject: [ODE] Problem with Trimesh


Hi -

I've got a problem with dGeomTriMeshGetTriangle, which appears both in my
own code and with the test_trimesh code.  Essentially I'm getting the
wrong values back from the function.  For example, I retreive vtx 1 of
triangle 1 in test_trimesh right before calling dsSimulationLoop for the
first time.  It get <1,-5,-5,0>, which doesn't make any sense since no
vertex should have '1' as a component.  (the correct result would have
been <-5,-5,2.5>).  I checked out the relevant code but can't see anything
obviously wrong.  Maybe something inside of OPCODE?  has anyone else run
into this?

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


More information about the ODE mailing list