X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=inline;f=course%2Fsemester2%2Fpprog%2Fassignment1%2Fgraphics.h;fp=course%2Fsemester2%2Fpprog%2Fassignment1%2Fgraphics.h;h=01ca839a27312ef99a1d57ae25b71768d9411e3d;hb=1612d2449b7c9e4fa202adac00cda23700df44c7;hp=0000000000000000000000000000000000000000;hpb=4aead302e9872ec0a42724a61589275569c4e783;p=matches%2Fhonours.git diff --git a/course/semester2/pprog/assignment1/graphics.h b/course/semester2/pprog/assignment1/graphics.h new file mode 100644 index 00000000..01ca839a --- /dev/null +++ b/course/semester2/pprog/assignment1/graphics.h @@ -0,0 +1,40 @@ +#ifndef _GRAPHICS_H +#define _GRAPHICS_H + +/** + * @file graphics.h + * @author Sam Moore (20503628) 2012 - adapted from template program provided by UWA + * @purpose N-Body simulator - declarations of all graphics related functions + * NOTE: I prefer to keep graphics entirely seperate from the simulation as much as possible, hence seperate files + */ + +#include +#include + +#include "nbody.h" + +#define SCREEN_WIDTH 800 +#define SCREEN_HEIGHT 800 +#define POINT_SIZE 1 +#define POSITION_X 112 +#define POSITION_Y 20 +#define WORLD_LEFT -10000 +#define WORLD_RIGHT 10000 +#define WORLD_BOTTOM -10000 +#define WORLD_TOP 10000 +#define VIEW_ANGLE 45 +#define RHO 100 +#define WORLD_NEAR 0.1 +#define WORLD_FAR 1000000 +#define BALL_SIZE 0.5 +#define REFRESH_RATE 0.001 +#define LINE_SIZE 1000 + +void Graphics_Init(void); +void Graphics_Display(System * s); +void Graphics_Keyboard(unsigned char key, int mouse_x, int mouse_y); +void Graphics_Reshape(int width, int height); + +#endif //_GRAPHICS_H + +//EOF