[ODE] Adjusting a body's mass

Kris kris at kolos.math.uni.lodz.pl
Mon Mar 21 11:29:27 MST 2005


Hi

On Mon, 14 Mar 2005, Jon Watte wrote:

>
> > Let's see, does that mean I have to use the dMassSetParameters() method?
> > Aside from dMassTranslate(), this is the only method with access to the
> > center of gravity position.
>
> Even if you offset the center of gravity, the Body will not pay attention
> and it won't work right. You really do have to offset the center of the
> body, and counter-offset all joints and geoms.
>
> So, the algorithm would be:
>
> 1) add in all masses into a single dMass
> 2) get the center of gravity from the mass
> 3) offset the body by that much (counter-offsetting everything attached to that body)
> 4) counter-offset the dMass to origin, and set that as the mass of the body

Suppose we have dBodyID b1 and another body b2 connected via joint to b1,
b1 has mass m1 and b2 - m2. Now, how exactly can i lower center of
gravity, of body b1, by n units (i need exact function calls :P, please...)

Thanks

>
> Cheers,
>
> 			/ h+
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>

Pozdr __DEVELOPER_TRINITY_CREEZ_H__
-- 
===========================================
                 GG: 1271378
-------------[ PROJECT TRINITY ]-----------
  [ http://trinity.glt.pl ]   [ Trinity ]
        [ The post-nuclear cRPG ]
===========================================



More information about the ODE mailing list