Rendering something parsed from a pbrt file
This commit is contained in:
parent
c8ff77a0a9
commit
6d363aecd0
7 changed files with 316 additions and 127 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue