Re: [Algorithms] Quaternions
Brought to you by:
vexxed72
From: Stephen J B. <sj...@li...> - 2000-11-16 22:35:08
|
On Thu, 16 Nov 2000, Max wrote: > This is probably some simple question, but I can't seem to find > an answer. Could somebody please point me to some place about > quaternions? What are they actually? Are they only used in D3D? I was > programming using OpenGL for some time now, but now I've started > reading DX8 docs. I didn't meet quaternions in OpenGL, and it seems > those are very important in D3D. Quaternions are *useful* in many 3D applications - there isn't specific support for them in OpenGL - but the glRotate command works *very* similarly to a quaternion - except that the scaling of the angle term is a little different. A quaternion is essentially an axis to rotate around - and an amount to rotate through. If you type 'Quaternion' into any search engine, you'll get 1e6 tutorials. Essentially, most applications that use them only need them at the level of the application. When it comes to transforming vertices, a matrix is significantly more efficient. Hence, you tend to use quaternions to compose/interpolate/combine rotations and then you convert them into a matrix at the last minute before you hand them over to the graphics API. Hence, it's not generally significant that OpenGL doesn't directly support them...it doesn't need to. I doubt that D3D does anything much with them - other than to immediately convert them into matrices. ---- Steve Baker (817)619-2657 (Vox/Vox-Mail) L3Com/Link Simulation & Training (817)619-2466 (Fax) Work: sj...@li... http://www.link.com Home: sjb...@ai... http://web2.airmail.net/sjbaker1 |