csci5607/assignment-1b/src/scene/mod.rs

34 lines
649 B
Rust
Raw Normal View History

2023-02-15 07:20:03 +00:00
pub mod cylinder;
2023-02-06 03:52:42 +00:00
pub mod data;
2023-02-15 07:20:03 +00:00
pub mod input_file;
2023-02-06 03:52:42 +00:00
pub mod sphere;
2023-02-15 07:22:42 +00:00
pub mod illumination;
2023-02-15 07:20:03 +00:00
use nalgebra::Vector3;
use crate::image::Color;
use self::data::{DepthCueing, Light, Material, Object};
#[derive(Debug, Default)]
pub struct Scene {
pub eye_pos: Vector3<f64>,
pub view_dir: Vector3<f64>,
pub up_dir: Vector3<f64>,
/// Horizontal field of view (in degrees)
pub hfov: f64,
pub parallel_projection: bool,
pub image_width: usize,
pub image_height: usize,
/// Background color
pub bkg_color: Color,
pub depth_cueing: DepthCueing,
pub materials: Vec<Material>,
pub lights: Vec<Light>,
pub objects: Vec<Object>,
}