Re: Rolling

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Wed, 14 Jul 1999 13:04:38 -0700


Rob Body - HR Mardyn wrote:
>
> Hi pfFriends,
>
> I am having a problem when trying to roll my scene about.
>
> I have attached an image to my viewing position, but when I do the
> following:
>
> pfSetVec3(hpr,viewhdg,0.0f,0.0f);
> prChanView(chan,xyz,hpr);
> pfDCSRot(imagedcs,hdg,0.0f,roll);
>
> my image only rolls,
>
> when I do the following:
>
> pfSetVec3(hpr,viewhdg,0.0f,roll);
> prChanView(chan,xyz,hpr);
> pfDCSRot(imagedcs,hdg,0.0f,0.0f);
>
> the whole scene - land/sky and image all roll.
>
> What I would like to happen is for only the land/sky to roll and my image to
> stay still.
>
> Does anyone have any ideas where I am going wrong ?

Seems obvious that you need to apply the FULL viewing translation and
orientation to the DCS.

Your first example clearly doesn't set the channel heading, only the
roll then set's the heading AND roll of the DCS, that won't work.

Your second code fragment you sent does the opposite, it sets DCS
heading after it sets channel heading AND roll.

What you need is this:

pfSetVec3(hpr,viewhdg,0.0f,roll);
prChanView(chan,xyz,hpr);
pfDCSRot(imagedcs,hdg,0.0f,roll);

It is slightly worrying that hdg is not the same variable as viewhdg,
these must be the same for this to work.

Cheers,Angus.

-- 
For years now, whenever NT has been proven to have some debilitating
weakness we've heard from MS advocates that NT would catch up, there was
just an incredible faith in this OS and Microsoft's ability to somehow
get there. With the recent results of the Linux vs NT serving benchmark
that same attitude can be seen in the Linux community. The Linux folks
aren't too worried, "Sure the single threaded IP stack was slow but
it'll be fixed in the next release.", it's eerily familiar but I have
confidence in the Linux community's ability to remedy problems and I
don't groan in pain as I used to when Microsoft made similar claims.

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Wed Jul 14 1999 - 13:04:44 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.