Jump to content

  • Log In with Google      Sign In   
  • Create Account


Applying axis angle to a vector


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 David20321   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 July 2001 - 12:34 PM

Ok I know how to rotate a vector with euler angles using sin and cos but how do I rotate a vector around a given axis like with axis angle... as in what''s the software version of glRotatef(), would I just rotate around like a euler angle x,y and z but where the angle is scaled by the x,y and z coordinates of the axis vector? -David-

Sponsor:

#2 johnb   Members   -  Reputation: 347

Like
Likes
Like

Posted 26 July 2001 - 09:21 PM

The easiest way is to generate a rotation matrix or quaternion from your angle axis information. These are both common uses of angle-axis data, and you can either use an API call (depending on the API) or generate the matrix or quaternion yourself.

There''s not much to choose between the two mathods for a single vector. If you are going to be rotating a lot of points/vectors a matrix is quicker, while a quaternion is quicker to work out and requires less storage.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS