[ODE] dGeomTransformSetInfo() and dGeomTransformGetInfo()

Russ Smith russ at q12.org
Mon Aug 5 23:08:02 2002


i have added the dGeomTransformSetInfo() and dGeomTransformGetInfo()
functions, to allow the g1/g2 inconsistency with transform geoms to be
worked around. rest assured this is not an API change, just an API
addition. to quote from the docs:

  [These functions] Set and get the "information" mode of geometry
  transform g. The mode can be 0 or 1. The default mode is 0.

  With mode 0, when a transform object is collided with another object
  (using dCollide (tx_geom,other_geom,...)), the g1 field of the
  dContactGeom structure is set to the geometry object that is
  encapsulated by the transform object. This value of g1 allows
  the caller to interrogate the type of the geometry that is
  transformed, but it does not allow the caller to determine the
  position in global coordinates or the associated body, as both of
  these properties are used differently for encapsulated geometry
  objects.

  With mode 1, the g1 field of the dContactGeom structure is set to the
  transform object itself. This makes the object appear just like any
  other kind of geometry object, as dGeomGetBody() will return the
  attached body, and dGeomGetPosition() will return the global position.
  To get the actual type of the encapsulated geometry in this case,
  dGeomTransformGetGeom() must be used.

if anyone has a reason to use this new feature i'd appreciate some
feedback.

russ.

-- 
Russell Smith
http://www.q12.org