Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. // w Update()
  2. // przykładowe klawisze, posZ to nowa zmienna zdefiniowana w klasie Game
  3.     if (Keyboard::isPressed(GLFW_KEY_LEFT_CONTROL))
  4.     {
  5.         posZ = posZ - speed;
  6.     }
  7.     if (Keyboard::isPressed(GLFW_KEY_SPACE))
  8.     {
  9.         posZ = posZ + speed;
  10.     }
  11. // zmienną posZ należy zastąpić dotychczasowe wartości w funkcjach dla pozycji kamery dla osi Z
  12. // np: camera.setPosition(glm::vec3(posX, posY, posZ)) oraz w camera.setTarget
  13. // a także w Redraw() przy rysowaniu czajnika
  14. // testModel->GetMesh(i)->getLocalWorld() *
  15. //              glm::translate(glm::mat4(1.0f), glm::vec3( posX, posY, posZ)) *
  16. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement