Advertisement
RoshHoul

Untitled

Apr 3rd, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.28 KB | None | 0 0
  1. for (int i = 0; i < 16; i++) {
  2.         if (i == 0) {
  3.             modelPos[i] = modelPos[i] + glm::vec3(0.0f, 0.0f, 0.0f);
  4.             cout << "First" << endl;
  5.         }
  6.  
  7.         if (i > 0 && i < 5) {
  8.             modelPos[i] = modelPos[i - 1] + glm::vec3(2.1f, 0.0f, 0.0f);
  9.             cout << "Second loop" << endl;
  10.             cout << "Ball number" << i << " is on coordinates " << modelPos[i].x << ", " << modelPos[i].z << endl;
  11.  
  12.         }
  13.  
  14.         if (i > 4 && i < 9) {
  15.             modelPos[i] = modelPos[i - 5] + glm::vec3(1.1f, 0.0f, -2.1f);
  16.             cout << "Third loop" << endl;
  17.             cout << "Ball number" << i << " is on coordinates " << modelPos[i].x << ", " << modelPos[i].z << endl;
  18.         }
  19.  
  20.         if (i > 8 && i < 12) {
  21.             modelPos[i] = modelPos[i - 4] + glm::vec3(1.1f, 0.0f, -2.1f);
  22.             cout << "Fourth loop" << endl;
  23.             cout << "Ball number" << i << " is on coordinates " << modelPos[i].x << ", " << modelPos[i].z << endl;
  24.         }
  25.  
  26.         if (i == 12 || i == 13) {
  27.             modelPos[i] = modelPos[i - 3] + glm::vec3(1.1f, 0.0f, -2.1f);
  28.             cout << "Fifth loop" << endl;
  29.             cout << "Ball number" << i << " is on coordinates " << modelPos[i].x << ", " << modelPos[i].z << endl;
  30.         }
  31.  
  32.         if (i == 14) {
  33.             modelPos[i] = modelPos[i - 2] + glm::vec3(1.1f, 0.0f, -2.1f);
  34.             cout << "Ball number" << i << " is on coordinates " << modelPos[i].x << ", " << modelPos[i].z << endl;
  35.         }
  36.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement