PCB Environment
2
Loading...
Searching...
No Matches
pcbenv
cxx
UI
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
10
class
Camera
;
11
class
PCBoard
;
12
class
NavPoint
;
13
14
class
NavMesh
15
{
16
public
:
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; }
25
private
:
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
Camera
Definition
Camera.hpp:15
Color
Definition
Color.hpp:9
NavPoint
Definition
NavPoint.hpp:116
PCBoard
Definition
PCBoard.hpp:36
Generated by
1.15.0