Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Applying axis angle to a vector

4: Adsense

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   

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-

#2 johnb   Members   

351
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.