Rendering something parsed from a pbrt file

This commit is contained in:
hal8174 2025-08-20 23:20:41 +02:00
parent c8ff77a0a9
commit 6d363aecd0
Signed by: hal8174
SSH key fingerprint: SHA256:NN98ZYwnrreQLSOV/g+amY7C3yL/mS1heD7bi5t6PPw
7 changed files with 316 additions and 127 deletions

View file

@ -174,6 +174,14 @@ impl AffineTransform {
self.inv[2][0] * pos.x() + self.inv[2][1] * pos.y() + self.inv[2][2] * pos.z(),
)
}
pub fn transform_ray(&self, ray: Ray) -> Ray {
Ray::new(
self.transform_pos(ray.start()),
self.transform_dir(ray.dir()),
ray.time(),
)
}
}
impl Mul<AffineTransform> for AffineTransform {