defocus-modules/include/defocus/camera.h

28 lines
706 B
C
Raw Permalink Normal View History

2023-05-08 13:28:53 +02:00
#ifndef DEFOCUS_CAMERA_H
#define DEFOCUS_CAMERA_H
#include "base.h"
2023-05-09 13:04:14 +02:00
#include "raytracing.h"
2023-05-08 13:28:53 +02:00
/** @file camera.h
* @brief basic camera functions
*/
/** @brief Interface for cameras. */
typedef struct
{
/** Release the camera object */
void (*release)(void *o);
/** Builds a ray packet of all rays that need to be evaluated to generate the image.
*/
df_ray_packet (*build_ray_packet)(void *o);
/** Opaque pointer to the camera object */
void *o;
} df_camera_i;
2023-05-09 13:04:14 +02:00
DF_API df_camera_i df_create_perspective_camera(
float image_width, float image_height, float raster_width, float raster_height, float far_dist, float near_dist, float focal_dist, float lens_radius);
2023-05-08 13:28:53 +02:00
#endif