28 #ifndef ASCENSION_CAMERA_H |
28 #ifndef ASCENSION_CAMERA_H |
29 #define ASCENSION_CAMERA_H |
29 #define ASCENSION_CAMERA_H |
30 |
30 |
31 #include "datatypes.h" |
31 #include "datatypes.h" |
32 |
32 |
33 enum AscCameraType { |
|
34 ASC_CAMERA_DISABLED, |
|
35 ASC_CAMERA_ORTHO, |
|
36 ASC_CAMERA_PERSPECTIVE, |
|
37 }; |
|
38 |
|
39 typedef struct AscCamera AscCamera; |
33 typedef struct AscCamera AscCamera; |
40 typedef void(*asc_camera_update_func)(AscCamera*); |
|
41 |
34 |
42 struct AscCamera { |
35 struct AscCamera { |
43 asc_camera_update_func update; |
|
44 asc_mat4f projection; |
36 asc_mat4f projection; |
45 asc_mat4f view; |
37 asc_mat4f view; |
46 asc_vec3f right; |
|
47 asc_vec3f up; |
|
48 asc_vec3f direction; |
|
49 asc_recti rect; |
|
50 // TODO: fov? |
|
51 }; |
38 }; |
52 |
39 |
53 __attribute__((__nonnull__)) |
40 __attribute__((__nonnull__)) |
54 void asc_camera_ortho(AscCamera *camera, asc_recti rect); |
41 void asc_camera_ortho(AscCamera *camera, asc_recti rect); |
55 |
42 |
56 __attribute__((__nonnull__)) |
|
57 void asc_camera_disable(AscCamera *camera); |
|
58 |
|
59 #endif //ASCENSION_CAMERA_H |
43 #endif //ASCENSION_CAMERA_H |