quaternion rotation in openGL

Started by
3 comments, last by me_here_me 16 years, 1 month ago
Hi, Is there some built in function in openGL that returns a rotation matrix from a quaternion, or performs rotation, given a quaternion as a parameter. I know how to convert a quaternion into a rotation matrix, i am just curious if there are some functions provided by openGL? regards
Advertisement
Quote:Original post by me_here_me
Hi,
Is there some built in function in openGL that returns a rotation matrix from a quaternion, or performs rotation, given a quaternion as a parameter.

I know how to convert a quaternion into a rotation matrix, i am just curious if there are some functions provided by openGL?
I'm fairly certain that there is no such function (at least in the current specification).
Quote:Original post by me_here_me
Hi,
Is there some built in function in openGL that returns a rotation matrix from a quaternion, or performs rotation, given a quaternion as a parameter.

I know how to convert a quaternion into a rotation matrix, i am just curious if there are some functions provided by openGL?

No. OpenGL, by itself, does not understand quaternions.
Quote:Original post by Sneftel
Quote:Original post by me_here_me
Hi,
Is there some built in function in openGL that returns a rotation matrix from a quaternion, or performs rotation, given a quaternion as a parameter.

I know how to convert a quaternion into a rotation matrix, i am just curious if there are some functions provided by openGL?

No. OpenGL, by itself, does not understand quaternions.


However, OpenGL does understand Axis-Angle representation (via glRotate*), and Quaternions can be converted to Axis-Angle with little effort.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

thanks for your opinions.

best wishes

This topic is closed to new replies.

Advertisement