-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrenderer.h
50 lines (38 loc) · 972 Bytes
/
renderer.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
#pragma once
#include <QOpenGLWidget>
#include "Render/types.h"
class Axes;
class PointCloud;
class StaticMesh;
///
/// \brief The Renderer class
///
class Renderer : public QOpenGLWidget, protected QGLFunctions
{
Q_OBJECT
public:
explicit Renderer(QWidget *parent = 0);
~Renderer();
public slots:
void setOrientation(QMatrix4x4 ori);
void setAccCloud(const std::vector<QVector3D>& cloud);
void setMagCloud(const std::vector<QVector3D>& cloud);
void setMode(IMUMode mode);
protected:
void initializeGL();
void resizeGL(int width, int height);
void paintGL();
private:
int m_width, m_height;
float m_aspect;
IMUMode m_mode;
QMatrix4x4 m_perspective;
QMatrix4x4 m_ortho;
Axes* m_axes;
PointCloud* m_acc_cloud;
PointCloud* m_mag_cloud;
StaticMesh* m_mesh;
QMatrix4x4 m_orientation;
void renderMesh();
void renderClouds();
};