Re: [Plib-users] doubts about the struct sgCoords
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2003-04-12 19:15:09
|
Andreia R de Assuncao Schneider wrote: > Hi, > I'd like to know what is the meaning of the parameters passed to the > struct sgCoords (x,y,z and p,h,r). > As far as I know, x,y,z are the parametes of the translation and the > rotation is executed before the translation, but I dont't understand what > p, r, z mean... xyz is the translation (positive Z is up, X is to the right, Y is forwards) and hpr is the rotation. h == Heading (rotation about the Z axis) p == Pitch (rotation about the X axis) r == Roll (rotation about the Y axis). Some people use the word 'Yaw' instead of 'Heading' - but Yaw begins with a 'Y' and it gets confused with the Y axis. The array indices go in the same order as the letters, so hpr[0] is heading, hpr[1] is pitch and hpr[2] is roll. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |