GlistEngine
Loading...
Searching...
No Matches
gTriangle.h
Go to the documentation of this file.
1/*
2 * gTriangle.h
3 *
4 * Created on: Jul 28, 2022
5 * Author: emirhantasdeviren
6 */
7
8#ifndef GRAPHICS_PRIMITIVES_GTRIANGLE_H_
9#define GRAPHICS_PRIMITIVES_GTRIANGLE_H_
10
11#include "gMesh.h"
12
13class gTriangle: public gMesh {
14public:
16 ~gTriangle() override;
17
18 void draw(float px, float py, float qx, float qy, float rx, float ry, bool is_filled);
19
20 void draw(float px, float py, float qx, float qy, float rx, float ry, bool is_filled, float rotateAngle, float pivotx = 0.5f, float pivoty = 0.5f);
21
22private:
23 void setPoints(float px, float py, float qx, float qy, float rx, float ry, bool is_filled, float rotateAngle = 0.0f, float pivotx = 0.5f, float pivoty = 0.5f);
24
25 std::vector<gVertex> vertices;
26 std::vector<gIndex> indices;
27 gVertex vertex1;
28 gVertex vertex2;
29 gVertex vertex3;
30};
31
32#endif /* GRAPHICS_PRIMITIVES_GTRIANGLE_H_ */
~gTriangle() override
void draw(float px, float py, float qx, float qy, float rx, float ry, bool is_filled)
void draw(float px, float py, float qx, float qy, float rx, float ry, bool is_filled, float rotateAngle, float pivotx=0.5f, float pivoty=0.5f)
Definition gVbo.h:14