/* * camera.h * * CAM-AM-AM-AM-AMER!!! a. * */ #include "SDL.h" #import "config.h" #import "vector.h" // Camera state. typedef struct { vector eye, focus, up; } camera; // Initialize the camera. camera *new_camera(graphics_settings settings); // Turns the camera to look at something. The eye vector remains constant. void look_at_by_rotating(camera *c, vector what); // Moves the camera to look at something. This changes the eye vector so that the look direction stays constant. void look_at_by_translating(camera *c, vector what); // Moves the focal point of the camera around. void move_focus(camera *c, vector delta); // Moves the eye position of the camera around. void move_eye(camera *c, vector delta); // Moves the eye position and focal point of the camera around. void move_camera(camera *c, vector delta); // Multiplies the current matrix by the camera's matrix. void apply_camera(camera *c);