]> git.treefish.org Git - phys/latlib.git/blobdiff - culooks.h
...
[phys/latlib.git] / culooks.h
index 32e36a814872ca585ec9f7ad7ecec9de6889dc76..76f0919ce2dbdf3b8ddf29be7269dbbd05fc6fb4 100644 (file)
--- a/culooks.h
+++ b/culooks.h
 #include <X11/Xutil.h>
 #include <string>
 
 #include <X11/Xutil.h>
 #include <string>
 
-#include "culooks_cube.h"
-
 using namespace std;
 
 class culooks
 {
  public:
 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;
   struct window {
     int layout[2];
     double aspect;
@@ -27,21 +46,26 @@ class culooks
     string name;
   };
 
     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;
   static pthread_t glThreadId;
   static int windowid;
   int mywid;
-  
 };
 
 #endif
 };
 
 #endif