[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Camera thoughts

MAO wrote:

>         Hum, ok, I know the matrix form for all the basic transforms. So the
> idea is, forget about gluLookAt and compose the MODELVIEW matrix on my
> own?


> With the camera model I described, would that be replacing the GLU
> function call by three glRotates (about the three camera axis) and one
> glTranslate?

Well, not exactly I suggest that... 
>> You should read my two FAQ's on this subject:
>>   http://www.sjbaker.org/steve/omniv/matrices_can_be_your_friends.html
>>   http://www.sjbaker.org/steve/omniv/eulers_are_evil.html
>         Hehe, I read those :)

I don't think so - the second FAQ explains in great detail what you should

> > >         This seems to work fine, but if, for example, I pitch up, and start
> > > just applying yaw repeatedly, I notice that the camera slowly starts
> > > leveling, canceling the initial pitch.
> >
> > That's probably to do with the order that the yaw and pitch angles are
> > applied.  My 'Eulers Are Evil' document explains this in some detail.
>         I'll take a look at that, although I believe that I have experimented,
> without success, exchanging the order of rotations from yaw, pitch to
> pitch, yaw.

The fact that they are applied in a certain order is the problem - but it
doesn't matter which order you apply them, there will *still* be problems.

This is why "Eulers Are Evil" and why you need to re-read that FAQ *carefully*.

----------------------------- Steve Baker -------------------------------
Mail : <sjbaker1@airmail.net>   WorkMail: <sjbaker@link.com>
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