From: Alex Schmidt Date: Tue, 19 Feb 2013 09:35:54 +0000 (+0100) Subject: ... X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/commitdiff_plain/5a4132d73bb1872523e9a7fccfa38cffbd551dda?hp=97cc6a3d53ebfa5bf64b004957b9cb54289d9b9e ... --- diff --git a/culooks.h b/culooks.h index 32e36a8..1705ab5 100644 --- a/culooks.h +++ b/culooks.h @@ -10,12 +10,27 @@ #include #include -#include "culooks_cube.h" - using namespace std; class culooks { + private: + class cube { + public: + cube(int l); + void draw(); + int id; + float az, alt; + float zoom; + private: + void drawAll(); + void drawBox(); + static int allid; + float *plaq; + float *link; + int l; + }; + public: struct window { int layout[2]; @@ -41,7 +56,6 @@ class culooks static pthread_t glThreadId; static int windowid; int mywid; - }; #endif diff --git a/culooks_cube.cpp b/culooks_cube.cpp index 2498fef..29976e4 100644 --- a/culooks_cube.cpp +++ b/culooks_cube.cpp @@ -1,10 +1,10 @@ -#include "culooks_cube.h" +#include "culooks.h" #include -int cube::allid = 0; +int culooks::cube::allid = 0; -void cube::draw() +void culooks::cube::draw() { glMatrixMode(GL_MODELVIEW); glPushMatrix(); @@ -18,7 +18,7 @@ void cube::draw() glPopMatrix(); } -void cube::drawAll() +void culooks::cube::drawAll() { glMatrixMode(GL_MODELVIEW); glPushMatrix(); @@ -79,7 +79,7 @@ void cube::drawAll() glPopMatrix(); } -cube::cube(int _l) +culooks::cube::cube(int _l) { l = _l; link = new float[l*l*l*3 * 4]; diff --git a/culooks_cube.h b/culooks_cube.h deleted file mode 100644 index aeaa754..0000000 --- a/culooks_cube.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef CULOOKS_CUBE_H -#define CULOOKS_CUBE_H - -class cube { - public: - cube(int l); - void draw(); - int id; - float az, alt; - float zoom; - private: - void drawAll(); - void drawBox(); - static int allid; - float *plaq; - float *link; - int l; -}; - -#endif