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=2fbc0a6a6a15330e90e48ba778d12beb1fd0d5da;hpb=4b52f4b6f00888b393292646bcedb4561f5de714;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 2fbc0a6a..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,17 +31,32 @@ #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 -#define LINE_SIZE 1000 + void Graphics_Run(int argc, char ** argv); 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