Algorithm behind vec_rotate

Posted By: PadMalcom

Algorithm behind vec_rotate - 10/22/17 13:15

Hi, I've been searching for a way to rotate a vector as vec_rotate does it. Now I'm too curious to see the algorithm behind it. Can you explain it briefly?
Posted By: Aku_Aku

Re: Algorithm behind vec_rotate - 10/22/17 14:03

Maybe it helps: rotating...
Posted By: Kartoffel

Re: Algorithm behind vec_rotate - 10/23/17 08:58

I guess it's three consecutive "2d" rotations (pan rotates xy, tilt xz, and roll yz). I'm not sure in which order they are performed, though.
Posted By: Superku

Re: Algorithm behind vec_rotate - 10/23/17 09:33

Have a look here: http://www.conitec.net/beta/ang_to_matrix.htm
Posted By: jcl

Re: Algorithm behind vec_rotate - 10/23/17 11:23

Yes, that's the algorithm. The angle is converted to a rotation matrix, with which the vector is then multiplied.
Posted By: PadMalcom

Re: Algorithm behind vec_rotate - 11/10/17 06:11

Thank you all!
© 2024 lite-C Forums