Main Page   Compound List   File List   Compound Members  

RoundedCube.h

00001 
00002 #ifndef ROUNDEDCUBE_H
00003 #define ROUNDEDCUBE_H
00004 
00005 #include <config.h>
00006 #include <GL/gl.h>
00007 #include <GL/glu.h>
00008 #include <GL/glut.h>
00009 #include <math.h>
00010 
00022 class RoundedCube {
00023 
00024  private:
00025   float side_length;
00026   float round_width;
00027   int round_steps;
00028 
00029   void CopyColor(float a[], float b[]);
00030   void RotateColors(int a, int b, int c, int d);
00031 
00032   void MakeCornerSphere();
00033   void MakeRoundedSide();
00034   void DrawMarker();
00035   void DrawArrow(float x1, float y1, float z1,
00036                  float x2, float y2, float z2);
00037 
00038   float sides[6][3];
00039   float sides_specular[4];
00040   float sides_shininess[1];
00041   float bevel_diffuse[4];
00042   float bevel_specular[4];
00043   float bevel_shininess[1];
00044 
00045  public:
00047   enum axis { Xaxis, Yaxis, Zaxis };
00048 
00051   bool draw_normals;
00052 
00064   RoundedCube(float s_length = 0.8, float r_width = 0.1, int r_steps = 2);
00065 
00068   void render();
00069 
00080   void rotate(axis a, bool direction);
00081 
00082 };
00083 
00084 #endif

Generated on Mon Jan 14 11:23:22 2002 for rubik by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001