use super::*;
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct RtMaterial {
#[get(type(copy))]
pub(crate) kind: RtMaterialKind,
#[get(type(copy))]
pub(crate) albedo: Vec3,
#[get(type(copy))]
pub(crate) metallic: f32,
#[get(type(copy))]
pub(crate) roughness: f32,
#[get(type(copy))]
pub(crate) ior: f32,
#[get(type(copy))]
pub(crate) transmission: f32,
#[get(type(copy))]
pub(crate) absorption: Vec3,
#[get(type(copy))]
pub(crate) clearcoat: f32,
#[get(type(copy))]
pub(crate) clearcoat_roughness: f32,
#[get(type(copy))]
pub(crate) emission: Vec3,
#[get(type(copy))]
pub(crate) oren_nayar_sigma: f32,
}
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct RtLight {
#[get(type(copy))]
pub(crate) kind: RtLightKind,
#[get(type(copy))]
pub(crate) color: Vec3,
#[get(type(copy))]
pub(crate) intensity: f32,
}
#[derive(Clone, Copy, Data, Debug, New, PartialEq)]
pub struct RtLightSample {
#[get(type(copy))]
pub(crate) direction: Vec3,
#[get(type(copy))]
pub(crate) distance: f32,
#[get(type(copy))]
pub(crate) radiance: Vec3,
#[get(type(copy))]
pub(crate) pdf: f32,
#[get(type(copy))]
pub(crate) is_delta: bool,
}
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct RtCamera {
#[get(type(copy))]
pub(crate) position: Vec3,
#[get(type(copy))]
pub(crate) forward: Vec3,
#[get(type(copy))]
pub(crate) right: Vec3,
#[get(type(copy))]
pub(crate) up: Vec3,
#[get(type(copy))]
pub(crate) fov_y_rad: f32,
#[get(type(copy))]
pub(crate) aspect: f32,
#[get(type(copy))]
pub(crate) aperture_radius: f32,
#[get(type(copy))]
pub(crate) focal_distance: f32,
}
#[derive(Clone, Data, Debug)]
pub struct RaytraceScene {
pub(crate) blas_list: Vec<Blas3D>,
pub(crate) tlas: Tlas3D,
pub(crate) primitives: Vec<RtPrimitive>,
pub(crate) sdf_tracers: Vec<SdfSphereTracer>,
pub(crate) materials: Vec<RtMaterial>,
pub(crate) lights: Vec<RtLight>,
#[get(type(copy))]
pub(crate) environment: RtEnvironment,
#[get(type(copy))]
pub(crate) camera: RtCamera,
#[get(type(copy))]
pub(crate) revision: u64,
}
#[derive(Clone, Data, Debug)]
pub struct RaytraceSceneBuilder {
pub(crate) scene: RaytraceScene,
}