use shared::core::{
    light::Light,
    material::Material,
    medium::MediumInterface,
    primitive::{GeometricPrimitive, SimplePrimitive},
    shape::Shape,
    texture::GPUFloatTexture,
};

use shared::utils::Ptr;

pub trait CreateSimplePrimitive {
    fn new(shape: Ptr<Shape>, material: Ptr<Material>) -> SimplePrimitive {
        SimplePrimitive { shape, material }
    }
}

impl CreateSimplePrimitive for SimplePrimitive {}

pub trait CreateGeometricPrimitive {
    fn new(
        shape: Ptr<Shape>,
        material: Ptr<Material>,
        area_light: Ptr<Light>,
        medium_interface: MediumInterface,
        alpha: Ptr<GPUFloatTexture>,
    ) -> GeometricPrimitive {
        GeometricPrimitive {
            shape,
            material,
            area_light,
            medium_interface,
            alpha,
        }
    }
}

impl CreateGeometricPrimitive for GeometricPrimitive {}
