[ODE] Small bug in collision_kernel.cpp
Matthew D. Hancher
mdh at email.arc.nasa.gov
Mon Apr 19 10:15:35 MST 2004
Hey all. Found another bug, this time in collision_kernel.cpp. In
dGeomSetBody(), in the case where the body is zero, memcpy() is used
to copy the Body's position and orientation back into the Geom. The
size arguments should be sizeof(dVector3) and sizeof(dMatrix3), as
they are elsewhere, but currently are sizeof(b->pos) and sizeof(b->R).
Since the pos and R elements of dxBody are in fact both dReal*, this
results in the position and orientation of a Geom not being properly
updated when it is detached from a Body.
Old: (collision_kernel.cpp:324)
< memcpy (g->pos,g->body->pos,sizeof(g->pos));
< memcpy (g->R,g->body->R,sizeof(g->R));
New:
> memcpy (g->pos,g->body->pos,sizeof(dVector3));
> memcpy (g->R,g->body->R,sizeof(dMatrix3));
In other news, Russ wrote:
> * removed the old, deprecated collision system (geom.cpp,space.cpp,
> geom.h,space.h,odecpp_old_collision.h). the ODE_OLD_COLLISION
> configuration setting no longer has any meaning.
Thank you thank you thank you! I keep forgetting these are there and
then getting very confused when I grep through the code trying to find
something. :)
mdh
Matt Hancher
NASA Ames Research Center
Official: mdh at email.arc.nasa.gov
Personal: mdh at media.mit.edu
More information about the ODE
mailing list