#ifndef MAPVIEW_H #define MAPVIEW_H #include #include #include #include #include #include #include "elements/Path.h" namespace Floorplan { class IndoorMap; } class Renderable; class Path; class MapView : public QOpenGLWidget, protected QOpenGLFunctions { private: QMatrix4x4 matProject; QMatrix4x4 matView; QVector3D lightPos; QVector3D eyePos; QBasicTimer timer; std::vector elements; Path* path; public: MapView(QWidget* parent = 0); /** set the map to display */ void setMap(Floorplan::IndoorMap* map); /** the position to look at */ void setLookAt(const Point3 pos, const Point3 dir = Point3(-1, -1, 0.1)); /** set the path to disply */ void setPath(const std::vector& path); /** set the path to disply */ template void setPath(const DijkstraPath& path) { this->path->set(path); } protected: void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE; void initializeGL(); void paintGL(); void resizeGL(int width, int height); private: void draw(); }; #endif // MAPVIEW_H