28 lines
		
	
	
		
			706 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			706 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #ifndef DEFOCUS_CAMERA_H
 | |
| #define DEFOCUS_CAMERA_H
 | |
| 
 | |
| #include "base.h"
 | |
| #include "raytracing.h"
 | |
| 
 | |
| /** @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;
 | |
| 
 | |
| 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);
 | |
| 
 | |
| #endif |