[ODE] Body test in dJointGetSliderPosition
LR
logreg at free.fr
Thu Mar 22 03:25:52 MST 2007
Hi,
For official developers, i think it should be great to add a "body!=NULL"
test in the dReal dJointGetSliderPosition (dJointID j) function:
dReal dJointGetSliderPosition (dJointID j)
{
dxJointSlider* joint = (dxJointSlider*)j;
dUASSERT(joint,"bad joint argument");
dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider");
if (joint->node[0].body) { // *** <------- the test ***
// get axis1 in global coordinates
(...)
Because now, it crashes when slider is not attached. In fact this test is
already done in dJointGetHingeAngleRate for exemple. it should be
interesting to generalize this tests for joints.
Cheers
LR
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mooshika.org/pipermail/ode/attachments/20070322/b63ad87a/attachment.htm
More information about the ODE
mailing list