use super::*;
#[derive(Clone, Data, Debug, Default, PartialEq)]
pub struct MemoryGltfResolver {
pub(crate) buffers: HashMap<String, Vec<u8>>,
pub(crate) images: HashMap<String, Vec<u8>>,
}
#[derive(Clone, Data, Debug, Default, PartialEq)]
pub struct DirectoryGltfResolver {
pub(crate) base_dir: PathBuf,
}
#[derive(Clone, Data, Debug, Default, PartialEq)]
pub struct ImportedSkin3D {
pub(crate) name: String,
pub(crate) joints: Vec<u32>,
#[get(type(copy))]
pub(crate) skeleton_root: Option<u32>,
pub(crate) inverse_bind_matrices: Vec<Mat4>,
}
#[derive(Clone, Data, Debug, Default, PartialEq)]
pub struct ImportedAnimationSampler3D {
pub(crate) timestamps: Vec<f32>,
pub(crate) values: Vec<f32>,
#[get(type(copy))]
pub(crate) value_stride: usize,
#[get(type(copy))]
pub(crate) interpolation: GltfInterpolationMode,
}
#[derive(Clone, Copy, Data, Debug, Default, Eq, Hash, New, PartialEq)]
pub struct ImportedAnimationChannel3D {
#[get(type(copy))]
pub(crate) target_node: u32,
#[get(type(copy))]
pub(crate) path: GltfAnimationPath,
#[get(type(copy))]
pub(crate) sampler_index: usize,
}
#[derive(Clone, Data, Debug, Default, PartialEq)]
pub struct ImportedAnimationClip3D {
pub(crate) name: String,
#[get(type(copy))]
pub(crate) duration_secs: f32,
pub(crate) samplers: Vec<ImportedAnimationSampler3D>,
pub(crate) channels: Vec<ImportedAnimationChannel3D>,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct ImportedCamera3D {
pub(crate) name: String,
#[get(type(copy))]
pub(crate) projection: GltfCameraProjection,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct ImportedLight3D {
pub(crate) name: String,
#[get(type(copy))]
pub(crate) color: Vec3,
#[get(type(copy))]
pub(crate) intensity: f32,
#[get(type(copy))]
pub(crate) kind: GltfLightKind,
}
#[derive(Clone, Data, Debug, Default, PartialEq)]
pub struct ImportedScene3D {
pub(crate) name: String,
pub(crate) generator: String,
pub(crate) scene_graph: SceneGraph3D,
pub(crate) meshes: Vec<Mesh3D>,
pub(crate) materials: Vec<PrincipledMaterial3D>,
pub(crate) textures: Vec<Texture2D3D>,
pub(crate) skins: Vec<ImportedSkin3D>,
pub(crate) animations: Vec<ImportedAnimationClip3D>,
pub(crate) cameras: Vec<ImportedCamera3D>,
pub(crate) lights: Vec<ImportedLight3D>,
}