[ODE] Trimesh collision problem

Jürgen Ladstätter info at innova-studios.com
Tue Mar 20 06:43:40 MST 2007


Hi dave,

thanks for your help, but it still doesnt work. Maybe that’s because I use
ODE 0.7 binary release?

Btw neither in the WIKI nor in the official docu I found
dGeomTriMeshDataBuildSingle or %Single1 - where did ya find them?

An other question: vertexpoints should be 4*dReal, how can you pass a
pointer to your HsVector array? HsVector is a struct of 3 floats as you said
- not 4 floats,

Kind regards,

-----Ursprüngliche Nachricht-----
Von: David Walters [mailto:hidden.asbestos at googlemail.com] 
Gesendet: Dienstag, 20. März 2007 14:28
An: Jürgen Ladstätter
Cc: ode at ode.org
Betreff: Re: [ODE] Trimesh collision problem

> Everything else seems like it should work

Actually no, I think I've spotted the problem -
dGeomTriMeshDataBuildSimple takes dVertex data which is actually an
array of quad-floats, rather than three.

If you see what dGeomTriMeshDataBuildSimple resolves to, it'll make more
sense:

    dGeomTriMeshDataBuildSingle1(g,
				Vertices, 4 * sizeof(dReal), VertexCount,
				Indices, IndexCount, 3 * sizeof(unsigned
int),
				Normals);

I use:

	dGeomTriMeshDataBuildSingle( g, p_vertex_data, sizeof( HsVector ),
		vertex_count, p_index_data, triangle_count * 3, sizeof(
UINT32 ) * 3 );

Where HsVector is a struct of 3 floats

Hope that helps!

Regards,
Dave




More information about the ODE mailing list