24 lines
569 B
C
24 lines
569 B
C
#ifndef _fencer_camera_h
|
|
#define _fencer_camera_h
|
|
|
|
#include "vmath.h"
|
|
#include "transform.h"
|
|
#include <SDL2/SDL_rect.h>
|
|
|
|
struct Camera {
|
|
float fov;
|
|
Transform transform;
|
|
};
|
|
|
|
typedef struct Camera Camera;
|
|
|
|
// current world location of camera
|
|
extern Camera g_camera;
|
|
|
|
extern void camera_init();
|
|
extern SDL_FRect camera_screen_to_world_space(Camera* self, SDL_FRect* camera_space);
|
|
extern SDL_FRect camera_world_to_pixel_rect(Camera* self, SDL_FRect* world_space);
|
|
extern Vector camera_world_to_pixel_point(Camera* self, Vector point);
|
|
|
|
#endif // !_fencer_camera_h
|