software/MFrame/graphicalFunctions/matrix.cpp
/* 
 *	yrotate -	
 *		rotate about the y (green) axis
 */
yrotate
rotate about the y (green) axis
yrotate rotate about the y ( green ) axis
void YRotateMatrix(RGBMatrix matrix, float rs, float rc)
{
    float mmat[4][4];
    mmat[0][0] = rc;
    mmat[0][1] = 0.0;
    mmat[0][2] = -rs;
    mmat[0][3] = 0.0;
    mmat[1][0] = 0.0;
    mmat[1][1] = 1.0;
    mmat[1][2] = 0.0;
    mmat[1][3] = 0.0;
    mmat[2][0] = rs;
    mmat[2][1] = 0.0;
    mmat[2][2] = rc;
    mmat[2][3] = 0.0;
    mmat[3][0] = 0.0;
    mmat[3][1] = 0.0;
    mmat[3][2] = 0.0;
    mmat[3][3] = 1.0;
    MultiplyMatrix(mmat, matrix, matrix);
}
void YRotateMatrix ( RGBMatrix matrix , float rs , float rc ) { float mmat [ 4 ] [ 4 ] ; mmat [ 0 ] [ 0 ] = rc ; mmat [ 0 ] [ 1 ] = 0.0 ; mmat [ 0 ] [ 2 ] = - rs ; mmat [ 0 ] [ 3 ] = 0.0 ; mmat [ 1 ] [ 0 ] = 0.0 ; mmat [ 1 ] [ 1 ] = 1.0 ; mmat [ 1 ] [ 2 ] = 0.0 ; mmat [ 1 ] [ 3 ] = 0.0 ; mmat [ 2 ] [ 0 ] = rs ; mmat [ 2 ] [ 1 ] = 0.0 ; mmat [ 2 ] [ 2 ] = rc ; mmat [ 2 ] [ 3 ] = 0.0 ; mmat [ 3 ] [ 0 ] = 0.0 ; mmat [ 3 ] [ 1 ] = 0.0 ; mmat [ 3 ] [ 2 ] = 0.0 ; mmat [ 3 ] [ 3 ] = 1.0 ; MultiplyMatrix ( mmat , matrix , matrix ) ; }
yrotate 
              rotate about the y (green) axis
yrotate rotate about the y ( green ) axis