Advertisement
ITE_Man

Untitled

Dec 8th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. class Mall
  2. {
  3.  
  4. protected :
  5. int x, y, z;
  6.  
  7. public :
  8. void Draw() {};
  9.  
  10. };
  11.  
  12. class Road : public Mall
  13. {
  14.  
  15. private :
  16. int x, y, z;
  17.  
  18. public :
  19. Road(int x, int y, int z)
  20. {
  21. this->x = x;
  22. this->y = y;
  23. this->z = z;
  24. }
  25.  
  26. public :
  27. void Draw()
  28. {
  29. glTranslated(x, y, z);
  30.  
  31. //Quad Road
  32. glBegin(GL_POLYGON);
  33. glVertex3f(-7.0f, -8.0f, 0.0f);
  34. glVertex3f(7.0f, -8.0f, 0.0f);
  35. glVertex3f(5.0f, 8.0f, 0.0f);
  36. glVertex3f(-5.0f, 8.0f, 0.0f);
  37. glEnd();
  38.  
  39. }
  40. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement