From 97cc6a3d53ebfa5bf64b004957b9cb54289d9b9e Mon Sep 17 00:00:00 2001 From: Alex Schmidt Date: Tue, 19 Feb 2013 10:24:39 +0100 Subject: [PATCH 1/1] ... --- culooks_cube.cpp | 97 ++++++++++++++++++++++++++++++++++++++++++++++++ culooks_cube.h | 20 ++++++++++ 2 files changed, 117 insertions(+) create mode 100644 culooks_cube.cpp create mode 100644 culooks_cube.h 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