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

View File

@@ -0,0 +1,53 @@
#ifndef MV3DELEMENTFLOOROUTLINEPOLYGON_H
#define MV3DELEMENTFLOOROUTLINEPOLYGON_H
#include <Indoor/floorplan/v2/Floorplan.h>
#include "misc/Cube.h"
#include "MV3DElement.h"
class MV3DElementFloorOutlinePolygon : public MV3DElement {
Floorplan::Floor* f;
Floorplan::FloorOutlinePolygon* poly;
public:
/** ctor */
MV3DElementFloorOutlinePolygon(Floorplan::Floor* f, Floorplan::FloorOutlinePolygon* poly) : f(f), poly(poly) {
;
}
protected:
/** repaint me */
void paintGL() override {
glDisable(GL_CULL_FACE);
switch (poly->method) {
case Floorplan::OutlineMethod::ADD:
glColor3f(1,1,1);
break;
case Floorplan::OutlineMethod::REMOVE:
glColor3f(0.2, 0.2, 0.2);
break;
}
glBegin(GL_POLYGON);
glNormal3f(0,1,0);
for (Point2 p2 : poly->poly.points) {
Point3 p3(p2.x, p2.y, f->atHeight);
glVertex3f(p3.x, p3.z, p3.y);
}
glEnd();
glEnable(GL_CULL_FACE);
}
};
#endif // MV3DELEMENTFLOOROUTLINEPOLYGON_H