Files
batomorph/include/camera.h
2025-09-22 20:16:41 +01:00

26 lines
509 B
C

#ifndef CAMERA_H
#define CAMERA_H
#include "img.h"
#include "obj.h"
#include "vec3.h"
#include <stdint.h>
typedef struct {
vec3_t pos;
vec3_t pix_origin, x_step, y_step;
uint32_t img_width, img_height;
unsigned samples_per_pixel;
} camera_t;
camera_t camera_init(
vec3_t pos, vec3_t target, double fov, uint32_t img_width,
uint32_t img_height, unsigned samples_per_pixel);
void camera_render(
const camera_t *camera, const obj_t *scene, unsigned scene_count,
img_t *img_out);
#endif