| 807 | } |
| 808 | |
| 809 | window::rectangle window::createRectangle(int x, int y, int width, int height){ |
| 810 | rectangle rect; |
| 811 | //turn coordinates and color into openGL format |
| 812 | float windowWidthHalf = (static_cast<float>(windowWidth)) / 2.0f; |
| 813 | float windowHeightHalf = (static_cast<float>(windowHeight)) / 2.0f; |
| 814 | |
| 815 | rect.x = (static_cast<float>(x) - windowWidthHalf) / windowWidthHalf; |
| 816 | rect.y = -((static_cast<float>(y) - windowHeightHalf) / windowHeightHalf); |
| 817 | rect.x2 = (static_cast<float>(x + width) - windowWidthHalf) / windowWidthHalf; |
| 818 | rect.y2 = -((static_cast<float>(y + height) - windowHeightHalf) / windowHeightHalf); |
| 819 | return rect; |
| 820 | } |
| 821 | |
| 822 | vector<GLfloat> window::generateCircleVerticies(int cx, int cy, int r, int numSegments){ |
| 823 | vector<GLfloat> verticies; |
nothing calls this directly
no outgoing calls
no test coverage detected