Start visualisation in the middle.

This commit is contained in:
2017-11-17 11:38:31 +01:00
parent fbc2a5ca4a
commit a62075f57d
2 changed files with 6 additions and 1 deletions

View File

@@ -55,6 +55,10 @@ static void handleKeys(unsigned char key, int, int)
// Utility quit function.
exit(0);
case 'h':
camera.reset();
break;
default:
// Do nothing.
break;

View File

@@ -56,6 +56,7 @@ static void render()
camera.configureRenderingContext();
glPushMatrix();
glTranslatef(5 * rendererData.currentData->size(), 0, 0);
for (auto& layer : *rendererData.currentData) {
glPushMatrix();
renderLayer(layer);
@@ -128,7 +129,7 @@ static void renderLayer(const LayerData& data)
glColor3f(0.5, 0.5, 0.5);
renderText(data.name());
glTranslatef(0, 0, -2);
glTranslatef(0, 0, -10);
switch (shape.size()) {
case 4:
// TODO: implement this.