Parallel Programming - Final version
[matches/honours.git] / course / semester2 / pprog / assignment1 / single-thread / graphics.h
1 #ifndef _GRAPHICS_H
2 #define _GRAPHICS_H
3
4 /**
5  * @file graphics.h
6  * @author Sam Moore (20503628) 2012 - adapted from template program provided by UWA
7  * @purpose N-Body simulator - declarations of all graphics related functions
8  * NOTE: I prefer to keep graphics seperate from the simulation as much as possible, hence seperate files
9  */
10
11 #include <GL/gl.h>
12
13 #define GLUT
14 //#define SDL
15
16 #ifdef GLUT
17 #include <GL/glut.h>
18 #include <GL/freeglut.h>
19 #endif //GLUT
20
21 #include "nbody.h"
22
23 #define WIDTH 800
24 #define HEIGHT 640
25 #define POINT_SIZE 1
26 #define POSITION_X 112
27 #define POSITION_Y 20
28 #define WORLD_LEFT -10000
29 #define WORLD_RIGHT 10000
30 #define WORLD_BOTTOM -10000
31 #define WORLD_TOP 10000
32 #define VIEW_ANGLE 45
33 #define RHO 100
34 #define WORLD_NEAR 0.0001
35 #define WORLD_FAR 1000000
36 #define BALL_SIZE 0.5
37 #define REFRESH_RATE 0.001
38
39
40 void Graphics_Run(int argc, char ** argv);
41 void Graphics_Display(void);
42 void Graphics_Keyboard(unsigned char key, int mouse_x, int mouse_y);
43 void Graphics_Reshape(int width, int height);
44
45 extern double scale;
46
47 #define FLYING_CAMERA
48
49 #ifdef FLYING_CAMERA
50 typedef struct
51 {
52         float p[DIMENSIONS]; // Translation position of the camera
53         
54         float x[DIMENSIONS];
55         float y[DIMENSIONS];
56         float z[DIMENSIONS];
57         
58 } Camera;
59 #endif //FLYING_CAMERA
60
61 #endif //_GRAPHICS_H
62
63 //EOF

UCC git Repository :: git.ucc.asn.au