title: WebGL rotate function
body: <p>I'm trying to understand the rotation of the matrices using WebGL.</p>
  
  <p>I got this <strong>mat4()</strong> matrix and I have to apply these transformations :</p>
  
  <pre><code>m = translate(torsoHeight+1*headHeight, 5, 0.0); 
  m = mult(m, rotate(theta[head1Id], 1, 0, 0))
  m = mult(m, rotate(theta[head2Id], 0, 1, 0));
  m = mult(m, translate(0.0, -0.5*headHeight, 0.0));
  figure[headId] = createNode( m, head, leftUpperArmId, null);
  break;
  </code></pre>
  
  <p>I did not understand exactly how the mult function works. The first parameter is my matrix.
  The <strong>theta[]</strong> is built in this way :</p>
  
  <pre><code>var theta = [0, 0, 0, 0, 0, 0, 180, 0, 180, 0, 0];
  </code></pre>
  
  <p>and  </p>
  
  <pre><code>var headId  = 1;
  var head1Id = 1;
  var head2Id = 10;
  </code></pre>
  
  <p>Am I right if I thought that the second parameter is another matrix build with the rotate() function ? In  this case how does the rotate function work ?</p>