use super::*;
#[derive(Clone, Copy, Data, Debug, Default, New, PartialEq)]
pub struct Vertex3D {
#[get(type(copy))]
pub(crate) position: Vec3,
#[get(type(copy))]
pub(crate) normal: Vec3,
}
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct PbrMaterial {
#[get(type(copy))]
pub(crate) base_color: Vec3,
#[get(type(copy))]
pub(crate) metallic: f32,
#[get(type(copy))]
pub(crate) roughness: f32,
#[get(type(copy))]
pub(crate) emissive: Vec3,
#[get(type(copy))]
pub(crate) reflectivity: f32,
#[get(type(copy))]
pub(crate) surface_detail: SurfaceDetailMode,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct BoxMeshDesc {
pub(crate) name: String,
#[get(type(copy))]
pub(crate) size: Vec3,
#[get(type(copy))]
pub(crate) ground_pivot: bool,
#[get(type(copy))]
pub(crate) material: PbrMaterial,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct GroundPlaneDesc {
pub(crate) name: String,
#[get(type(copy))]
pub(crate) width: f32,
#[get(type(copy))]
pub(crate) depth: f32,
#[get(type(copy))]
pub(crate) subdivisions: usize,
#[get(type(copy))]
pub(crate) material: PbrMaterial,
}
#[derive(Clone, Copy, Data, Debug, New, PartialEq)]
pub struct Meshlet3D {
#[get(type(copy))]
pub(crate) first_tri: u32,
#[get(type(copy))]
pub(crate) tri_count: u32,
#[get(type(copy))]
pub(crate) bounds: Aabb3D,
#[get(type(copy))]
pub(crate) cone_axis: Vec3,
#[get(type(copy))]
pub(crate) cone_cutoff: f32,
#[get(type(copy))]
pub(crate) screen_error: f32,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct Mesh3D {
pub(crate) name: String,
pub(crate) vertices: Vec<Vertex3D>,
pub(crate) indices: Vec<[u32; 3]>,
#[get(type(copy))]
pub(crate) bounds: Aabb3D,
#[get(type(copy))]
pub(crate) material: PbrMaterial,
pub(crate) meshlets: Vec<Meshlet3D>,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct MeshLodChain {
pub(crate) levels: Vec<Mesh3D>,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct ImportedModel3D {
pub(crate) name: String,
#[get(type(copy))]
pub(crate) format: ModelFormat,
pub(crate) meshes: Vec<MeshLodChain>,
#[get(type(copy))]
pub(crate) total_vertices: usize,
#[get(type(copy))]
pub(crate) total_triangles: usize,
}
#[derive(Clone, Copy, Debug, Default)]
pub struct ModelImporter3D;