library: render: pathtrace: add dummy Pathtracer

This commit is contained in:
Bruno BELANYI 2020-03-30 02:04:37 +02:00
parent 9c6b9af31a
commit b624ced37f
3 changed files with 39 additions and 0 deletions

View file

@ -9,6 +9,9 @@ pub trait Renderer {
fn render(&self) -> RgbImage;
}
mod pathtrace;
pub use pathtrace::*;
mod raytracer;
pub use raytracer::*;

View file

@ -0,0 +1,2 @@
mod pathtracer;
pub use self::pathtracer::*;

View file

@ -0,0 +1,34 @@
use super::super::Renderer;
use crate::scene::Scene;
use image::RgbImage;
/// Render the [`Scene`] using Bidirectional-Pathtracing
///
/// [`Scene`]: ../scene/scene/struct.Scene.html
pub struct Pathtracer {
#[allow(unused)]
scene: Scene,
}
impl Pathtracer {
/// Create a [`Pathtracer`] renderer with the given [`Scene`]
///
/// [`Pathtracer`]: struct.Pathtracer.html
/// [`Scene`]: ../scene/scene/struct.Scene.html
pub fn new(scene: Scene) -> Self {
Pathtracer { scene }
}
/// Render the [`Scene`] using Bidirectional-Pathtracing.
///
/// [`Scene`]: ../scene/scene/struct.Scene.html
pub fn render(&self) -> RgbImage {
todo!()
}
}
impl Renderer for Pathtracer {
fn render(&self) -> RgbImage {
self.render()
}
}