shamrock.math.Camera3d_f64_3#

class shamrock.math.Camera3d_f64_3#

Bases: pybind11_object

Perspective camera following the OpenGL conventions (gluLookAt + gluPerspective).

Pixel (ix, iy) covers ix from left to right and iy from bottom to top, its ray goes through the pixel center, starts on the near plane and extends to infinity, so that nothing behind the image plane is rendered.

Methods

from_aspect

Camera with ny = round(nx / aspect), fovy being the vertical field of view in radians

get_aspect

get_camera_transform

get_camera_transform_inv

get_dir

get_fovy

get_nx

get_ny

get_pixel_ray

get_pos

get_projection_matrix

get_projection_matrix_inv

get_rays

Rays of all the pixels, pixel (ix, iy) being at index iy * nx + ix

get_right

get_up

get_view_matrix

get_view_matrix_inv

get_zfar

get_znear

look_at

Camera at pos looking at target (gluLookAt convention), fovy being the vertical field of view in radians

static from_aspect(pos: f64_3, dir: f64_3, up: f64_3, nx: int, aspect: float, fovy: float, znear: float, zfar: float) → shamrock.pyshamrock.math.Camera3d_f64_3#

Camera with ny = round(nx / aspect), fovy being the vertical field of view in radians

get_aspect(self: shamrock.pyshamrock.math.Camera3d_f64_3) → float#
get_camera_transform(self: shamrock.pyshamrock.math.Camera3d_f64_3) → shammath::mat<double, 4, 4>#
get_camera_transform_inv(self: shamrock.pyshamrock.math.Camera3d_f64_3) → shammath::mat<double, 4, 4>#
get_dir(self: shamrock.pyshamrock.math.Camera3d_f64_3) → f64_3#
get_fovy(self: shamrock.pyshamrock.math.Camera3d_f64_3) → float#
get_nx(self: shamrock.pyshamrock.math.Camera3d_f64_3) → int#
get_ny(self: shamrock.pyshamrock.math.Camera3d_f64_3) → int#
get_pixel_ray(self: shamrock.pyshamrock.math.Camera3d_f64_3, ix: int, iy: int) → shamrock.pyshamrock.math.Ray_f64_3#
get_pos(self: shamrock.pyshamrock.math.Camera3d_f64_3) → f64_3#
get_projection_matrix(self: shamrock.pyshamrock.math.Camera3d_f64_3) → shammath::mat<double, 4, 4>#
get_projection_matrix_inv(self: shamrock.pyshamrock.math.Camera3d_f64_3) → shammath::mat<double, 4, 4>#
get_rays(self: shamrock.pyshamrock.math.Camera3d_f64_3) → list[shamrock.pyshamrock.math.Ray_f64_3]#

Rays of all the pixels, pixel (ix, iy) being at index iy * nx + ix

get_right(self: shamrock.pyshamrock.math.Camera3d_f64_3) → f64_3#
get_up(self: shamrock.pyshamrock.math.Camera3d_f64_3) → f64_3#
get_view_matrix(self: shamrock.pyshamrock.math.Camera3d_f64_3) → shammath::mat<double, 4, 4>#
get_view_matrix_inv(self: shamrock.pyshamrock.math.Camera3d_f64_3) → shammath::mat<double, 4, 4>#
get_zfar(self: shamrock.pyshamrock.math.Camera3d_f64_3) → float#
get_znear(self: shamrock.pyshamrock.math.Camera3d_f64_3) → float#
static look_at(pos: f64_3, target: f64_3, up: f64_3, nx: int, ny: int, fovy: float, znear: float, zfar: float) → shamrock.pyshamrock.math.Camera3d_f64_3#

Camera at pos looking at target (gluLookAt convention), fovy being the vertical field of view in radians