#include <X11/Xutil.h>
#include <string>
-#include "culooks_cube.h"
-
using namespace std;
class culooks
{
public:
+
+ culooks (const char* name, const int& xcubes, const int& ycubes, const int& l, int *argc, char **argv);
+
+ 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;
+ };
+
struct window {
int layout[2];
double aspect;
string name;
};
- culooks (const char* name, const int& xcubes, const int& ycubes, const int& l, int *argc, char **argv);
-
- static vector< pair<int,window*> > Windows;
-
- struct wincontext {
- GLXDrawable gDrawable;
- Display *gDisplay;
- GLXContext gContext;
+ class drawing
+ {
+ private:
+ static int rotcube[3];
+ static culooks::window* getWin();
+ static int getCubeFromPos(int x, int y);
+ static void motionFunc(int x, int y);
+ static void mouseFunc(int button, int state, int x, int y);
+ static void reshapeFunc(int w, int h);
+ static void displayFunc();
+ static void initWindow(int winid);
+ static void idleFunc_master();
+ public:
+ static void* glutThread(void *leer);
};
-
- private:
+
+ static vector< pair<int,window*> > Windows;
static pthread_t glThreadId;
static int windowid;
int mywid;
-
};
#endif