RE: [Algorithms] quaternions in a 3d engine
Brought to you by:
vexxed72
From: Jack M. <ja...@re...> - 2001-03-08 18:40:05
|
Well, you can actually have scale in a quat. Since quats are pretty much only usable normalized, you could encode the scale as the magnitude of the quat. And of course the scale would have to be positive or 0. Of course you have normalization costs and all that, but if you're purely concerned about memory usage, this could help. Of course, it just changes the con to "having to renormalize a quat with scale all the time." :-) Jack -----Original Message----- From: Charles Bloom [mailto:cb...@cb...] Sent: Thursday, March 08, 2001 11:42 AM To: gda...@li... Subject: [Algorithms] quaternions in a 3d engine Ok, I just wanted to go over the pros/cons of quaternions vs. matrices as a fundamental rotation type for a 3d engine (eg. in all my objects, etc.). Pro Quats : Lower memory use. 4 floats instead of 9. Slightly faster vector->vector transform and quat->quat transform (maybe). Easier to interpolate neatly. Anti Quats (Pro Matrices) : Must do semi-expensive conversion to matrices to hand them to D3D. Probably not a big deal since you're doing row major -> column major conversion anyway most likely. Must store a separate scale float if you want that, and/or a scaling vector for non-uniform scale. This separation of rotation and scale is seen as an advantage by some. ---------------------------------------------------- Charles Bloom cb...@cb... www.cbloom.com _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/lists/listinfo/gdalgorithms-list |