X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=course%2Fsemester2%2Fpprog%2Fassignment1%2Fsingle-thread%2Fgraphics.h;h=13a43696d6644d270ec65f88dc6a90aec7859e77;hb=f2970e1b67ccd1adff8cd04a176efdc9682adf06;hp=c2b99f38ba6c2f992617e3c2e731d0339ffdc38d;hpb=f012817dee17e24eee2e8951d138dab40b808ad3;p=matches%2Fhonours.git diff --git a/course/semester2/pprog/assignment1/single-thread/graphics.h b/course/semester2/pprog/assignment1/single-thread/graphics.h index c2b99f38..13a43696 100644 --- a/course/semester2/pprog/assignment1/single-thread/graphics.h +++ b/course/semester2/pprog/assignment1/single-thread/graphics.h @@ -9,12 +9,19 @@ */ #include + +#define GLUT +//#define SDL + +#ifdef GLUT #include +#include +#endif //GLUT #include "nbody.h" #define WIDTH 800 -#define HEIGHT 800 +#define HEIGHT 640 #define POINT_SIZE 1 #define POSITION_X 112 #define POSITION_Y 20 @@ -24,7 +31,7 @@ #define WORLD_TOP 10000 #define VIEW_ANGLE 45 #define RHO 100 -#define WORLD_NEAR 0.1 +#define WORLD_NEAR 0.0001 #define WORLD_FAR 1000000 #define BALL_SIZE 0.5 #define REFRESH_RATE 0.001 @@ -35,6 +42,21 @@ void Graphics_Display(void); void Graphics_Keyboard(unsigned char key, int mouse_x, int mouse_y); void Graphics_Reshape(int width, int height); +extern double scale; + +#define FLYING_CAMERA + +#ifdef FLYING_CAMERA +typedef struct +{ + float p[DIMENSIONS]; // Translation position of the camera + + float x[DIMENSIONS]; + float y[DIMENSIONS]; + float z[DIMENSIONS]; + +} Camera; +#endif //FLYING_CAMERA #endif //_GRAPHICS_H