Mercurial > hg > opencollidoscope
diff CollidoscopeApp/src/Chunk.cpp @ 16:4dad0b810f18
Comment tidy up + attributions
author | Fiore Martin <f.martin@qmul.ac.uk> |
---|---|
date | Tue, 16 Aug 2016 14:27:53 +0100 |
parents | 75b744078d66 |
children |
line wrap: on
line diff
--- a/CollidoscopeApp/src/Chunk.cpp Mon Aug 15 17:00:22 2016 +0100 +++ b/CollidoscopeApp/src/Chunk.cpp Tue Aug 16 14:27:53 2016 +0100 @@ -44,7 +44,7 @@ void Chunk::update( const DrawInfo &di ) { using namespace ci; - /* if resetting animate the chunks to shrink to 0 size */ + /* if resetting animate the chunks to nicely shrink to 0 size */ if ( mResetting ){ if ( mAnimate > 0.0f ){ mAnimate -= 0.1f; @@ -64,7 +64,7 @@ } } - mX = di.flipX( 1 + (mIndex * (2 + kWidth)) ); // FIXME this should happen only once when resized + mX = di.flipX( 1 + (mIndex * (2 + kWidth)) ); // FIXME more efficient if it happens only once when resized } void Chunk::draw( const DrawInfo& di, ci::gl::BatchRef &batch ){ @@ -74,11 +74,10 @@ const float chunkHeight = mAnimate * mAudioTop * di.getMaxChunkHeight(); - // place the chunk in the right position brigns back the y of chunkHeight/2 so + // place the chunk in the right position brings back the y of chunkHeight/2 so // so that after scaling the wave is still centered at the wave center gl::translate( mX, di.getWaveCenterY() - ( chunkHeight / 2 ) - 1 ); - // FIXME todo use max between top and bottom // scale according to audio amplitude gl::scale( 1.0f, chunkHeight ); batch->draw();