Added: - Updated `.gitignore` to ignore the `[Bb]uild/` directory. - Additional tasks added to the roadmap in `README.md` for light unit standardization and GPU backend support. Changed: - Removed line in `settings.json` that disabled error squiggles for C/C++ code. - Modified `Triangle.h` to include `material_id` in `triangle_t` and reorganized properties. - Reordered parameters in `triangle_collection_init` for clarity. - Updated `shading_context_t` in `Material.h` and added size parameter to `material_create`. - Streamlined initialization in `scene_init` and updated `scene_free` for proper resource management. - Updated `window_create` in `Window.h` to accept a `render_job_t` parameter. - Introduced `renderer_start` in `Renderer.c` to handle rendering jobs and optimized pixel rendering logic.
22 lines
366 B
C
22 lines
366 B
C
#ifndef CAMERA_H
|
|
#define CAMERA_H
|
|
|
|
#include "cglm/struct/vec3.h"
|
|
|
|
typedef struct
|
|
{
|
|
vec3s position;
|
|
versors rotation;
|
|
|
|
float focal_length;
|
|
float size_x;
|
|
float size_y;
|
|
|
|
float fov_x;
|
|
float fov_y;
|
|
} camera_t;
|
|
|
|
camera_t camera_create(vec3s position, versors rotation, float focal_length, float size_x, float aspect_ratio);
|
|
|
|
#endif // CAMERA_H
|