Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. if ((i >= mapSize - stepSize) && (j >= mapSize - stepSize))
  2. {
  3. GL.Vertex3(i + (a * mapSize), pHeightMap[i, j], j + (b * mapSize));
  4. GL.Vertex3(i + (a * mapSize), pHeightMap[i, 0], ((b + 1) * mapSize));
  5. GL.Vertex3(((a + 1) * mapSize), pHeightMap[0, 0], ((b + 1) * mapSize));
  6.  
  7. GL.Vertex3(((a + 1) * mapSize), pHeightMap[0, 0], ((b + 1) * mapSize));
  8. GL.Vertex3(((a + 1) * mapSize), pHeightMap[0, j], j + (b * mapSize));
  9. GL.Vertex3(i + (a * mapSize), pHeightMap[i, j], j + (b * mapSize));
  10. }
  11. else if (j >= mapSize - stepSize)
  12. {
  13. GL.Vertex3(i + (a * mapSize), pHeightMap[i, j], j + (b * mapSize));
  14. GL.Vertex3(i + (a * mapSize), pHeightMap[i, 0], ((b + 1) * mapSize));
  15. GL.Vertex3(i + stepSize + (a * mapSize), pHeightMap[i + stepSize, 0], ((b + 1) * mapSize));
  16.  
  17. GL.Vertex3(i + stepSize + (a * mapSize), pHeightMap[i + stepSize, 0], ((b + 1) * mapSize));
  18. GL.Vertex3(i + stepSize + (a * mapSize), pHeightMap[i + stepSize, j], j + (b * mapSize));
  19. GL.Vertex3(i + (a * mapSize), pHeightMap[i, j], j + (b * mapSize));
  20. }
  21. else if (i >= mapSize - stepSize)
  22. {
  23. GL.Vertex3(i + (a * mapSize), pHeightMap[i, j], j + (b * mapSize));
  24. GL.Vertex3(i + (a * mapSize), pHeightMap[i, j + stepSize], j + stepSize + (b * mapSize));
  25. GL.Vertex3(((a + 1) * mapSize), pHeightMap[0, j + stepSize], j + stepSize + (b * mapSize));
  26.  
  27. GL.Vertex3(((a + 1) * mapSize), pHeightMap[0, j + stepSize], j + stepSize + (b * mapSize));
  28. GL.Vertex3(((a + 1) * mapSize), pHeightMap[0, j], j + (b * mapSize));
  29. GL.Vertex3(i + (a * mapSize), pHeightMap[i, j], j + (b * mapSize));
  30. }
  31. else
  32. {
  33. GL.Vertex3(i + (a * mapSize), pHeightMap[i, j], j + (b * mapSize));
  34. GL.Vertex3(i + (a * mapSize), pHeightMap[i, j + stepSize], j + stepSize + (b * mapSize));
  35. GL.Vertex3(i + stepSize + (a * mapSize), pHeightMap[i + stepSize, j + stepSize], j + stepSize + (b * mapSize));
  36.  
  37. GL.Vertex3(i + stepSize + (a * mapSize), pHeightMap[i + stepSize, j + stepSize], j + stepSize + (b * mapSize));
  38. GL.Vertex3(i + stepSize + (a * mapSize), pHeightMap[i + stepSize, j], j + (b * mapSize));
  39. GL.Vertex3(i + (a * mapSize), pHeightMap[i, j], j + (b * mapSize));
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement