[ODE] Trimesh collision problem
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:
Vertices, 4 * sizeof(dReal), VertexCount,
Indices, IndexCount, 3 * sizeof(unsigned int),
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!
More information about the ODE