![]() |
The NEW Pong Game V13.2.1
An interesting implemnettaion of the pong game
|
Functor for rendering triangle shapes. More...
#include <renderers.hpp>
Public Member Functions | |
| void | operator() (SDL_Renderer *renderer, float pos_x, float pos_y, float size, SDL_Color color) const |
| Renders a triangle shape at the specified position. | |
Functor for rendering triangle shapes.
This struct provides an operator to render filled triangles at specified positions
| void triangle_renderer::operator() | ( | SDL_Renderer * | renderer, |
| float | pos_x, | ||
| float | pos_y, | ||
| float | size, | ||
| SDL_Color | color ) const |
Renders a triangle shape at the specified position.
| renderer | The SDL renderer used for drawing |
| pos_x | The x coordinate of the triangle's center |
| pos_y | The y coordinate of the triangle's center |
| size | The size of the triangle (height) |
| color | The color to fill the triangle with |
Uses scan-line algorithm to fill the triangle efficiently.
| renderer | The SDL renderer used for drawing |
| pos_x | The x coordinate of the triangle's center |
| pos_y | The y coordinate of the triangle's center |
| size | The size of the triangle (height) |
| color | The color to fill the triangle with |