[ODE] PosR - a better way?

Geoff Carlton gcarlton at iinet.net.au
Fri Nov 12 14:01:00 MST 2004


Well, in terms of the ode implementation its not that different at all, 
so its really a question of ease of use.

1.) Collision and queries are easier.
Instead of the collision being set up to return either the transform 
container or its geom (with caveats about its position), you get the 
actual geom itself.  No need for the "SetInfo" switch.  No need to 
special case "oh, if its a transform container, get the thing its 
holding".  Also its easier to iterate through a body's geoms, since you 
don't have the container geoms to worry about.  For a given geom you can 
simply query its offset (if it has one) from the body.

2.) Simpler to set up and understand
If you want to offset a geom, you don't need to detach the geom, attach 
a transform container, and point the container to the geom.  Instead, 
you just call a function on the geom itself.

The interface I'm thinking is the following:
    dGeomSetOffsetPosition()
    dGeomSetOffsetRotation()
    dGeomSetOffsetQuaternion()
    dGeomClearOffset()
    dGeomIsOffset()
    dGeomGetOffsetPosition()
    dGeomGetOffsetRotation()
    dGeomGetOffsetQuaternion()
Where the SetOffsetXXX() functions create the offset PosR if necessary. 

I believe this way of dealing with offsets would be a substantial 
improvement to the ode interface.

Geoff





More information about the ODE mailing list