]> git.sur5r.net Git - fstl/blob - src/axis.h
New upstream version 0.10.0
[fstl] / src / axis.h
1 #ifndef AXIS_H
2 #define AXIS_H
3
4 #include <QOpenGLBuffer>
5 #include <QOpenGLShaderProgram>
6 #include <QOpenGLFunctions>
7
8 class Axis : protected QOpenGLFunctions
9 {
10 public:
11     Axis();
12     void setScale(QVector3D min, QVector3D max);
13     void draw(QMatrix4x4 transMat, QMatrix4x4 viewMat,
14         QMatrix4x4 orientMat, QMatrix4x4 aspectMat, float aspectRatio);
15 private:
16     QOpenGLShaderProgram shader;
17     QOpenGLBuffer vertices, //GL Buffer for model-space coords
18         flowerAxisVertices; //GL Buffer for hud-space axis lines
19     QOpenGLBuffer flowerLabelVertices[3];//Buffer for hud-space label lines
20 };
21
22 #endif // AXIS_H