[ODE] Trimesh collision problem
David Walters
hidden.asbestos at googlemail.com
Tue Mar 20 06:27:49 MST 2007
> 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