GlistEngine
Loading...
Searching...
No Matches
gPolygon.h
Go to the documentation of this file.
1/*
2 * gPolygon.h
3 *
4 * Created on: Aug 19, 2026
5 * Author: merve
6 */
7
8#ifndef GRAPHICS_PRIMITIVES_GPOLYGON_H_
9#define GRAPHICS_PRIMITIVES_GPOLYGON_H_
10
11#include "gMesh.h"
12
13class gPolygon : public gMesh {
14public:
16 virtual ~gPolygon();
17
18 void addPoint(float x, float y);
19 void addPoint(const glm::vec2& point);
20
21 void endPolygon();
23
24 void setFilled(bool isFilled);
25 bool isFilled() const;
26
27 void setColor(const gColor& color);
28
29 size_t getPointCount() const;
30
31 void draw() override;
32 void draw(float x, float y);
33
34private:
35 void updateMeshBuffers();
36 bool isfilled;
37};
38
39#endif /* GRAPHICS_PRIMITIVES_GPOLYGON_H_ */
Definition gColor.h:17
bool isFilled() const
void setColor(const gColor &color)
void addPoint(float x, float y)
void clearPoints()
virtual ~gPolygon()
void addPoint(const glm::vec2 &point)
void setFilled(bool isFilled)
void draw() override
void draw(float x, float y)
size_t getPointCount() const
void endPolygon()