//-------------------------------------------------------------- void testApp::saveImg(){ pic.setFromPixels(vidGrabber.getPixelsRef()); pic.reloadTexture(); makeMirror(); makeLeft(); makeRight(); }
void setupCircularDisplacementFunction(void) { int i = 0; Displacement *ptr; for (i = 0; i < DISPLACEMENT_LENGTH; i++) { ptr = &circularDisplacementFunction[i]; if (i < DISPLACEMENT_LENGTH / 4) { // step 1: the sharks starts off going right makeRight(ptr); } else if (i < DISPLACEMENT_LENGTH / 2) { // step 2: the sharks goes down makeDown(ptr); } else if (i < 3 * DISPLACEMENT_LENGTH / 4) { // step 3: the sharks goes left makeLeft(ptr); } else { // step 4: the sharks goes up makeUp(ptr); } ptr->next = &circularDisplacementFunction[i + 1]; } ptr = &circularDisplacementFunction[DISPLACEMENT_LENGTH - 1]; ptr->next = circularDisplacementFunction; }