Use full 4x4 matrix for affine transformation
This commit is contained in:
parent
ae4dc2c21a
commit
c48790f32f
2 changed files with 172 additions and 49 deletions
|
|
@ -487,6 +487,7 @@ fn parse_transform(input: &mut Tokenizer) -> Result<AffineTransform> {
|
|||
[v[0], v[4], v[8], v[12]],
|
||||
[v[1], v[5], v[9], v[13]],
|
||||
[v[2], v[6], v[10], v[14]],
|
||||
[v[3], v[7], v[11], v[15]],
|
||||
])
|
||||
.ok_or(miette!("Unable to invert transformation"))
|
||||
}
|
||||
|
|
@ -757,6 +758,7 @@ fn inner_parse_pbrt(path: impl AsRef<Path> + std::fmt::Debug) -> Result<Pbrt> {
|
|||
*context.ctm.last_mut().unwrap() = affine_transform
|
||||
}
|
||||
Statement::Shape(shape_type, shape_alpha) => {
|
||||
dbg!(&context);
|
||||
pbrt.scene.shapes.push(Shape {
|
||||
ctm: context.get_ctm(),
|
||||
material: Arc::clone(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue