software/MFrame/graphicalFunctions/matrix.cpp
/* 
 *	xrotate -	
 *		rotate about the x (red) axis
 */
xrotate
rotate about the x (red) axis
xrotate rotate about the x ( red ) axis
void XRotateMatrix(RGBMatrix matrix, float rs, float rc)
{
    RGBMatrix mmat;
    mmat[0][0] = 1.0;
    mmat[0][1] = 0.0;
    mmat[0][2] = 0.0;
    mmat[0][3] = 0.0;
    mmat[1][0] = 0.0;
    mmat[1][1] = rc;
    mmat[1][2] = rs;
    mmat[1][3] = 0.0;
    mmat[2][0] = 0.0;
    mmat[2][1] = -rs;
    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 XRotateMatrix ( RGBMatrix matrix , float rs , float rc ) { RGBMatrix mmat ; mmat [ 0 ] [ 0 ] = 1.0 ; mmat [ 0 ] [ 1 ] = 0.0 ; mmat [ 0 ] [ 2 ] = 0.0 ; mmat [ 0 ] [ 3 ] = 0.0 ; mmat [ 1 ] [ 0 ] = 0.0 ; mmat [ 1 ] [ 1 ] = rc ; mmat [ 1 ] [ 2 ] = rs ; mmat [ 1 ] [ 3 ] = 0.0 ; mmat [ 2 ] [ 0 ] = 0.0 ; mmat [ 2 ] [ 1 ] = - rs ; 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 ) ; }
xrotate 
              rotate about the x (red) axis
xrotate rotate about the x ( red ) axis