many changes :P
This commit is contained in:
40
mapview/3DGrid/GridRenderer.h
Normal file
40
mapview/3DGrid/GridRenderer.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef GRIDRENDERER_H
|
||||
#define GRIDRENDERER_H
|
||||
|
||||
#include "../3D/MV3DElement.h"
|
||||
#include "MyNode.h"
|
||||
|
||||
#include <Indoor/grid/Grid.h>
|
||||
|
||||
|
||||
class GridRenderer : public MV3DElement {
|
||||
|
||||
private:
|
||||
|
||||
Grid<MyNode>* grid;
|
||||
|
||||
public:
|
||||
|
||||
GridRenderer(Grid<MyNode>* grid) : grid(grid) {
|
||||
;
|
||||
}
|
||||
|
||||
virtual void paintGL() override {
|
||||
|
||||
glDisable(GL_LIGHTING);
|
||||
glColor3f(0,0,0);
|
||||
|
||||
glPointSize(0.1f);
|
||||
glBegin(GL_POINTS);
|
||||
for (MyNode& n : *grid) {
|
||||
glVertex3f(n.x_cm/100.0f, n.z_cm/100.0f*5, n.y_cm/100.0f);
|
||||
}
|
||||
glEnd();
|
||||
|
||||
glEnable(GL_LIGHTING);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // GRIDRENDERER_H
|
||||
Reference in New Issue
Block a user