-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgshhsdata.h
executable file
·63 lines (50 loc) · 1.36 KB
/
gshhsdata.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef GSHHSDATA_H
#define GSHHSDATA_H
#include "gshhs.h"
#include <QOpenGLFunctions>
#include <QOpenGLShaderProgram>
#include <QOpenGLBuffer>
#include <QOpenGLVertexArrayObject>
#include <QOpenGLTexture>
// structures
struct floatVector {
float x, y, z;
};
struct LonLatPair {
int lonmicro;
int latmicro;
};
// vector-file
struct VxpFeature {
int nVerts;
floatVector *pVerts;
LonLatPair *pLonLat;
};
struct Vxp {
int nFeatures;
VxpFeature *pFeatures;
};
class gshhsData// : protected QOpenGLFunctions_4_3_Core
{
public:
gshhsData(QOpenGLShaderProgram *prog);
~gshhsData();
void Initialize(QString data1, QString data2, QString data3);
void load_gshhs(char *pFileName, int nTotFeatures, Vxp *vxp);
int check_gshhs(char *pFileName);
void render(QMatrix4x4 projection, QMatrix4x4 modelview);
void rendersoc(QMatrix4x4 projection, QMatrix4x4 modelview);
Vxp *vxp_data[3];
private:
void LonLat2Point(float lat, float lon, floatVector *pos, float radius);
QOpenGLShaderProgram *program;
QOpenGLVertexArrayObject vao;
QOpenGLVertexArrayObject vao2;
QOpenGLBuffer positionsBuf1;
QOpenGLBuffer positionsBuf2;
GLuint vertexPosition;
int nbrVerts1, nbrVerts2;
QVector<GLuint> featurevertsindex[2];
QOpenGLFunctions *glf;
};
#endif // GSHHSDATA_H