blob: 8af2614191acf1650be51a9e8a12dc08a47e466a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#ifndef CAM_H
#define CAM_H
#include "common.h"
typedef enum {
CAM_MODE_NONE,
CAM_MODE_EDIT_FLY,
CAM_MODE_EDIT_ORBIT,
} CamState;
typedef struct {
Camera cam;
CamState state;
f32 mv_speed, mv_scale, lk_speed;
f32 perspective_fov;
bool update, input, allow_fly;
struct {
Vec3 start_pos, start_target;
Vec3 end_pos, end_target;
f32 start_fovy, end_fovy;
f32 elapsed;
bool active;
} transition;
} CameraInfo;
extern CameraInfo main_cam;
void cam_init(void);
void cam_update(void);
void cam_focus(Vec3 target, f32 distance, f32 view_height);
#endif
|