library: render: add #[allow(unused)] attributes

This commit is contained in:
Bruno BELANYI 2020-04-02 00:02:11 +02:00
parent fc2de38b1a
commit c0fc885159
3 changed files with 7 additions and 3 deletions

View file

@ -29,7 +29,8 @@ impl BidirectionalPathtracer {
todo!()
}
fn construct_path(&self, point: Point, direction: Unit<Vector>) -> Path {
#[allow(unused)]
fn construct_path(&self, point: Point, _direction: Unit<Vector>) -> Path {
let mut res = Path::new(point);
for _ in 0..self.scene.reflection_limit {
// FIXME:

View file

@ -10,6 +10,7 @@ pub struct PathPoint {
}
impl PathPoint {
#[allow(unused)]
pub fn new(
point: Point,
incident: Unit<Vector>,
@ -31,6 +32,7 @@ pub struct Path {
}
impl Path {
#[allow(unused)]
pub fn new(origin: Point) -> Self {
Path {
origin,
@ -38,6 +40,7 @@ impl Path {
}
}
#[allow(unused)]
pub fn push_point(&mut self, new_point: PathPoint) {
self.points.push(new_point)
}

View file

@ -2,7 +2,7 @@ use super::super::Renderer;
use crate::scene::Scene;
use image::RgbImage;
/// Render the [`Scene`] using Bidirectional-Pathtracing
/// Render the [`Scene`] using Pathtracing
///
/// [`Scene`]: ../scene/scene/struct.Scene.html
pub struct Pathtracer {
@ -19,7 +19,7 @@ impl Pathtracer {
Pathtracer { scene }
}
/// Render the [`Scene`] using Bidirectional-Pathtracing.
/// Render the [`Scene`] using Pathtracing.
///
/// [`Scene`]: ../scene/scene/struct.Scene.html
pub fn render(&self) -> RgbImage {