Add obj parsing

This commit is contained in:
hal8174 2024-10-02 23:43:13 +02:00
parent 0a70fbd8d4
commit 556f50274d
13 changed files with 1004 additions and 3 deletions

View file

@ -1,7 +1,8 @@
use crate::prelude::*;
use std::fmt::Debug;
/// All calculations for the material are done a tangent space of the intersection.
pub trait Material<R: Rng>: Sync {
pub trait Material<R: Rng>: Sync + Debug {
fn eval(&self, w_in: Dir3, w_out: Dir3, rng: &mut R) -> Color;
fn sample(&self, w_in: Dir3, rng: &mut R) -> SampleResult {