Re: [Plib-users] Problem with rotations
Brought to you by:
sjbaker
From: Ben W. <za...@ec...> - 2002-09-10 03:06:38
|
Hello Steve.. Ya, I don't have a problem with that.. It seems to be sgMakeRotMat(mat, h,p,r) where pitch is set to something other then 0. Then I converted it back to sgCoord and used transform, although in my code, I also tried just using the matrix and it did the same thing. Try coping the file that I sent over tux_example.cxx and see that happens. If you go back to the code in the update_motion function and user the header or the role things work fine, but pitch causes problems. I will keep looking for the problem, but I can't find it, when I seperated into tux_example (so its not something in my applicaton) and it only happens with pitch (header and role are fine) then I don't know what else it could be. Ben ----- Original Message ----- From: "Steve Baker" <sjb...@ai...> To: <pli...@li...> Sent: Monday, September 09, 2002 11:51 PM Subject: Re: [Plib-users] Problem with rotations > Ben Woodhead wrote: > > I did read these articles but I will read them again. But I did use a matrix > > stack from the rotations and I am only rotating around 1 axe. If I change > > the code to just rotate around x it works, and if I change it to rotate > > around just z there is no problem, but just y causes some really weird > > results. Did you have a look at the code.. > > Sorry - no - I've been kinda busy. I've seen *thousands* of cases of > objects rotating nicely around the Y axis - so I'm not inclined to suspect > a bug in PLIB...but anything's possible. > > Just to be *sure*, I went into examples/src/ssg/tux/tux_example.cxx - and > changed the line: > > sgSetCoord ( & tuxpos, 0.0f, 0.0f, 0.0f, frameno, 0.0f, 0.0f ) ; > > ...and switched 'frameno' from Heading (Rotation about Z) to Roll (Rotation about Y): > > sgSetCoord ( & tuxpos, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, frameno ) ; > > ...and tux leans to the right, gradually disappears under the pedestal and > reappears on the left...exactly as I'd expect. > > ----------------------------- Steve Baker ------------------------------- > Mail : <sjb...@ai...> WorkMail: <sj...@li...> > URLs : http://www.sjbaker.org > http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net > http://prettypoly.sf.net http://freeglut.sf.net > http://toobular.sf.net http://lodestone.sf.net > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users > |