PCB Environment
2
Loading...
Searching...
No Matches
pcbenv
cxx
UI
NavGrid.hpp
1
2
#ifndef GYM_PCB_UI_NAVGRID_H
3
#define GYM_PCB_UI_NAVGRID_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
13
namespace
ui {
14
15
class
NavGrid
16
{
17
public
:
18
NavGrid(
const
PCBoard
&);
19
~NavGrid();
20
void
update();
21
void
setLineSize(
float
s) { mLineSizeBase = s; }
22
void
setColor(
Color
);
23
void
draw(
const
Camera
&);
24
private
:
25
const
PCBoard
&mPCB;
26
uint mNumLines{0};
27
float
mLineSizeBase{0.25f};
28
GLfloat mColor4f[4];
29
GLuint mVBO{0};
30
GLuint mVAO{0};
31
32
static
GLuint sVP, sFP;
33
static
GLuint sPP;
34
static
GLint sUniformColor;
35
36
void
getDrawRanges(
const
Camera
&, uint start[2], uint count[2]);
37
void
createVAO();
38
static
void
createShaders();
39
};
40
41
}
// namespace ui
42
43
#endif
// GYM_PCB_UI_NAVGRID_H
Camera
Definition
Camera.hpp:15
Color
Definition
Color.hpp:9
PCBoard
Definition
PCBoard.hpp:36
Generated by
1.15.0