animation data

This commit is contained in:
Robin Appelman 2023-12-30 22:23:52 +01:00
commit a264e1c939
7 changed files with 172 additions and 15 deletions

View file

@ -18,17 +18,17 @@ fn main() -> Result<(), vmdl::ModelError> {
let data = fs::read(path.with_extension("vvd"))?;
let _vvd = Vvd::read(&data)?;
println!("{}", mdl.surface_prop);
println!("{:?}", mdl.key_values);
for bone in mdl.bones {
println!(
"{}: from {} at\n\t{:?}\n\t{:?}",
bone.name,
bone.parent,
bone.quaternion,
bone.pose_to_bone.rotation()
);
}
println!("{:?}", mdl.header.flags);
dbg!(mdl.local_animations);
// for bone in mdl.bones {
// println!(
// "{}: from {} at\n\t{:?}\n\t{:?}",
// bone.name,
// bone.parent,
// bone.quaternion,
// bone.pose_to_bone.rotation()
// );
// }
// let model = Model::from_parts(mdl, vtx, vvd);
// for strip in model.vertex_strips() {

View file

@ -251,6 +251,7 @@ fn model_to_model(model: &Model, loader: &Loader, skin: usize) -> CpuModel {
let skin = model.skin_tables().nth(skin).unwrap();
let transforms = model.root_transform();
let transforms = Matrix4::identity();
let geometries = model
.meshes()