forked from PeterS242/YARRH
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgcodeobject.h
39 lines (35 loc) · 875 Bytes
/
gcodeobject.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
#ifndef GCODEOBJECT_H
#define GCODEOBJECT_H
#include <QVector3D>
#include <QObject>
#include <QtOpenGL>
#if defined(Q_WS_MAC)
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#elif defined(Q_WS_WIN)
#include <GL/gl.h>
#include <GL/glu.h>
#elif defined(Q_WS_X11)
#include <GL/gl.h>
#include <GL/glu.h>
#endif
#include "layer.h"
class GCodeObject : public QObject
{
Q_OBJECT
public:
GCodeObject(QObject *parent);
~GCodeObject();
void addVertex(qreal xpos, qreal ypos, qreal zpos, qreal travel, int layer);
void draw(float scale, int layers, bool show_travel, int current_layer);
void setLayerHeight(float layerHeight);
float getLayerHeight();
void render(float scale);
void freeLists();
private:
QList<Layer*> layerList;
QMap<int, QVector4D> cylinderList;
float layerHeight;
int currentLayer;
};
#endif // GCODEOBJECT_H