Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. void BoundingBox::softUpdate(const glm::vec3 position)
  2. {
  3. glm::vec4 newMin = glm::translate(glm::mat4(), position) * glm::vec4(originalMin.x, originalMin.y, originalMin.z, 1);
  4. min = glm::vec3(newMin.x, newMin.y, newMin.z);
  5.  
  6. glm::vec4 newMax = glm::vec4(originalMax, 1) * glm::translate(glm::mat4(), position);
  7. max = glm::vec3(newMax.x, newMax.y, newMax.z);
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement