PCB Environment 2
Loading...
Searching...
No Matches
NavMesh.hpp
1
2#ifndef GYM_PCB_UI_NAVMESH_H
3#define GYM_PCB_UI_NAVMESH_H
4
5#include "GLContext.hpp"
6#include "Color.hpp"
7#include "Geometry.hpp"
8#include <vector>
9
10class Camera;
11class PCBoard;
12class NavPoint;
13
14class NavMesh
15{
16public:
17 NavMesh(const PCBoard&);
18 ~NavMesh();
19 void update(uint z);
20 void setPointSize(float s) { mPointSizeBase = s; }
21 void setColor(Color);
22 void setAlpha(float a) { mColor4f[3] = a; }
23 void draw(const Camera&);
24 void setVisualizeAStar(bool b) { mVisualizeAStar = b; }
25private:
26 const PCBoard &mPCB;
27 uint mNumPoints{0};
28 float mPointSizeBase{1.0f};
29 float mPointSize{1.0f};
30 GLfloat mColor4f[4];
31 GLuint mVBO{0};
32 GLuint mVAO{0};
33 bool mVisualizeAStar{false};
34
35 static GLuint sVP, sFP;
36 static GLuint sPP;
37 static GLint sUniformMVP;
38 static GLint sUniformPointSize;
39 static GLint sUniformColor;
40
41 Color navColor(const NavPoint&, uint seq);
42 float navSize(const NavPoint&);
43
44 void createVAO();
45 static void createShaders();
46};
47
48#endif // GYM_PCB_UI_NAVMESH_H
Definition Camera.hpp:15
Definition Color.hpp:9
Definition NavPoint.hpp:116
Definition PCBoard.hpp:36