Alvaro Cassinelli
/
skinGames_forktest
just a test
Fork of scoreLight_Advanced by
Diff: rigidLoop.cpp
- Revision:
- 26:c9329c4fc20a
- Parent:
- 25:74cb85b85fd2
- Child:
- 27:1ce994629ffc
diff -r 74cb85b85fd2 -r c9329c4fc20a rigidLoop.cpp --- a/rigidLoop.cpp Mon Jun 18 11:37:00 2012 +0000 +++ b/rigidLoop.cpp Mon Jun 18 12:39:28 2012 +0000 @@ -133,7 +133,8 @@ // Excursion limits (for all points). Tthis will set the limits of motion for the rigid loop, which is given by it's central position, so we have to correct by the radius: setRegionMotion(MIN_AD_MIRRORS+saccadeRadius, MIN_AD_MIRRORS+saccadeRadius, MAX_AD_MIRRORS-saccadeRadius, MAX_AD_MIRRORS-saccadeRadius); - + // draw it once on the display buffer for good initialization: + draw(); } @@ -156,6 +157,7 @@ centerMass.setIntegrationStep(0.23); // VERY IMPORTANT! in the case of verlet integration, we need to set dt BEFORE setting the initial speed. centerMass.setInitialCondition(startCenter, startSpeed); // centerMass.setInitialCondition(2047.0, 2047.0,0.0,0.0); + } void rigidLoop::setRegionMotion(float mmix, float mmiy, float mmax, float mmay) { // wrapper for setWallLimits, because there is no more things to do than set this for a unique mass