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() + } +}