[ODE] Ray/Tri-mesh intersection bug
Flavien Brebion
f.brebion at vrcontext.com
Thu Oct 16 16:19:23 MST 2003
Hi people,
Just a small note to let you know that i've found a bug
in collision_trimesh_ray.cpp, around line 85:
dVector3 dv[3];
FetchTriangle(TriMesh, TriIndex, TLPosition, TLRotation, dv);
dVector3 Temp;
GetPointFromBarycentric(dv, Faces[i].mU, Faces[i].mV, Temp);
dMULTIPLY0_331(Contact->pos, TLRotation, Temp);
Contact->pos[0] += TLPosition[0];
Contact->pos[1] += TLPosition[1];
Contact->pos[2] += TLPosition[2];
Contact->pos[3] = REAL(0.0);
This is incorrect because the call to FetchTriangle returns back
the triangle in WORLD SPACE: translation and rotation are already
done. Hence the 5 last lines from my code snippet are redundant;
the result is a contact reported at an incorrect position when
trying to collide a mesh that has non-identity translation/
rotation matrixes.
Someone, please fix it in CVS.
Thanks,
F. Brebion
More information about the ODE
mailing list