Sylvain Mayer (mayer++at++poster.cae.ca)
Tue, 29 Jul 1997 06:40:03 -0400
Hi Eric,
you want to use pfChanViewOffsets only once in the channelSetup()
routine to place your channel where you want (into the plane).
> void
> updateSim(pfChannel *chan)
> {
> /* ... all the perfly updateSim code ... */
> /* ... Stuff to read stick inputs and call the f15 dynamics ... */
> /* ... ship->rot contains current h,p,r rotations ... */
> /* ... ship->pos contains current x,y,z translations ... */
>
> pfDCSTrans(ship->dcs,ship->pos[0],ship->pos[1],ship->pos[2]);
> pfDCSRot(ship->dcs,ship->rot[0],ship->rot[1],ship->rot[2]);
>
> pfChanViewOffsets(Chan[0],ship->pos,ship->rot);
> }
In the updateSim() routine, change the call to pfChanViewOffsets for
a call to pfChanView.
Your channel will always be updated with the same position as your
ship and will be added its offset to place it where you really want.
hope this help,
--
Sylvain Mayer, Software Developer, 3-D Graphics Applications
CAE Electronics Ltd. (http://www.cae.ca)
8585 Cote De Liesse, Saint-Laurent, Quebec, Canada, H4L-4X4
tel: +1 514 341 2000 extension 2275, fax: +1 514 340 5496
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:40 PDT