abrend++at++idt.unit.no
Sun, 12 Mar 1995 13:17:35 +0100
/* Initialize keys */
qdevice(LEFTMOUSE);
qdevice(WINQUIT);
qdevice(LEFTARROWKEY);
qdevice(RIGHTARROWKEY);
qdevice(DOWNARROWKEY);
qdevice(UPARROWKEY);
qdevice(PAGEUPKEY);
qdevice(PAGEDOWNKEY);
/* Simulate for twenty seconds. */
while (!done)
{
/* Go to sleep until next frame time. */
pfSync();
while (qtest())
{
short arg;
switch (qread(&arg))
{
case (PAGEUPKEY):
zDirection += step;
break;
case (PAGEDOWNKEY):
zDirection -= step;
break;
case LEFTARROWKEY:
hDirection += step;
break;
case RIGHTARROWKEY:
hDirection -= step;
break;
case DOWNARROWKEY:
yDirection -= step;
break;
case UPARROWKEY:
yDirection += step;
break;
case WINQUIT:
case LEFTMOUSE:
done = TRUE;
break;
}
}
/* Compute new view position. */
pfSetVec3(viewDirection, xDirection, yDirection, zDirection);
pfSetVec3(viewAngles, hDirection, pDirection, rDirection);
pfChanView(chan, viewDirection, viewAngles);
/* Initiate cull/draw for this frame. */
pfFrame();
}
/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
/* WWW page : http://www.idt.unit.no:80/~abrend/ *
/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
email___________________________________________________
|
V
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Andreas Brendstuen _/ abrend++at++stud.unit.no _/
_/ Festningsgata 11 _/ abrend++at++idt.unit.no _/
_/ 7014 Trondheim, Norway _/ +47 61 29 44 34 _/
_/ +47 73 51 48 06 _/ (when visiting hometown) _/
_/ (don't call at saturday mornings) _/ _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:03 PDT