wip: normal material

This commit is contained in:
2026-05-02 13:48:27 +02:00
parent c3d37f4758
commit ae73e626b9
10 changed files with 36 additions and 12 deletions

View File

@@ -4,7 +4,7 @@ use crate::objects::traits::Hittable;
use crate::objects::triangle::Triangle;
use crate::ray::Ray;
use crate::{objects::materials::traits::Material, vec3::Vec3};
use log::info;
use log::{info, warn};
use std::fmt::Debug;
use std::sync::Arc;
@@ -19,6 +19,7 @@ pub struct Quad {
impl Quad {
pub fn new(p1: Vec3, p2: Vec3, p3: Vec3, p4: Vec3, material: Arc<dyn Material>) -> Self {
warn!("quad normal {}", (p2 - p1).cross(&(p4 - p1)).get_unit());
Self {
p1,
p2,