Motion with keyboard

New Message Reply Date view Thread view Subject view Author view

Luc Renambot (Luc.Renambot++at++irisa.fr)
Thu, 17 Oct 1996 19:03:20 +0200


Hi,
I have tried to modify perfly to be able to use the keyboard
in the fly or drive mode because it's more precise than mouse
when using big models.
I would like something like that : + and - for increase and decrease
the speed. Up and down arrow to go forward and backward.
Left and riht key to turn. And some keys to go up and down.

For example, I put this for the '-' key to decrease the speed :

if (ViewState->xformerModel == PFITDF_FLY) {
        pfiInputXformFly *ff = pfiGetTDFXformerFly(ViewState->xformer);
        pfiIXformFlyMode(ff, PFIXFLY_MODE_ACCEL, PFIXFLY_ACCEL_DECREASE);
}

I doens't work.

To change view direction, I put :
            case PFUDEV_RIGHTARROWKEY:
              if (ViewState->xformerModel == PFITDF_FLY) {
                pfiInputXformFly *ff = pfiGetTDFXformerFly(ViewState->xformer);
                pfiIXformFlyMode(ff, PFIXFLY_MODE_MOTION, PFIXFLY_MOTION_HP);
                float pos[2];
                pos[0] = 0.7; pos[1] = 0.5;
                pfiInputCoordVec(pfiGetIXformInputCoordPtr(ff), pos);
              }
It seems not very good ... And that stops the fly and I can't move anymore
(without the help of the mouse ;-).

Someone have already done something like that before ?
Thanks in advance.

Luc.

-- 
Renambot Luc      : renambot++at++irisa.fr
Irisa - CAPS Team : http://www.irisa.fr/caps
-------------------
"There is a crack in everything, that's how the light gets in" L.C.

======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:46 PDT

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