feat: add support for stepping PSO iterations
Pressing ',' will now step entire PSO iterations, while '.' will step only individual frames.
This commit is contained in:
parent
264f381306
commit
c4ef11f38e
12
src/main.cpp
12
src/main.cpp
@ -111,6 +111,14 @@ main(int argc, char **argv) {
|
|||||||
case ' ':
|
case ' ':
|
||||||
pause = !pause;
|
pause = !pause;
|
||||||
break;
|
break;
|
||||||
|
case ',':
|
||||||
|
for(int j = 0; j < kFPS/4; ++j) {
|
||||||
|
swarm.move(kDT * 4);
|
||||||
|
if(i % (kFPS/4) == (kFPS/4)-1)
|
||||||
|
swarm.step();
|
||||||
|
|
||||||
|
++i;
|
||||||
|
}
|
||||||
case '.':
|
case '.':
|
||||||
pause = false;
|
pause = false;
|
||||||
frame_step = true;
|
frame_step = true;
|
||||||
@ -168,8 +176,8 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
case 'h':
|
case 'h':
|
||||||
printf(" movement zoom coloring pause step \n"
|
printf(" movement zoom coloring pause step \n"
|
||||||
" W i I K SPC . \n"
|
" W io IK LO SPC ., \n"
|
||||||
" ASD o O L \n"
|
" ASD \n"
|
||||||
" quit: q \n");
|
" quit: q \n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user