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!() 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); let mut res = Path::new(point);
for _ in 0..self.scene.reflection_limit { for _ in 0..self.scene.reflection_limit {
// FIXME: // FIXME:

View file

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

View file

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