Revision 7:a4a336624f5a

View differences:

CollidoscopeApp/include/DrawInfo.h
93 93
    int32_t getWaveCenterY() const
94 94
    {
95 95
        if ( mWaveIndex == 0 )
96
            return mWindowHeight * 0.75f + 1;
96
            return mWindowHeight - ( mWindowHeight / ( 2 * NUM_WAVES ) ) + 1;
97 97
        else
98 98
            return mWindowHeight / (NUM_WAVES * 2);
99 99
    }
CollidoscopeApp/include/Oscilloscope.h
57 57
        }
58 58

  
59 59
        audioVal *= 0.8f;
60
        // this yRatio is for the bottom scope, the top will be drawn with a translation/4
61
        // because it's half of the half of the tier where the wave is drawn  
60
        // map audio val from [-1.0, 1.0] to [0.0, 1.0]
61
        // then map the value obtained to the height of the wave tier ( window height / NUM_WAVES ) 
62 62
        float yRatio = ((1 + audioVal) / 2.0f) * (di.getWindowHeight() / NUM_WAVES );
63 63
        float xRatio = index * (di.getWindowWidth() / (float)mLine.size());
64 64

  
65
        // this flips the coordinates for the second wave 
65 66
        mLine.getPoints()[index].x = float( di.flipX( int(xRatio) ) );
66 67
        mLine.getPoints()[index].y = float( di.flipY( int(yRatio) ) );
67 68

  
CollidoscopeApp/include/Wave.h
87 87
        /** Sets the size of selection. size is the number of chunks the selection is made of */
88 88
        void setSize( size_t size );
89 89
        
90
        /** Particle spread is used to calculate the size of the cloud of particles */
90
        /** The particle spread parameter affects the size of the cloud of particles
91
         *  The cloud is the visual conterpart of the grain duration coefficien in sound.
92
         *  Indeed spread accepts values from 1 to 8, exactly as the duration coefficient
93
         */
91 94
        void inline setParticleSpread( float spread ){
92 95
            mParticleSpread = spread;
93 96
        }

Also available in: Unified diff