[ODE] center of mass
Geoff Carlton
gcarlton at iinet.net.au
Fri Jan 13 17:57:25 MST 2006
Ok,
Things are looking good! The final_posr is checked for recalculation in
three places:
1.) When a user 'get' function is called, such as dGeomGetPosition()
2.) When the AABB needs to be recalculated
3.) In the dCollide function
The 3rd check should almost always do nothing, since dirty geoms will
have already had their AABB recalculated as part of the space collide.
In terms of prediction, it certainly seems as good as possible.
If Jon and Jason agree on this change, I'm inclined to commit it to
UNSTABLE. I do not yet have CVS write access, so I'll need that if I am
to commit the patch myself.
Before I do that I'm testing the changes, as I've already noticed a
small mistake in my code. I'm using cxxtest, which is nice and lean, as
it doesn't require RTTI, exceptions, or linking another library. It
does require perl. I'm not an expert on unit tests, but it raises the
question of eventually putting unit test code in CVS as well. It is
something that could be built up in stages, testing basic collision,
creating a box and a terrain and looking for contacts, etc. There
again, its hard to beat just a simple demo to make sure things are
bouncing around right.
Geoff
More information about the ODE
mailing list