snoopy/include/camera.h

30 lines
548 B
C
Raw Normal View History

#pragma once
2023-02-19 22:30:48 +01:00
#include "math.h"
#include "vec3.h"
#include "ray.h"
#include "image.h"
class camera
{
2023-02-19 22:30:48 +01:00
public:
camera(
point3 lookfrom,
point3 lookat,
vec3 vup,
double vfov, // vertical field of view in degrees
double aspect_ratio,
double aperture,
double focus_dist);
ray get_ray(double s, double t) const;
private:
point3 origin_;
point3 lower_left_corner_;
vec3 horizontal_;
vec3 vertical_;
vec3 u_, v_, w_;
double lens_radius_;
};