diff options
author | Julian T <julian@jtle.dk> | 2021-02-13 19:58:54 +0100 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2021-02-13 19:58:54 +0100 |
commit | c695da871a75bb6786c08c3546ef71ed032bd61d (patch) | |
tree | 65aab566368bbe68af775bbbdd22ee5b0963ffbd /src/camera/camera.rs | |
parent | 14f7b47f2c2315d0de5e52d31c57fe07a15d08ad (diff) |
Fixed test and compile warnings
Diffstat (limited to 'src/camera/camera.rs')
-rw-r--r-- | src/camera/camera.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/camera/camera.rs b/src/camera/camera.rs index 241d26b..7f9e79d 100644 --- a/src/camera/camera.rs +++ b/src/camera/camera.rs @@ -8,6 +8,7 @@ //! ``` //! use rendering::camera::{CameraSettings, Camera}; //! use rendering::core::{Vector3f, Vector2f, Vector2i}; +//! use rendering::sample::UniformSampler; //! //! let set = CameraSettings { //! origin: Vector3f::new(10.0), @@ -16,12 +17,13 @@ //! fov: 90.0, //! filmsize: Vector2i::new(10), //! focus: None, -//! aperture: 0.0, +//! aperture: None, //! }; //! //! let cam = Camera::new(&set); +//! let mut sampler = UniformSampler::new(); //! -//! let (r, _) = cam.generate_ray(&Vector2f::new(5.0)); +//! let (r, _) = cam.generate_ray(&Vector2f::new(5.0), &mut sampler); //! let dir = r.direction; //! //! assert!( |