[ODE] getUniversalAngle and dRFrom2Axes

Dirk Gregorius dirk at dirkgregorius.de
Tue Sep 27 20:12:12 MST 2005

 From the funtion source code:

joint.cpp - getUniversalAngle()
// It should be possible to get both angles without explicitly
// constructing the rotation matrix of the cross.  Basically,
 // orientation of the cross about axis1 comes from body 2,
 // about axis 2 comes from body 1, and the perpendicular
// axis can come from the two bodies somehow.  (We don't really
 // want to assume it's 90 degrees, because in general the
// constraints won't be perfectly satisfied, or even very well
// satisfied.)
// However, we'd need a version of getHingeAngleFromRElativeQuat()
// that CAN handle when its relative quat is rotated along a direction
// other than the given axis.  What I have here works,
// although it's probably much slower than need be.

Did anybody figure this out? Is there better way to extract the angles?
The same question for the Hinge Joint - any better methods to extract
the current hinge angle?

dRFrom2Axes( R, ax, ay, az, bx, by, bz )

What is this function supposed to return. The matrix that
rotates a into b or vice versa? Any other form of rotation?



More information about the ODE mailing list