Use camera settings from pbrt file
This commit is contained in:
parent
6403aabc11
commit
0a9748a1b7
4 changed files with 51 additions and 15 deletions
|
|
@ -46,7 +46,7 @@ impl Lexer {
|
|||
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
enum CameraType {
|
||||
pub enum CameraType {
|
||||
Orthographic {
|
||||
frame_aspect_ratio: Option<Float>,
|
||||
screen_window: Option<Float>,
|
||||
|
|
@ -64,8 +64,8 @@ enum CameraType {
|
|||
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct PbrtCamera {
|
||||
camera_type: CameraType,
|
||||
pub struct PbrtCamera {
|
||||
pub camera_type: CameraType,
|
||||
shutter_open: Float,
|
||||
shutter_close: Float,
|
||||
}
|
||||
|
|
@ -640,10 +640,9 @@ impl<R: Rng> Pbrt<R> {
|
|||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
pub struct PbrtWorldSettings {
|
||||
camera: PbrtCamera,
|
||||
camera_ctm: AffineTransform,
|
||||
pub camera: PbrtCamera,
|
||||
pub camera_ctm: AffineTransform,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
@ -790,7 +789,7 @@ fn inner_parse_pbrt<R: Rng + std::fmt::Debug>(
|
|||
*context.ctm.last_mut().unwrap() = affine_transform
|
||||
}
|
||||
Statement::Shape(shape_type, shape_alpha) => {
|
||||
dbg!(&context);
|
||||
// dbg!(&context);
|
||||
if context.area_light.is_empty() {
|
||||
pbrt.scene.shapes.push(Shape {
|
||||
ctm: context.get_ctm(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue