GlistEngine
Loading...
Searching...
No Matches
gArc.h
Go to the documentation of this file.
1/*
2 * gArc.h
3 *
4 * Created on: 27 Jul 2022
5 * Author: burakmeydan
6 */
7
8#ifndef GRAPHICS_PRIMITIVES_gArc_H_
9#define GRAPHICS_PRIMITIVES_gArc_H_
10
11#include "gMesh.h"
12
13class gArc: public gMesh {
14public:
16 ~gArc() override;
17
18 void setPoints(float xCenter, float yCenter, float radius, bool isFilled, int numberOfSides = 60, float degree = 360.0f, float rotate = 0.0f, float rotateAngle = 0.0f, float pivotx = 0.5f, float pivoty = 0.5f) {
19 isprojection2d = true;
20 setArcPoints(xCenter, yCenter, radius, isFilled, numberOfSides, degree, rotate, rotateAngle, pivotx, pivoty);
21}
22 void draw(float xCenter, float yCenter, float radius, bool isFilled, int numberOfSides = 60, float degree = 360.0f, float rotate = 0.0f, float rotateAngle = 0.0f, float pivotx = 0.5f, float pivoty = 0.5f);
23
24 private:
25 void setArcPoints(float xCenter, float yCenter, float radius, bool isFilled, int numberOfSides = 60, float degree = 360.0f, float rotate = 0.0f, float rotateAngle = 0.0f, float pivotx = 0.5f, float pivoty = 0.5f);
26 std::vector<gVertex> vertices;
27 std::vector<gIndex> indices;
28};
29
30#endif /* GRAPHICS_PRIMITIVES_gArc_H_ */
void setPoints(float xCenter, float yCenter, float radius, bool isFilled, int numberOfSides=60, float degree=360.0f, float rotate=0.0f, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)
Definition gArc.h:18
void draw(float xCenter, float yCenter, float radius, bool isFilled, int numberOfSides=60, float degree=360.0f, float rotate=0.0f, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)
~gArc() override
bool isprojection2d
Definition gMesh.h:136
void rotate(const glm::quat &q)