library: render: pathtrace: add dummy Pathtracer
This commit is contained in:
parent
9c6b9af31a
commit
b624ced37f
|
@ -9,6 +9,9 @@ pub trait Renderer {
|
|||
fn render(&self) -> RgbImage;
|
||||
}
|
||||
|
||||
mod pathtrace;
|
||||
pub use pathtrace::*;
|
||||
|
||||
mod raytracer;
|
||||
pub use raytracer::*;
|
||||
|
||||
|
|
2
pathtracer/src/render/pathtrace/mod.rs
Normal file
2
pathtracer/src/render/pathtrace/mod.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
mod pathtracer;
|
||||
pub use self::pathtracer::*;
|
34
pathtracer/src/render/pathtrace/pathtracer.rs
Normal file
34
pathtracer/src/render/pathtrace/pathtracer.rs
Normal 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()
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue