[ODE] Re: center of mass
Nagymathe Denes
denes at invictus.hu
Wed Nov 2 04:33:45 MST 2005
Hi,
See my other post. As i still don't want to meddle in the cvs reps., i've
included some of my 'in-house support functions'. :o)
>>I used to use one of the geoms as a reference (the axis for example); it's
>>pretty straightforward to calculate the necessary pos and R for a new geom
>>or for the body, as we know that the pos and R of this reference geom is
>>relative to the body.
>
> Sure but I meant concerning another object, with another rigidbody. Or
> with
> respect to the floor.
OK, i've had a look to you original question:
>>-With a complex geom object, rigidbody is not necesserally in the 'middle'
>>of the object so do you have any advice to position this object with
>>respect to others ?
...and i must say it depends on 'which part' of it you'd like to align. I
guess you need some of its embedded geoms to match the given pos and R, so
you just need the inverse of the body-to-geom transformation that the
geomtransform does. (see computeFinalTx)
Now as i'm back, i'll try to have a look into the code you've sent (yes, its
really messy ;) and make a nice, clean func. you need as it can be useful
for anyone (including myself :)
Denes
More information about the ODE
mailing list