title: How to go from GLM to JOML (OpenGL Mathematics Libraries)
body: <p>I have a code for my C++ Transform class that is supposed to give the user of the class a Model View Matrix</p>
  
  <p><strong>code-listing 1:</strong></p>
  
  <pre><code>glm::mat4 Transform::GetModel(glm::vec3 pos, glm::vec3 rot, glm::vec3 scale, glm::mat4 parentTransformationMatrix){
      glm::mat4 posMat    = glm::translate(pos);
      glm::mat4 scaleMat  = glm::scale(scale);
      glm::mat4 rotX      = glm::rotate(rot.x, glm::vec3(1.0, 0.0, 0.0));
      glm::mat4 rotY      = glm::rotate(rot.y, glm::vec3(0.0, 1.0, 0.0));
      glm::mat4 rotZ      = glm::rotate(rot.z, glm::vec3(0.0, 0.0, 1.0));
      glm::mat4 rotMat    = rotX * rotY * rotZ;
  
      return parentTransformationMatrix * posMat * rotMat * scaleMat;
  }
  </code></pre>
  
  <p>I made part of the code using JOML (for LWJGL3) already but I'm stuck with other parts (commented)</p>
  
  <p><strong>code-listing 2:</strong></p>
  
  <pre><code>public Matrix4f GetModel(Vector3f pos, Vector3f rot, Vector3f scale, Matrix4f parentTransformationMatrix){
      Matrix4f posMat   ;// = translate(pos);
      Matrix4f scaleMat ;// = scale(scale);
      Matrix4f rotX     ;// = rotate(rot.x, Vector3f(1.0, 0.0, 0.0));
      Matrix4f rotY     ;// = rotate(rot.y, Vector3f(0.0, 1.0, 0.0));
      Matrix4f rotZ     ;// = rotate(rot.z, Vector3f(0.0, 0.0, 1.0));
      Matrix4f rotMat    = rotX.mul(rotY).mul(rotZ);
  
      return parentTransformationMatrix.mul(posMat).mul(rotMat).mul(scaleMat);
  }
  </code></pre>