wip: normal material
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user