#include <camera.h>
|
| | Camera ()=default |
| | Camera (double _screen_left_coord, double _screen_right_coord, double _screen_bottom_coord, double _screen_top_coord, double _focal_length, const common::Vec3 &_origin, const common::Vec3 &_direction, const common::Vec3 &_world_up, int _screen_width_pixels, int _screen_height_pixels, ViewType _view_type, int _color_channels, int _rays_per_pixel, int _max_recursion_depth) |
| Ray | compute_ray_for_pixel (Pixel p) const |
| | NLOHMANN_DEFINE_TYPE_INTRUSIVE (Camera, screen_left_coord, screen_right_coord, screen_bottom_coord, screen_top_coord, focal_length, origin, direction, world_up, screen_width_pixels, screen_height_pixels, view_type, color_channels, rays_per_pixel, max_recursion_depth) int get_screen_width_pixels() const |
| int | get_screen_height_pixels () const |
| int | get_color_channels () const |
| int | get_rays_per_pixel () const |
| int | get_max_recursion_depth () const |
◆ Camera() [1/2]
| raytracer::raytracer::Camera::Camera |
( |
| ) |
|
|
default |
◆ Camera() [2/2]
| raytracer::raytracer::Camera::Camera |
( |
double | _screen_left_coord, |
|
|
double | _screen_right_coord, |
|
|
double | _screen_bottom_coord, |
|
|
double | _screen_top_coord, |
|
|
double | _focal_length, |
|
|
const common::Vec3 & | _origin, |
|
|
const common::Vec3 & | _direction, |
|
|
const common::Vec3 & | _world_up, |
|
|
int | _screen_width_pixels, |
|
|
int | _screen_height_pixels, |
|
|
ViewType | _view_type, |
|
|
int | _color_channels, |
|
|
int | _rays_per_pixel, |
|
|
int | _max_recursion_depth ) |
◆ compute_ray_for_pixel()
| Ray raytracer::raytracer::Camera::compute_ray_for_pixel |
( |
Pixel | p | ) |
const |
|
nodiscard |
Compute the direction that points to a pixel center (with jitter), from the camera origin.
- Parameters
-
| p | The pixel defined by its x and y coordinates in the screen plane. |
- Returns
- The ray with the origin at the camera, pointed towards the pixel.
◆ get_color_channels()
| int raytracer::raytracer::Camera::get_color_channels |
( |
| ) |
const |
|
inlinenodiscard |
Getter for the number of color channels of the rendered image.
- Returns
- The number of color channels of the rendered image.
◆ get_max_recursion_depth()
| int raytracer::raytracer::Camera::get_max_recursion_depth |
( |
| ) |
const |
|
inlinenodiscard |
Getter for the maximum number of times a ray can bounce before tracing stops.
- Returns
- The maximum number of times a ray can bounce before tracing stops.
◆ get_rays_per_pixel()
| int raytracer::raytracer::Camera::get_rays_per_pixel |
( |
| ) |
const |
|
inlinenodiscard |
Getter for the number of rays traced per pixel, whose colors are averaged.
- Returns
- The number of rays traced per pixel.
◆ get_screen_height_pixels()
| int raytracer::raytracer::Camera::get_screen_height_pixels |
( |
| ) |
const |
|
inlinenodiscard |
Getter for the height of the rendered image in pixels.
- Returns
- The height of the rendered image in pixels.
◆ NLOHMANN_DEFINE_TYPE_INTRUSIVE()
| raytracer::raytracer::Camera::NLOHMANN_DEFINE_TYPE_INTRUSIVE |
( |
Camera | , |
|
|
screen_left_coord | , |
|
|
screen_right_coord | , |
|
|
screen_bottom_coord | , |
|
|
screen_top_coord | , |
|
|
focal_length | , |
|
|
origin | , |
|
|
direction | , |
|
|
world_up | , |
|
|
screen_width_pixels | , |
|
|
screen_height_pixels | , |
|
|
view_type | , |
|
|
color_channels | , |
|
|
rays_per_pixel | , |
|
|
max_recursion_depth | ) const |
|
inlinenodiscard |
Getter for the width of the rendered image in pixels.
- Returns
- The width of the rendered image in pixels.
The documentation for this class was generated from the following files: