forked from Lukaszm94/RobotSimulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrobotvisualisationwidget.h
41 lines (37 loc) · 961 Bytes
/
robotvisualisationwidget.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
#ifndef ROBOTVISUALISATIONWIDGET_H
#define ROBOTVISUALISATIONWIDGET_H
#include <QWidget>
#include <QtOpenGL>
#include <QMouseEvent>
#include <QOpenGLFunctions>
#include <QVector>
#include "point.h"
class RobotVisualisationWidget : public QGLWidget, protected QOpenGLFunctions
{
Q_OBJECT
public:
explicit RobotVisualisationWidget(QWidget *parent = 0);
void setRobotJointsPoints(QVector<Point> points);
void setPastTCPsBufferSize(int newSize);
void setViewAngles(float rotX, float rotY, float rotZ);
protected:
void initializeGL();
void resizeGL(int width, int height);
void paintGL();
void mousePressEvent(QMouseEvent* event);
void mouseMoveEvent(QMouseEvent* event);
private:
void draw();
void drawPastTCPs();
void drawXYZ();
GLfloat rotationX;
GLfloat rotationY;
GLfloat rotationZ;
QPoint lastPos;
QVector<Point> jointsPoints;
int pastTCPBufferSize;
QList<Point> pastTCPs;
signals:
public slots:
};
#endif // ROBOTVISUALISATIONWIDGET_H