Re: [Plib-devel] Quaternions in plib
Brought to you by:
sjbaker
From: Alexander R. <a_r...@in...> - 2000-08-11 00:27:31
|
Hi, > > 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. a) DONT USE EULER ANGLES AT ALL! b) use either direction vectors as I do, or quaternions, construct the transformation matrix yourself, BUT DONT USE EULER ANGLES! c) you can calc direction vectors/quaternions to euler angles, that is safe, the other way round is 'unsafe' d) It cost me a month , exactly this e) have a look at the math help page on kobayashimaru.sourceforge.net f) DONT USE EULER ANGLES! I expect SpaceThing and KobayashiMaru very similar, have a look at ssgUtil.cxx and spaceobject.cxx:PitchShip/MoveShip/setTransform will give ypou the code you need. Alex -- Alexander Rawass Email: ale...@us... Project Homepage: http://kobayashimaru.sourceforge.net ...but some day you'll be a STAR in somebody else's SKY... |