void set_animation(int step) { for(unsigned int i = 0; i < PView::list.size(); i++){ PView * p = PView::list[i]; if(p->getOptions()->visible){ p->getOptions()->timeStep = step; p->setChanged(true); } } }
int animation_next() { int ret = 0; for(unsigned int i = 0; i < PView::list.size(); i++){ PView * p = PView::list[i]; if(p->getOptions()->visible){ int step = (int)p->getOptions()->timeStep + 1; int numSteps = (int)p->getData()->getNumTimeSteps(); if(step < 0) step = numSteps - 1; if(step > numSteps - 1) step = 0; p->getOptions()->timeStep = step; p->setChanged(true); ret = step; } } return ret; }