-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOpenGLWidget.h
More file actions
62 lines (40 loc) · 1.22 KB
/
OpenGLWidget.h
File metadata and controls
62 lines (40 loc) · 1.22 KB
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
/* ====================================================
# Copyright (C)2020 2021 fhyPayaso All rights reserved.
#
# @Author : fhyPayaso
# @Date : 2020/12/21
# @Email : 401619823@qq.com
# @Description :
# ====================================================*/
#ifndef AUTOCADREADER_OPENGLWIDGET_H
#define AUTOCADREADER_OPENGLWIDGET_H
#include <QWidget>
#include <QOpenGLWidget>
#include <QOpenGLFunctions>
#include <QOpenGLFunctions_4_5_Core>
#include "libdxfrw/dx_data.h"
#include "libdxfrw/dx_iface.h"
#include "DwgObject.h"
#include <vector>
#include <iostream>
#include <QColor>
using namespace std;
class OpenGLWidget : public QOpenGLWidget, protected QOpenGLFunctions
{
public:
vector<DwgObject> entityList;
explicit OpenGLWidget(QWidget *parent = 0);
void init();
void setDataList(vector<DwgObject> list);
double pointMapper(double cur, double all = 500);
public:
void render_DRW_Line(DwgObject obj);
void render_DRW_LWPolyline(DwgObject obj);
void render_DRW_Circle(DwgObject obj);
void render_DRW_Arc(DwgObject obj);
protected:
void initializeGL();
void paintGL();
void resizeGL(int w, int h);
};
#endif //AUTOCADREADER_OPENGLWIDGET_H