void HW3b::wave() { getforce(); getvelocity(); getposition(); initVertexBuffer(); updateGL(); }
void wave(void) { if (waving) { getforce(); getvelocity(); getposition(); glutPostRedisplay(); } }
///////////////////////////////////////////////////////// // bang // ///////////////////////////////////////////////////////// void newWave :: bangMess(void) { savepos(); getvelocity(); getposition(); getFaceNorms(); getVertNorms(); getforce(); getdamp(); }
/*** *** The timeout function. Often in animations, *** timeout functions are suitable for continous *** frame updates. ***/ static gboolean timeout (GtkWidget *widget) { GtkAllocation allocation; GdkWindow *window; getforce (); getvelocity (); getposition (); window = gtk_widget_get_window (widget); gtk_widget_get_allocation (widget, &allocation); /* Invalidate the whole window. */ gdk_window_invalidate_rect (window, &allocation, FALSE); /* Update synchronously (fast). */ gdk_window_process_updates (window, FALSE); return TRUE; }