void input(parg_event evt, float x, float y, float z) { char key = (char) x; switch (evt) { case PARG_EVENT_KEYPRESS: if (key == ' ') { mode_highp = !mode_highp; printf("Precision %s.\n", mode_highp ? "on" : "off"); parg_zcam_touch(); } else if (key == 'G') { showgrid = 1 - showgrid; parg_zcam_touch(); } else if (key == 'D') { if (!mode_demo_start) { mode_demo_start = current_time; mode_demo_direction = 1 - mode_demo_direction; } } break; case PARG_EVENT_DOWN: parg_zcam_grab_begin(x, y); break; case PARG_EVENT_UP: parg_zcam_grab_update(x, y, z); parg_zcam_grab_end(); break; case PARG_EVENT_MOVE: parg_zcam_grab_update(x, y, z); break; default: break; } }
void input(parg_event evt, float x, float y, float z) { switch (evt) { case PARG_EVENT_DOWN: parg_zcam_grab_begin(x, y); break; case PARG_EVENT_UP: parg_zcam_grab_update(x, y, z); parg_zcam_grab_end(); break; case PARG_EVENT_MOVE: parg_zcam_grab_update(x, y, z); break; default: break; } }