Extract renderer into own packege

This commit is contained in:
hal8174 2024-10-01 14:37:50 +02:00
parent b3fdef8837
commit c517a836ee
24 changed files with 332 additions and 157 deletions

View file

@ -1,4 +1,3 @@
use rand::Rng;
use ray_tracing_core::prelude::*;
use ray_tracing_core::scene::{Intersection, Scene};
use ray_tracing_material::default::DefaultMaterial;
@ -15,6 +14,12 @@ impl BasicScene {
}
}
impl Default for BasicScene {
fn default() -> Self {
Self::new()
}
}
impl<R: Rng> Scene<R> for BasicScene {
fn intersect(&self, ray: Ray, min: Float, max: Float) -> Option<Intersection<'_, R>> {
let mut intersection: Option<Intersection<'_, R>> = None;