From 764bdbeb06adf0c6596467a955ca457abdf2656c Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Sat, 29 Dec 2018 10:18:38 -0800 Subject: [PATCH] MicropolyBatch doesn't need to satisfy Surface trait. Eventually the Surface trait will be changed to actually mean the ability to be processed _into_ a MicropolyBatch. So it's ultimately nonsensical for MicropolyBatch to implement it. --- src/surface/micropoly_batch.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/surface/micropoly_batch.rs b/src/surface/micropoly_batch.rs index 780d529..36d686f 100644 --- a/src/surface/micropoly_batch.rs +++ b/src/surface/micropoly_batch.rs @@ -9,10 +9,10 @@ use crate::{ lerp::lerp_slice, math::{cross, dot, Matrix4x4, Normal, Point}, ray::{AccelRay, Ray}, - shading::{surface_closure::SurfaceClosure, SurfaceShader}, + shading::surface_closure::SurfaceClosure, }; -use super::{triangle, Surface, SurfaceIntersection, SurfaceIntersectionData}; +use super::{triangle, SurfaceIntersection, SurfaceIntersectionData}; /// This is the core surface primitive for rendering: all surfaces are /// ultimately processed into pre-shaded micropolygon batches for rendering. @@ -96,19 +96,12 @@ impl<'a> MicropolyBatch<'a> { } } -impl<'a> Boundable for MicropolyBatch<'a> { - fn bounds(&self) -> &[BBox] { - self.accel.bounds() - } -} - -impl<'a> Surface for MicropolyBatch<'a> { +impl<'a> MicropolyBatch<'a> { fn intersect_rays( &self, accel_rays: &mut [AccelRay], wrays: &[Ray], isects: &mut [SurfaceIntersection], - _shader: &SurfaceShader, space: &[Matrix4x4], ) { // Precalculate transform for non-motion blur cases @@ -260,3 +253,9 @@ impl<'a> Surface for MicropolyBatch<'a> { }); } } + +impl<'a> Boundable for MicropolyBatch<'a> { + fn bounds(&self) -> &[BBox] { + self.accel.bounds() + } +}