title: Using glm to create a model matrix based off of three vec3
body: <p>So I am trying to take three variables</p>
  
  <pre><code>glm::vec3 Translation;
  glm::vec3 Rotation; //Euler angles
  glm::vec3 Scale;
  </code></pre>
  
  <p>And make a model view matrix, that way each time one of those three vectors is changed I can pass a shader a new model view matrix.</p>
  
  <p>My problem is that I only know how to tell glm how to translate/rotate at one parameter at a time.  And not only is that probably less processor efficent, but I suspect I would run into Gimbal lock with my euler angles.</p>
  
  <p>I was wondering if you could help me make a function in glm that creates a model matrix ready to go to the shader.  This is sorta what I think it would look like. BTW i am in c++.</p>
  
  <pre><code>glm::vec3 Translation;
  glm::vec3 Rotation; //Euler angles
  glm::vec3 Scale;
  glm::mat4 ModelMatrix
  void UpdateModelMatrix()
  {
      ModelMatrix = glm::mat4(); //set it to an identity matrix
      //Code stuffs
  
  
      //At this point the mat4 will reflect the scale rotation and translations above
  }
  </code></pre>
  
  <p>I have tried using some quaternions math but it hasn't worked out.</p>
  
  <p>Thanks much!</p>