private static void mat4_util_inplace_rotate(float[] inOutMatrix,float eulerRadiansX,float eulerRadiansY,float eulerRadiansZ){
  float cos_rx=(float)Math.cos(eulerRadiansX);
  float cos_ry=(float)Math.cos(eulerRadiansY);
  float cos_rz=(float)Math.cos(eulerRadiansZ);
  float sin_rx=(float)Math.sin(eulerRadiansX);
  float sin_ry=(float)Math.sin(eulerRadiansY);
  float sin_rz=(float)Math.sin(eulerRadiansZ);
  float b00=cos_rz * cos_ry;
  float b10=sin_rz * cos_ry;
  float b20=-sin_ry;
  float b30=0.0f;
  float b01=-sin_rz * cos_rx + cos_rz * sin_ry * sin_rx;
  float b11=cos_rz * cos_rx + sin_rz * sin_ry * sin_rx;
  float b21=cos_ry * sin_rx;
  float b31=0.0f;
  float b02=sin_rz * sin_rx + cos_rz * sin_ry * cos_rx;
  float b12=-cos_rz * sin_rx + sin_rz * sin_ry * cos_rx;
  float b22=cos_ry * cos_rx;
  float b32=0.0f;
  float b03=0.0f;
  float b13=0.0f;
  float b23=0.0f;
  float b33=1.0f;
  float a00=inOutMatrix[0];
  float a10=inOutMatrix[1];
  float a20=inOutMatrix[2];
  float a30=inOutMatrix[3];
  float a01=inOutMatrix[4];
  float a11=inOutMatrix[5];
  float a21=inOutMatrix[6];
  float a31=inOutMatrix[7];
  float a02=inOutMatrix[8];
  float a12=inOutMatrix[9];
  float a22=inOutMatrix[10];
  float a32=inOutMatrix[11];
  float a03=inOutMatrix[12];
  float a13=inOutMatrix[13];
  float a23=inOutMatrix[14];
  float a33=inOutMatrix[15];
  inOutMatrix[0]=a00 * b00 + a01 * b10 + a02 * b20 + a03 * b30;
  inOutMatrix[1]=a10 * b00 + a11 * b10 + a12 * b20 + a13 * b30;
  inOutMatrix[2]=a20 * b00 + a21 * b10 + a22 * b20 + a23 * b30;
  inOutMatrix[3]=a30 * b00 + a31 * b10 + a32 * b20 + a33 * b30;
  inOutMatrix[4]=a00 * b01 + a01 * b11 + a02 * b21 + a03 * b31;
  inOutMatrix[5]=a10 * b01 + a11 * b11 + a12 * b21 + a13 * b31;
  inOutMatrix[6]=a20 * b01 + a21 * b11 + a22 * b21 + a23 * b31;
  inOutMatrix[7]=a30 * b01 + a31 * b11 + a32 * b21 + a33 * b31;
  inOutMatrix[8]=a00 * b02 + a01 * b12 + a02 * b22 + a03 * b32;
  inOutMatrix[9]=a10 * b02 + a11 * b12 + a12 * b22 + a13 * b32;
  inOutMatrix[10]=a20 * b02 + a21 * b12 + a22 * b22 + a23 * b32;
  inOutMatrix[11]=a30 * b02 + a31 * b12 + a32 * b22 + a33 * b32;
  inOutMatrix[12]=a00 * b03 + a01 * b13 + a02 * b23 + a03 * b33;
  inOutMatrix[13]=a10 * b03 + a11 * b13 + a12 * b23 + a13 * b33;
  inOutMatrix[14]=a20 * b03 + a21 * b13 + a22 * b23 + a23 * b33;
  inOutMatrix[15]=a30 * b03 + a31 * b13 + a32 * b23 + a33 * b33;
}

private static void mat4_util_inplace_rotate ( float [ ] inOutMatrix , float eulerRadiansX , float eulerRadiansY , float eulerRadiansZ ) { float cos_rx = ( float ) Math . cos ( eulerRadiansX ) ; float cos_ry = ( float ) Math . cos ( eulerRadiansY ) ; float cos_rz = ( float ) Math . cos ( eulerRadiansZ ) ; float sin_rx = ( float ) Math . sin ( eulerRadiansX ) ; float sin_ry = ( float ) Math . sin ( eulerRadiansY ) ; float sin_rz = ( float ) Math . sin ( eulerRadiansZ ) ; float b00 = cos_rz * cos_ry ; float b10 = sin_rz * cos_ry ; float b20 = - sin_ry ; float b30 = 0.0f ; float b01 = - sin_rz * cos_rx + cos_rz * sin_ry * sin_rx ; float b11 = cos_rz * cos_rx + sin_rz * sin_ry * sin_rx ; float b21 = cos_ry * sin_rx ; float b31 = 0.0f ; float b02 = sin_rz * sin_rx + cos_rz * sin_ry * cos_rx ; float b12 = - cos_rz * sin_rx + sin_rz * sin_ry * cos_rx ; float b22 = cos_ry * cos_rx ; float b32 = 0.0f ; float b03 = 0.0f ; float b13 = 0.0f ; float b23 = 0.0f ; float b33 = 1.0f ; float a00 = inOutMatrix [ 0 ] ; float a10 = inOutMatrix [ 1 ] ; float a20 = inOutMatrix [ 2 ] ; float a30 = inOutMatrix [ 3 ] ; float a01 = inOutMatrix [ 4 ] ; float a11 = inOutMatrix [ 5 ] ; float a21 = inOutMatrix [ 6 ] ; float a31 = inOutMatrix [ 7 ] ; float a02 = inOutMatrix [ 8 ] ; float a12 = inOutMatrix [ 9 ] ; float a22 = inOutMatrix [ 10 ] ; float a32 = inOutMatrix [ 11 ] ; float a03 = inOutMatrix [ 12 ] ; float a13 = inOutMatrix [ 13 ] ; float a23 = inOutMatrix [ 14 ] ; float a33 = inOutMatrix [ 15 ] ; inOutMatrix [ 0 ] = a00 * b00 + a01 * b10 + a02 * b20 + a03 * b30 ; inOutMatrix [ 1 ] = a10 * b00 + a11 * b10 + a12 * b20 + a13 * b30 ; inOutMatrix [ 2 ] = a20 * b00 + a21 * b10 + a22 * b20 + a23 * b30 ; inOutMatrix [ 3 ] = a30 * b00 + a31 * b10 + a32 * b20 + a33 * b30 ; inOutMatrix [ 4 ] = a00 * b01 + a01 * b11 + a02 * b21 + a03 * b31 ; inOutMatrix [ 5 ] = a10 * b01 + a11 * b11 + a12 * b21 + a13 * b31 ; inOutMatrix [ 6 ] = a20 * b01 + a21 * b11 + a22 * b21 + a23 * b31 ; inOutMatrix [ 7 ] = a30 * b01 + a31 * b11 + a32 * b21 + a33 * b31 ; inOutMatrix [ 8 ] = a00 * b02 + a01 * b12 + a02 * b22 + a03 * b32 ; inOutMatrix [ 9 ] = a10 * b02 + a11 * b12 + a12 * b22 + a13 * b32 ; inOutMatrix [ 10 ] = a20 * b02 + a21 * b12 + a22 * b22 + a23 * b32 ; inOutMatrix [ 11 ] = a30 * b02 + a31 * b12 + a32 * b22 + a33 * b32 ; inOutMatrix [ 12 ] = a00 * b03 + a01 * b13 + a02 * b23 + a03 * b33 ; inOutMatrix [ 13 ] = a10 * b03 + a11 * b13 + a12 * b23 + a13 * b33 ; inOutMatrix [ 14 ] = a20 * b03 + a21 * b13 + a22 * b23 + a23 * b33 ; inOutMatrix [ 15 ] = a30 * b03 + a31 * b13 + a32 * b23 + a33 * b33 ; }
\ fn mat4_util_inplace_rotate \ brief in place rotate using eulerradiansx , eulerradiansy , eulerradiansz \ param inoutmatrix [ mat4 ] \ param eulerradiansx [ float ] \ param eulerradiansy [ float ] \ param eulerradiansz [ float ]
