Path: chuka.playstation.co.uk!news From: "Jon Prestidge (Jon@surfed.to)" Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: libps - RotMatrix() Date: Fri, 26 Oct 2001 11:27:37 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 33 Message-ID: <9rbe2d$2i1@www.netyaroze-europe.com> References: <3BD923D9.872FC1A0@127.0.0.1> NNTP-Posting-Host: host213-122-148-70.btinternet.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Hello Majik... > 1) Why does RotMatrix() go the way it does? ... I suppose they thought that would be most commonly used. I tend to forget about that routine and use the separate rotation routines regardless. If your asking why it's ZYX rather than XYZ that's probably because it's a child to parent matrix rather than a parent to child matrix. When I look at example code on the net written for the PC etc (where people have to write their own matrix co-ordinate system code): co-ordinate system matrices seem to be parent to child. The PS want's child to parent so that it's less work for it to do when calculating the screen coordinates. > 3) What bug still exists in the second > code frag? > (it actually produced some > 'interesting results at first') it depends what you actually want but generally speaking I'd have thought you'd want a "*mtrx = GsIDMATRIX;" before your RotMatrixX etc because those individual rotation routines don't reset the matrix unlike the one that does all three. > 4) Anyone else had a similar 'experience' with RotMatrix() ... look for the dreaded 'Gimbal Lock' on the net (places like Gamasutra etc)... it's a well documented problem. I had this problem ages ago but I couldn't find any info on it until I discovered what the problem was actually called ... then I could find loads of info on it. Jon