Advertisement
Guest User

Untitled

a guest
Apr 25th, 2014
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. glm::mat4 myMatrix = glm::translate(glm::mat4(1.0f),trans);
  2. glm::mat4 Model = glm::mat4(1.f);
  3. glm::mat4 myScalingMatrix = glm::scale(sx, sy ,sz);
  4. glm::vec3 myRotationAxis( 0, 1, 0);
  5. glm::mat4 myRotationMatrix =glm::rotate(glm::mat4(1.0f),rot, myRotationAxis);
  6.  
  7. Model= myScalingMatrix* myRotationMatrix*myMatrix;
  8. glm::mat4 MVP = Projection* View * Model;
  9.  
  10. glm::mat4 Model = glm::mat4(1.f);
  11. glm::mat4 myScalingMatrix = glm::scale(sx, sy ,sz);
  12. glm::vec3 myRotationAxis( 0, 1, 0);
  13. glm::mat4 myRotationMatrix =glm::rotate(glm::mat4(1.0f),rot, myRotationAxis);
  14.  
  15. glm::vec4 trans(x,y,z,1);
  16. glm::vec4 vTrans = myRotationMatrix* trans ;
  17. glm::mat4 myMatrix = glm::translate(glm::mat4(1.0f),vTrans.x,vTrans.y,vTrans.z);
  18. Model= myScalingMatrix* myRotationMatrix*myMatrix;
  19.  
  20. glm::mat4 Model = glm::mat4(1.f);
  21. glm::mat4 myScalingMatrix = glm::scale(sx, sy ,sz);
  22. glm::vec3 myRotationAxis( 0, 1, 0);
  23. glm::mat4 myRotationMatrix =glm::rotate(glm::mat4(1.0f),rot, myRotationAxis);
  24.  
  25. glm::vec4 vTrans = myRotationMatrix * trans;
  26.  
  27.  
  28. glm::mat4 myMatrix = glm::translate(glm::mat4(1.0f), vTrans.xyz);
  29.  
  30. Model= myScalingMatrix* myRotationMatrix*myMatrix;
  31. glm::mat4 MVP = Projection* View * Model;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement