Re: quick quaternion questions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: quick quaternion questions

Rosen Diankov-2
Yes, there are many. For example if you have an affine transformation
"Transform tquat", then just doing

TransformMatrix tmat = tquat;

will convert to a rotation matrix. to convert back:

TransformMatrix tquat_same = tmat;

You can use Transform::rotfromaxisangle or
TransformMatrix::rotfromaxisangle to initialize a rotation from axis
and angle

you can also use TransformMatrix::rotfromquat

If you want to manipulate only quaternions, then check out the ODE
functions dQfromR and dRfromQ

(cc'ing list if others are curious)


2008/8/12 Paul E. Rybski <[hidden email]>:
> Hi,
>        I don't normally think in quaternions and so I wondered if there were
> some useful functions in openrave that would let me translate from
> quaternions to rotation matrices and back again.
> Thanks!
> -Paul