many changes :P

This commit is contained in:
kazu
2016-06-06 22:08:53 +02:00
parent db6b479d86
commit 6243165084
56 changed files with 4399 additions and 245 deletions

72
mapview/3D/MapView3D.h Normal file
View File

@@ -0,0 +1,72 @@
#ifndef MAPVIEW3D_H
#define MAPVIEW3D_H
#include <QtWidgets>
#include <QtOpenGL>
#include <Indoor/geo/Point3.h>
class MapModel;
class GridModel;
class MapView3D : public QGLWidget {
Q_OBJECT
public:
MapView3D(QWidget* parent = 0);
/** set the underlying data-model */
void setModel(MapModel* mdl) {
this->model = mdl;
update();
}
/** get the underlying data-model */
MapModel* getModel() {return model;}
/** show 3D rendered floorplan */
void showFloorplan();
/** show 3D rendered grid derived from the floorplan */
void showGrid();
private:
/** the underlying data-model */
MapModel* model = nullptr;
GridModel* gridModel = nullptr;
Point3 rot;
Point3 center;
Point3 scale;
struct Mouse {
int btn;
float x;
float y;
} mouse;
struct Viewport {
Point2 size;
} viewport;
protected:
void initializeGL();
void paintGL();
void resizeGL(int width, int height);
void mousePressEvent(QMouseEvent* e);
void mouseMoveEvent(QMouseEvent* e);
void mouseReleaseEvent(QMouseEvent* e);
void wheelEvent(QWheelEvent* e);
private:
void draw();
};
#endif // MAPVIEW3D_H