[ODE] Find position of geom within composite?

Keith Wiley kwiley at cs.unm.edu
Fri Nov 11 00:00:37 MST 2005


Well, I think you're misunderstanding a little bit, although I  
appreciate the information.  I'm very new to ODE.  The problem is,  
for ANY geom that is a member of a particular body, dGeomGetPosition  
returns the *same* position, the cog of the entire body...so  
dGeomGetPosition simply does not return positional data that is  
unique to the individual geoms making up a body, no matter how the  
position that is returned might be transformed after the fact.  Maybe  
I'm setting up the composite body wrong to begin with, but I think  
it's straight out of the boxstack example.

I have a body that is a composite of multiple geoms, a group of boxes  
basically.  I want to find the position (yes world coordinates would  
be preferable), not of the cog of the entire object, but of a single  
box within the object, i.e. the position of a single geom within the  
body.

Do you know how I can do this?

Thanks much.

On Nov 10, 2005, at 11:48 PM, Megan Fox wrote:

> dGeomGetPosition, when used on a geom which you've linked to a
> TransformGeom, is going to give you the relative coordinates from the
> body's center.  That is, you're getting the object-space coordinates,
> the local coordinates.
>
> To get the world-space coordinates, you just need to transform the
> coordinates by your object's world transform.
>
>
> ... unless I'm completely misunderstanding what you're doing?
>
> On 11/10/05, Keith Wiley <kwiley at cs.unm.edu> wrote:
>> I am compositing geoms into complex unions, ala the test_boxstack
>> example.  However, I would like to be able to find the position of
>> one geom within the composite at a later time, after the composite
>> shape may have been moved around.  I tried using dGeomGetPosition().
>> This is the function that I use to draw each geom in the compsite, so
>> I figured it would give a unique position for each geom, but it
>> appears that compositing "resets" each geom's position to the center
>> of mass of the entire composited object.  Can I find the position of
>> a specific geom within a composited object?
>>
>> Thanks.
>>
>> _____________________________________________________________________ 
>> ___
>> Keith Wiley         kwiley at cs.unm.edu         http://www.unm.edu/ 
>> ~keithw
>>
>> "Luminous beings are we, not this crude matter."
>>                                             --  Yoda
>> _____________________________________________________________________ 
>> ___
>>
>> _______________________________________________
>> ODE mailing list
>> ODE at q12.org
>> http://q12.org/mailman/listinfo/ode
>>
>
>
> --
> -Megan Fox
> Lead Developer, Elium Project
> http://www.elium.tk


________________________________________________________________________
Keith Wiley         kwiley at cs.unm.edu         http://www.unm.edu/~keithw

"I do not feel obliged to believe that the same God who has endowed us
with sense, reason, and intellect has intended us to forgo their use."
                                            --  Galileo Galilei
________________________________________________________________________




More information about the ODE mailing list