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
13
class
gTriangle
:
public
gMesh
{
14
public
:
15
gTriangle
();
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
22
private
:
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_ */
gMesh::gMesh
gMesh()
gTriangle::gTriangle
gTriangle()
gTriangle::~gTriangle
~gTriangle() override
gTriangle::draw
void draw(float px, float py, float qx, float qy, float rx, float ry, bool is_filled)
gTriangle::draw
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)
gMesh.h
gVertex
Definition
gVbo.h:14
engine
graphics
primitives
gTriangle.h
Generated by
1.15.0