00001 00011 #ifndef OBJECTS_H 00012 #define OBJECTS_H 00013 00014 #include <stdlib.h> 00015 #include <GL/glut.h> 00016 #include "glm.h" 00017 #include "Misc.h" 00018 00019 typedef float vector3Df[3]; 00020 typedef float vector2Df[2]; 00021 typedef int vector2Di[2]; 00022 00023 typedef struct 00024 { 00025 GLfloat location[3]; 00026 GLfloat oldLocation[3]; 00027 GLfloat velocity[3]; 00028 GLfloat mass; 00029 GLfloat rotation[2]; 00030 GLfloat radius; 00031 }obj; 00032 00033 obj ball; 00034 obj racket; 00035 00036 typedef struct 00037 { 00038 GLfloat center[3]; 00039 GLfloat XYZ[3]; 00040 GLfloat mass; 00041 GLfloat coef; 00042 }rect3D; 00043 00044 rect3D net; 00045 rect3D tableDown; 00046 rect3D tableUp; 00047 00048 void drawPlane(); 00049 void drawShadows(); 00050 void drawRacketShadow(); 00051 void drawBallShadow(); 00052 void drawBall(); 00053 void drawRacket(float x, float y, float z); 00054 void drawTable(); 00055 void drawNet(); 00056 00057 #endif