View Full Version : C++ quaternion library needed
Tim Murray
14-Aug-2007, 00:33
Anybody have any suggestions that is not Boost::quaternion?
K.I.L.E.R
14-Aug-2007, 01:06
Just make one yourself. It's quicker than trying to find alternatives (other than Boost).
DudeMiester
14-Aug-2007, 01:32
I've written one, but it's not optimized for SSE and the like.
any good :
http://www.programmersheaven.com/download/26784/download.aspx
or squat :
http://www.superliminal.com/sources/squat.zip
oeLangOetan
14-Aug-2007, 10:25
what's wrong with boost?
K.I.L.E.R
14-Aug-2007, 11:40
Compile times?
Starvation of your program from compiler optimisation opportunities?
Lots from what I've heard, however for my uses it's perfect.
what's wrong with boost?
I told Tim about this lib last night, and it might be useful to link it here in case others want to peek:
vmath (http://home.zcu.cz/~bartipan/vmath/)
Simon F
14-Aug-2007, 12:48
Apparently - at least according to this paper (https://www.cs.tcd.ie/publications/tech-reports/reports.06/TCD-CS-2006-46.pdf)that was re-presented at Siggraph - quaternions (when used for skinning, that is) are old technology.:shock: Dual Quaternions (http://isg.cs.tcd.ie/projects/DualQuaternions/) are far better.
Andrew Lauritzen
14-Aug-2007, 20:10
Apparently - at least according to this paper (https://www.cs.tcd.ie/publications/tech-reports/reports.06/TCD-CS-2006-46.pdf)that was re-presented at Siggraph - quaternions (when used for skinning, that is) are old technology.:shock: Dual Quaternions (http://isg.cs.tcd.ie/projects/DualQuaternions/) are far better.
Yeah that paper was presented at I3D early this year and I certainly enjoyed it.
However it doesn't invalidate the usefulness of classical quaternions, it simply extends the concept to handle 3 more degrees of freedom (for translation in this case). So a (normalized) quaternion concisely represents a 3D rotation and a (normalized) dual quaternion represents a 3D rotation and translation. Other than computational efficiency, the real benefit of these representations is that you don't get undesirable affine transformations when interpolating or taking linear combinations. Thus for example with dual quaternions you don't get annoying scaling (responsible for "candy-wrapper" artifacts) when interpolating between two animation poses.
Certainly this is really useful for skinning although sometimes artists would rather have control over scaling parameters manually, which this approach does not allow. Arguably however dual quaternions are a better basis for animation tools than matrices.
Quaternion libraries are really pretty easy to write (particularly if you already have a matrix/vector library) so that may actually be less hassle than finding a compatible library. Still I'm a big fan of code reuse so certainly let us know if you find something good :)
K.I.L.E.R
14-Aug-2007, 23:18
Never heard of dual quats, paper?
Before I use anything I need to derive it myself. :D
nutball
14-Aug-2007, 23:50
Before I use anything I need to derive it myself. :D
That's a bad habit. You should try standing upon the shoulders of giants. It makes for better progress apparently.
K.I.L.E.R
15-Aug-2007, 11:21
Progress != things learned.
That's a bad habit. You should try standing upon the shoulders of giants. It makes for better progress apparently.
Tim Murray
16-Aug-2007, 21:14
I solved my problem without quaternions--ray-plane intersections ftw!
Thanks anyway guys :p Dual quats look interesting and would solve things too, but then I'd have to write a dual quat library (urgh)...
SoftwareGuy256
22-Aug-2007, 02:02
Anybody have any suggestions that is not Boost::quaternion?
D3DX
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.