git.ucc.asn.au
/
matches
/
honours.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Parallel Programming - Improve camera UI
[matches/honours.git]
/
course
/
semester2
/
pprog
/
assignment1
/
single-thread
/
graphics.h
diff --git
a/course/semester2/pprog/assignment1/single-thread/graphics.h
b/course/semester2/pprog/assignment1/single-thread/graphics.h
index
c2b99f3
..
97ccf47
100644
(file)
--- a/
course/semester2/pprog/assignment1/single-thread/graphics.h
+++ b/
course/semester2/pprog/assignment1/single-thread/graphics.h
@@
-14,7
+14,7
@@
#include "nbody.h"
#define WIDTH 800
#include "nbody.h"
#define WIDTH 800
-#define HEIGHT
80
0
+#define HEIGHT
64
0
#define POINT_SIZE 1
#define POSITION_X 112
#define POSITION_Y 20
#define POINT_SIZE 1
#define POSITION_X 112
#define POSITION_Y 20
@@
-24,7
+24,7
@@
#define WORLD_TOP 10000
#define VIEW_ANGLE 45
#define RHO 100
#define WORLD_TOP 10000
#define VIEW_ANGLE 45
#define RHO 100
-#define WORLD_NEAR 0.1
+#define WORLD_NEAR 0.
000
1
#define WORLD_FAR 1000000
#define BALL_SIZE 0.5
#define REFRESH_RATE 0.001
#define WORLD_FAR 1000000
#define BALL_SIZE 0.5
#define REFRESH_RATE 0.001
@@
-36,6
+36,20
@@
void Graphics_Keyboard(unsigned char key, int mouse_x, int mouse_y);
void Graphics_Reshape(int width, int height);
void Graphics_Reshape(int width, int height);
+#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
//EOF
#endif //_GRAPHICS_H
//EOF
UCC
git Repository :: git.ucc.asn.au