From: Alex Schmidt Date: Tue, 19 Feb 2013 09:24:39 +0000 (+0100) Subject: ... X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/commitdiff_plain/97cc6a3d53ebfa5bf64b004957b9cb54289d9b9e ... --- diff --git a/culooks_cube.cpp b/culooks_cube.cpp new file mode 100644 index 0000000..2498fef --- /dev/null +++ b/culooks_cube.cpp @@ -0,0 +1,97 @@ +#include "culooks_cube.h" + +#include + +int cube::allid = 0; + +void cube::draw() +{ + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + + glScalef(zoom, zoom, zoom); + glRotatef(az, 0, 1, 0); + glRotatef(alt, 1, 0, 0); + + drawAll(); + + glPopMatrix(); +} + +void cube::drawAll() +{ + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + + glTranslatef(-1,-1,-1); + + for (int iz=0; iz