[ODE] rotation matrix from normalized vector?
Fig TaTam
fig_tatam at hotmail.com
Wed Mar 12 01:02:02 2003
Unfortunately, using dRFromAxisAndAngle will not work. If the angle
parameter is 0, then it really doesn't matter what the vector parameter is.
This function does not create a rotation specified by the vector.
Someone has suggested using dRFromZAxis(), but that function is not defined
in my version, which is 0.035
So the question still stands: how do I align Z axis of a body to a
normalized vector?
>From: "Aras Pranckevicius" <nearaz@interamotion.com>
>To: <ODE@q12.org>
>Subject: Re: [ODE] rotation matrix from normalized vector?
>Date: Tue, 11 Mar 2003 11:10:45 +0200
>
> > Actually, once I get my other object aligned to the force vector, I
>don't
> > care how it is rotated about that vector. That object happens to have
>radial
> > symmetry, so I only need to align the axis of symmetry to force vector.
> > My 3D math is weak. Could you give me the right formula?
>
>You may just use (from the ODE docs):
> void dRFromAxisAndAngle (dMatrix3 R, dReal ax, dReal ay, dReal az,
>dReal
>angle);
> Compute the rotation matrix R as a rotation of angle radians along the
>axis (ax,ay,az).
>
>If you don't care about rotation around the axis, just supply
>YourFavouriteNumber as angle :)
>
>
>
>Aras Pranckevicius aka NeARAZ
>http://www.gim.ktu.lt/nesnausk/nearaz/
>
>_______________________________________________
>ODE mailing list
>ODE@q12.org
>http://q12.org/mailman/listinfo/ode
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail