// openFrameworks calls this function before every draw cycle void HelloMultitouch::update(){ // For consistency, we try to run GestureWorks at a constant rate - about 60Hz in this case clock_t this_tick(clock()); if (this_tick - last_tick < 16) return; last_tick = this_tick; // Tell GestureWorks to process all of the data since the last frame GestureWorks::Instance()->ProcessFrame(); // Get all the point events from the current frame std::vector point_events = GestureWorks::Instance()->ConsumePointEvents(); handlePointEvents(point_events); }