dispmap/svpointcloudviewer.h

49 lines
1.3 KiB
C
Raw Normal View History

2014-07-25 11:32:00 +04:00
#ifndef SVPOINTCLOUDVIEWER_H
#define SVPOINTCLOUDVIEWER_H
2014-07-28 00:04:18 +04:00
#include <QQuickPaintedItem>
2014-07-25 11:32:00 +04:00
#include <QQuickWindow>
2014-07-28 00:04:18 +04:00
#include <QPainter>
#include <QtGui/QOpenGLShaderProgram>
#include <QtGui/QOpenGLContext>
2014-07-25 11:32:00 +04:00
#include "svpointcloud.h"
2014-07-28 00:04:18 +04:00
class SvPointCloudViewer : public QQuickPaintedItem
2014-07-25 11:32:00 +04:00
{
Q_OBJECT
2014-07-28 00:04:18 +04:00
//Q_PROPERTY(QObject *pointCloud READ pointCloud WRITE setPointCloud NOTIFY pointCloudChanged)
2014-07-25 11:32:00 +04:00
// Q_PROPERTY(qreal cameraX READ cameraX WRITE setCameraX NOTIFY cameraXChanged)
// Q_PROPERTY(qreal cameraY READ cameraY WRITE setCameraY NOTIFY cameraYChanged)
// Q_PROPERTY(qreal cameraZ READ cameraZ WRITE setCameraZ NOTIFY cameraZChanged)
protected:
2014-07-28 00:04:18 +04:00
SvPointCloud *m_pointCloud;
2014-07-25 11:32:00 +04:00
qreal m_cameraX;
qreal m_cameraY;
qreal m_cameraZ;
2014-07-28 00:04:18 +04:00
QOpenGLShaderProgram *m_program;
2014-07-25 11:32:00 +04:00
public:
explicit SvPointCloudViewer(QQuickItem *parent = 0);
2014-07-28 00:04:18 +04:00
void paint(QPainter *painter);
void setPointCloud(SvPointCloud *pointCloud) { m_pointCloud = pointCloud; }
SvPointCloud *pointCloud() { return m_pointCloud; }
2014-07-25 11:32:00 +04:00
signals:
2014-07-28 00:04:18 +04:00
void pointCloudChanged();
2014-07-25 11:32:00 +04:00
void cameraXChanged();
void cameraYChanged();
void cameraZChanged();
public slots:
//void resetCamera();
//void moveCamera(qreal X, qreal Y, qreal Z);
// void rotateCamera(qreal X, qreal Y, qreal Z);
};
#endif // SVPOINTCLOUDVIEWER_H