[ODE] Trimesh question

Muschick Christian muschick_christian at aon.at
Thu Nov 2 15:52:10 MST 2006


I had a similiar problem today and it took me all afternoon to figure out...

 > 	dGeomTriMeshDataBuildSimple(s.tmData, vertices, 18, (const int
 > *)(&(indices[0])), 18);

dGeomTriMeshDataBuildSimple assumes a stride of 4 dReals for vertices 
(don't ask me why, perhaps because dVector3 has 4 dReals?), your stride 
is 3. Use dGeomTriMeshDataBuildSingle.

 > 	//dGeomTriMeshDataBuildSingle(s.tmData, vertices, sizeof(dReal)*3,
 > 18, indices, 9, sizeof(indices[0])*3);

I think there should be 18 as indexcount, not 9.

Hope this helped,

More information about the ODE mailing list