Re: [Plib-devel] Quaternions in plib
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-08-11 06:57:05
|
Sam Stickland wrote: > > Well, it appears it was my code that was broken - not plib. > > This evening I took the tux on a pedestal example and adjusted it so you can > fly around tux using quaternions, and it all works fine. I nearly got > carried away and changed it so you could fly tux about - but then I > remembered it's susposed to be a simple example. > > As it uses the tux data files should I place it in examples/src/tux or > examples/src/quaternions and set the model and texture paths to ../tux/data? > I prefer the later myself, but that's me. > > If I get the time I'll write a small article to go with the exampe source. > > Incidently why does sgCoord store euler angles? Aren't eulers evil? :) I > would had expected an (x, y, z) vector and a quaternion. Eulers *are* evil in the inner workings of a program - but they are a NECESSARY evil on the outer edges of the code - where user input comes in, etc. Hence, a library that purports to support 3D programming in a fairly general way should support Eulers, Matrices *and* Quaternions...which PLIB does. I rather draw the line at the fourth common method: "Translation+look-at-popint+vertical axis"...but I guess we should probably add some sort of support for that too. If you actually read my FAQ entitled "Eulers are Evil", you'll see that it actually ends up using Eulers in the final "Here is how to do it" example. -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |